From: Johan Cwiklinski Date: Sun, 10 Oct 2021 11:58:23 +0000 (+0200) Subject: Fix return types X-Git-Tag: 0.9.5.1~32 X-Git-Url: https://git.agnieray.net/?a=commitdiff_plain;h=bb5a272a0423985b61a382a1fa77c936d207eed2;p=galette.git Fix return types --- diff --git a/galette/lib/Galette/Core/Authentication.php b/galette/lib/Galette/Core/Authentication.php index af867ad6e..a59d60aaa 100644 --- a/galette/lib/Galette/Core/Authentication.php +++ b/galette/lib/Galette/Core/Authentication.php @@ -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; } /** diff --git a/galette/lib/Galette/Entity/Adherent.php b/galette/lib/Galette/Entity/Adherent.php index da94a5c5f..624c01fe9 100644 --- a/galette/lib/Galette/Entity/Adherent.php +++ b/galette/lib/Galette/Entity/Adherent.php @@ -2057,6 +2057,8 @@ class Adherent if ($preferences->pref_bool_create_member && $login->isLogged()) { return true; } + + return false; } /**