]> git.mxchange.org Git - city.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 19 Feb 2023 02:18:57 +0000 (03:18 +0100)
committerRoland Häder <roland@mxchange.org>
Sun, 19 Feb 2023 02:18:57 +0000 (03:18 +0100)
- some type-hints added
- array() converted to [] style

application/city/classes/city_daemon/class_BaseCityDaemon.php
application/city/classes/login/class_CityGuestLogin.php
application/city/classes/registration/class_CityRegistration.php

index 1ac51c4b15579dae6fe9b538ddf95b0e8386372f..c8eeaf34e56b8459fc8d603e63a7853cab41aed9 100644 (file)
@@ -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;
        }
 
        /**
index de877222bcb7df5d2631261b7fdd74bc099ac374..b7bb8ae6ae7f778dac69c011670e4285178a7b2c 100644 (file)
@@ -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
index 988098cf7a073bfbf35e4a90a54a8409db988a6d..849fee1e40ea9170d87f1dd45f643a89aaa1c76e 100644 (file)
@@ -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