| @@ -57,8 +57,8 @@ | ||
| 57 | 57 | public function findEntriesToCleanUp($secondsTillReset, $maxFailures, $restrictionTime, $identifier = null) | 
| 58 | 58 |      { | 
| 59 | 59 | $time = time(); | 
| 60 | - $age = (int) $time - $secondsTillReset; | |
| 61 | - $restrictionTime = (int) $time - $restrictionTime; | |
| 60 | + $age = (int)$time - $secondsTillReset; | |
| 61 | + $restrictionTime = (int)$time - $restrictionTime; | |
| 62 | 62 | $query = $this->createQuery(); | 
| 63 | 63 | $query->getQuerySettings() | 
| 64 | 64 | ->setRespectStoragePage(false); | 
| @@ -262,7 +262,7 @@ | ||
| 262 | 262 |      { | 
| 263 | 263 |          if (!isset($this->clientIdentifier)) { | 
| 264 | 264 | $this->clientIdentifier = md5( | 
| 265 | - $this->restrictionIdentifier->getIdentifierValue() . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] | |
| 265 | + $this->restrictionIdentifier->getIdentifierValue().$GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] | |
| 266 | 266 | ); | 
| 267 | 267 | } | 
| 268 | 268 | |
| @@ -166,7 +166,7 @@ | ||
| 166 | 166 | |
| 167 | 167 | private function getRestrictionMessage(): ?string | 
| 168 | 168 |      { | 
| 169 | - $time = (int) ($this->getConfiguration()->getRestrictionTime() / 60); | |
| 169 | + $time = (int)($this->getConfiguration()->getRestrictionTime() / 60); | |
| 170 | 170 | |
| 171 | 171 | return LocalizationUtility::translate( | 
| 172 | 172 | 'restriction_message', | 
| @@ -110,7 +110,7 @@ | ||
| 110 | 110 | public function getUser() | 
| 111 | 111 |      { | 
| 112 | 112 |          if ($this->isProtectionEnabled() && $this->getRestrictionService()->isClientRestricted()) { | 
| 113 | - $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['setup'][$this->frontendUserAuthentication->loginType . '_fetchAllUsers'] = false; | |
| 113 | + $GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['setup'][$this->frontendUserAuthentication->loginType.'_fetchAllUsers'] = false; | |
| 114 | 114 | return [ | 
| 115 | 115 | 'uid' => 0, | 
| 116 | 116 | 'username' => '', | 
| @@ -103,7 +103,7 @@ discard block | ||
| 103 | 103 | */ | 
| 104 | 104 | public function getMaximumNumberOfFailures(): int | 
| 105 | 105 |      { | 
| 106 | - return (int) $this->get(self::CONF_MAX_FAILURES); | |
| 106 | + return (int)$this->get(self::CONF_MAX_FAILURES); | |
| 107 | 107 | } | 
| 108 | 108 | |
| 109 | 109 | /** | 
| @@ -111,7 +111,7 @@ discard block | ||
| 111 | 111 | */ | 
| 112 | 112 | public function getRestrictionTime(): int | 
| 113 | 113 |      { | 
| 114 | - return (int) $this->get(self::CONF_RESTRICTION_TIME); | |
| 114 | + return (int)$this->get(self::CONF_RESTRICTION_TIME); | |
| 115 | 115 | } | 
| 116 | 116 | |
| 117 | 117 | /** | 
| @@ -119,32 +119,32 @@ discard block | ||
| 119 | 119 | */ | 
| 120 | 120 | public function getResetTime(): int | 
| 121 | 121 |      { | 
| 122 | - return (int) $this->get(self::CONF_SECONDS_TILL_RESET); | |
| 122 | + return (int)$this->get(self::CONF_SECONDS_TILL_RESET); | |
| 123 | 123 | } | 
| 124 | 124 | |
| 125 | 125 | public function isLoggingEnabled(): bool | 
| 126 | 126 |      { | 
| 127 | - return (bool) $this->get(self::LOGGING_ENABLED) == 1; | |
| 127 | + return (bool)$this->get(self::LOGGING_ENABLED) == 1; | |
| 128 | 128 | } | 
| 129 | 129 | |
| 130 | 130 | public function getLogLevel(): int | 
| 131 | 131 |      { | 
| 132 | - return (int) $this->get(self::LOGGING_LEVEL); | |
| 132 | + return (int)$this->get(self::LOGGING_LEVEL); | |
| 133 | 133 | } | 
| 134 | 134 | |
| 135 | 135 | public function getExcludedIps(): array | 
| 136 | 136 |      { | 
| 137 | -        return explode(',', (string) $this->get(self::EXCLUDED_IPS)); | |
| 137 | +        return explode(',', (string)$this->get(self::EXCLUDED_IPS)); | |
| 138 | 138 | } | 
| 139 | 139 | |
| 140 | 140 | public function getXForwardedFor(): bool | 
| 141 | 141 |      { | 
| 142 | - return (bool) $this->get(self::X_FORWARDED_FOR); | |
| 142 | + return (bool)$this->get(self::X_FORWARDED_FOR); | |
| 143 | 143 | } | 
| 144 | 144 | |
| 145 | 145 | public function getIdentificationIdentifier(): int | 
| 146 | 146 |      { | 
| 147 | - return (int) $this->get(self::CONF_IDENTIFICATION_IDENTIFIER); | |
| 147 | + return (int)$this->get(self::CONF_IDENTIFICATION_IDENTIFIER); | |
| 148 | 148 | } | 
| 149 | 149 | |
| 150 | 150 | /** | 
| @@ -156,6 +156,6 @@ discard block | ||
| 156 | 156 | return $this->configuration[$key]; | 
| 157 | 157 | } | 
| 158 | 158 | |
| 159 | -        throw new Exception('Configuration key "' . $key . '" does not exist.'); | |
| 159 | +        throw new Exception('Configuration key "'.$key.'" does not exist.'); | |
| 160 | 160 | } | 
| 161 | 161 | } |