]> git.agnieray.net Git - galette.git/commitdiff
Fix return types
authorJohan Cwiklinski <johan@x-tnd.be>
Sun, 10 Oct 2021 11:58:23 +0000 (13:58 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Sun, 17 Oct 2021 04:15:40 +0000 (06:15 +0200)
galette/lib/Galette/Core/Authentication.php
galette/lib/Galette/Entity/Adherent.php

index af867ad6e06f7f98ee1c1e5499a618ef8c8963e1..a59d60aaaa30bb404d7c2e4b9bc18f05fd1222e6 100644 (file)
@@ -175,9 +175,9 @@ abstract class Authentication
      *
      * @return bool
      */
-    public function isAdmin()
+    public function isAdmin(): bool
     {
-        return $this->admin;
+        return (bool)$this->admin;
     }
 
     /**
@@ -185,9 +185,9 @@ abstract class Authentication
      *
      * @return bool
      */
-    public function isSuperAdmin()
+    public function isSuperAdmin(): bool
     {
-        return $this->superadmin;
+        return (bool)$this->superadmin;
     }
 
     /**
@@ -195,9 +195,9 @@ abstract class Authentication
      *
      * @return bool
      */
-    public function isActive()
+    public function isActive(): bool
     {
-        return $this->active;
+        return (bool)$this->active;
     }
 
     /**
@@ -205,9 +205,9 @@ abstract class Authentication
      *
      * @return bool
      */
-    public function isStaff()
+    public function isStaff(): bool
     {
-        return $this->staff;
+        return (bool)$this->staff;
     }
 
     /**
@@ -215,9 +215,9 @@ abstract class Authentication
      *
      * @return bool
      */
-    public function isCron()
+    public function isCron(): bool
     {
-        return $this->cron;
+        return (bool)$this->cron;
     }
 
     /**
@@ -229,7 +229,7 @@ abstract class Authentication
      *
      * @return boolean
      */
-    public function isGroupManager($id_group = null)
+    public function isGroupManager($id_group = null): bool
     {
         $manager = false;
         if ($this->isAdmin() || $this->isStaff()) {
@@ -258,9 +258,9 @@ abstract class Authentication
      *
      * @return bool
      */
-    public function isUp2Date()
+    public function isUp2Date(): bool
     {
-        return $this->uptodate;
+        return (bool)$this->uptodate;
     }
 
     /**
index da94a5c5f4bcb5b020381607cee7f6a24196ec63..624c01fe9cbd337d6832422cca1b5d9dfe275a93 100644 (file)
@@ -2057,6 +2057,8 @@ class Adherent
         if ($preferences->pref_bool_create_member && $login->isLogged()) {
             return true;
         }
+
+        return false;
     }
 
     /**