@@ -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 AppBundle\EventSubscriber; |
| 9 | 9 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $cacheItem = $this->cache->getItem($cacheKey); |
| 125 | 125 | |
| 126 | 126 | // If increment value already in cache, or start with 1. |
| 127 | - $count = $cacheItem->isHit() ? (int) $cacheItem->get() + 1 : 1; |
|
| 127 | + $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1; |
|
| 128 | 128 | |
| 129 | 129 | // Check if limit has been exceeded, and if so, throw an error. |
| 130 | 130 | if ($count > $this->rateLimit) { |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $cacheItem = $this->cache->getItem($cacheKey); |
| 165 | 165 | |
| 166 | 166 | // If increment value already in cache, or start with 1. |
| 167 | - $count = $cacheItem->isHit() ? (int)$cacheItem->get() + 1 : 1; |
|
| 167 | + $count = $cacheItem->isHit() ? (int)$cacheItem->get()+1 : 1; |
|
| 168 | 168 | |
| 169 | 169 | // Check if limit has been exceeded, and if so, add a log entry. |
| 170 | 170 | if ($count > 3) { |
@@ -239,8 +239,8 @@ discard block |
||
| 239 | 239 | $message = $this->i18n->msg('error-rate-limit', [ |
| 240 | 240 | $this->rateDuration, |
| 241 | 241 | "<a href='/login'>".$this->i18n->msg('error-rate-limit-login')."</a>", |
| 242 | - "<a href='https://xtools.readthedocs.io/en/stable/api' target='_blank'>" . |
|
| 243 | - $this->i18n->msg('api') . |
|
| 242 | + "<a href='https://xtools.readthedocs.io/en/stable/api' target='_blank'>". |
|
| 243 | + $this->i18n->msg('api'). |
|
| 244 | 244 | "</a>", |
| 245 | 245 | ]); |
| 246 | 246 | |