@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace App\DoctrineMigrations; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | /** |
| 5 | 5 | * This file contains only the ExceptionListener class. |
@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | * This file contains only the RateLimitSubscriber class. |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -declare(strict_types = 1); |
|
| 6 | +declare(strict_types=1); |
|
| 7 | 7 | |
| 8 | 8 | namespace App\EventSubscriber; |
| 9 | 9 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | $cacheItem = $this->cache->getItem($cacheKey); |
| 144 | 144 | |
| 145 | 145 | // If increment value already in cache, or start with 1. |
| 146 | - $count = $cacheItem->isHit() ? (int) $cacheItem->get() + 1 : 1; |
|
| 146 | + $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1; |
|
| 147 | 147 | |
| 148 | 148 | // Check if limit has been exceeded, and if so, throw an error. |
| 149 | 149 | if ($count > $this->rateLimit) { |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $cacheItem = $this->cache->getItem($cacheKey); |
| 184 | 184 | |
| 185 | 185 | // If increment value already in cache, or start with 1. |
| 186 | - $count = $cacheItem->isHit() ? (int)$cacheItem->get() + 1 : 1; |
|
| 186 | + $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1; |
|
| 187 | 187 | |
| 188 | 188 | // Check if limit has been exceeded, and if so, add a log entry. |
| 189 | 189 | if ($count > 3) { |
@@ -258,8 +258,8 @@ discard block |
||
| 258 | 258 | $message = $this->i18n->msg('error-rate-limit', [ |
| 259 | 259 | $this->rateDuration, |
| 260 | 260 | "<a href='/login'>".$this->i18n->msg('error-rate-limit-login')."</a>", |
| 261 | - "<a href='https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/API' target='_blank'>" . |
|
| 262 | - $this->i18n->msg('api') . |
|
| 261 | + "<a href='https://www.mediawiki.org/wiki/Special:MyLanguage/XTools/API' target='_blank'>". |
|
| 262 | + $this->i18n->msg('api'). |
|
| 263 | 263 | "</a>", |
| 264 | 264 | ]); |
| 265 | 265 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | * This file contains only the DisabledToolSubscriber class. |
| 4 | 4 | */ |
| 5 | 5 | |
| 6 | -declare(strict_types = 1); |
|
| 6 | +declare(strict_types=1); |
|
| 7 | 7 | |
| 8 | 8 | namespace App\EventSubscriber; |
| 9 | 9 | |
@@ -20,4 +20,4 @@ |
||
| 20 | 20 | $_SERVER += $_ENV; |
| 21 | 21 | $_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev'; |
| 22 | 22 | $_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV']; |
| 23 | -$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; |
|
| 23 | +$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int)$_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0'; |
|
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | return [ |
| 5 | 5 | Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | Request::setTrustedHosts([$trustedHosts]); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | -$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); |
|
| 23 | +$kernel = new Kernel($_SERVER['APP_ENV'], (bool)$_SERVER['APP_DEBUG']); |
|
| 24 | 24 | $request = Request::createFromGlobals(); |
| 25 | 25 | $response = $kernel->handle($request); |
| 26 | 26 | $response->send(); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace App\Repository; |
| 5 | 5 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | namespace App\Repository; |
| 5 | 5 | |