From: Roland Häder Date: Sun, 19 Feb 2023 02:18:57 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aa021bb67a7e8d3c2baeec2faf6bc952c411e7df;p=city.git Continued: - some type-hints added - array() converted to [] style --- 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