From aa021bb67a7e8d3c2baeec2faf6bc952c411e7df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 19 Feb 2023 03:18:57 +0100 Subject: [PATCH] Continued: - some type-hints added - array() converted to [] style --- .../city/classes/city_daemon/class_BaseCityDaemon.php | 4 ++-- application/city/classes/login/class_CityGuestLogin.php | 2 +- .../city/classes/registration/class_CityRegistration.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/city/classes/city_daemon/class_BaseCityDaemon.php b/application/city/classes/city_daemon/class_BaseCityDaemon.php index 1ac51c4..c8eeaf3 100644 --- a/application/city/classes/city_daemon/class_BaseCityDaemon.php +++ b/application/city/classes/city_daemon/class_BaseCityDaemon.php @@ -220,8 +220,8 @@ abstract class BaseCityDaemon extends BaseCitySystem implements Updateable, Adda * @param $isActive Whether the City is active * @return void */ - public final function enableIsActive ($isActive = TRUE) { - $this->isActive = (bool) $isActive; + public final function enableIsActive (bool $isActive = TRUE) { + $this->isActive = $isActive; } /** diff --git a/application/city/classes/login/class_CityGuestLogin.php b/application/city/classes/login/class_CityGuestLogin.php index de87722..b7bb8ae 100644 --- a/application/city/classes/login/class_CityGuestLogin.php +++ b/application/city/classes/login/class_CityGuestLogin.php @@ -129,7 +129,7 @@ class CityGuestLogin extends BaseFrameworkSystem implements LoginableUser, Regis * @param $requestKey Key in request class * @return void */ - public function encryptPassword ($requestKey) { + public function encryptPassword (string $requestKey) { // Check if password is found in request if (FrameworkBootstrap::getRequestInstance()->isRequestElementSet($requestKey)) { // So encrypt the password and store it for later usage in diff --git a/application/city/classes/registration/class_CityRegistration.php b/application/city/classes/registration/class_CityRegistration.php index 988098c..849fee1 100644 --- a/application/city/classes/registration/class_CityRegistration.php +++ b/application/city/classes/registration/class_CityRegistration.php @@ -43,7 +43,7 @@ class CityRegistration extends BaseRegistration implements UserRegister { /** * Elements for criteria */ - private $criteriaElements = array( + private $criteriaElements = [ 'username', 'pass_hash', 'email' => 'email1', @@ -60,7 +60,7 @@ class CityRegistration extends BaseRegistration implements UserRegister { 'birth_day', 'birth_month', 'birth_year' - ); + ]; /** * Protected constructor @@ -95,7 +95,7 @@ class CityRegistration extends BaseRegistration implements UserRegister { * @param $requestKey Key in request class * @return void */ - public function encryptPassword ($requestKey) { + public function encryptPassword (string $requestKey) { // Check if password is found in request if (FrameworkBootstrap::getRequestInstance()->isRequestElementSet($requestKey)) { // So encrypt the password and store it for later usage in -- 2.39.5