Completed
Push — master ( 4fc007...9eb98f )
by John
02:50
created
src/APIRequest/URLParser/MIMEProvider.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
  * Interface MIMEProvider
9 9
  * @package LunixREST\APIRequest\URLParser
10 10
  */
11
-interface MIMEProvider
12
-{
11
+interface MIMEProvider {
13 12
     /**
14 13
      * @param string $fileExtension
15 14
      * @return string
Please login to merge, or discard this patch.
src/Throttle/CachePoolThrottle.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     {
58 58
         $item = $this->cacheItemPool->getItem($this->deriveCacheKey($request));
59 59
 
60
-        if($requestCount = $item->get()) {
60
+        if ($requestCount = $item->get()) {
61 61
             $item->set($requestCount + 1);
62 62
         } else {
63 63
             $item->set(1)->expiresAfter($this->perXSeconds);
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@  discard block
 block discarded – undo
9 9
  * Class CachePoolThrottle
10 10
  * @package LunixREST\Throttle
11 11
  */
12
-abstract class CachePoolThrottle implements Throttle
13
-{
12
+abstract class CachePoolThrottle implements Throttle {
14 13
     /**
15 14
      * @var CacheItemPoolInterface
16 15
      */
@@ -30,8 +29,7 @@  discard block
 block discarded – undo
30 29
      * @param int $limit
31 30
      * @param int $perXSeconds
32 31
      */
33
-    public function __construct(CacheItemPoolInterface $cacheItemPool, int $limit = 60, int $perXSeconds = 60)
34
-    {
32
+    public function __construct(CacheItemPoolInterface $cacheItemPool, int $limit = 60, int $perXSeconds = 60) {
35 33
         $this->cacheItemPool = $cacheItemPool;
36 34
         $this->limit = $limit;
37 35
         $this->perXSeconds = $perXSeconds;
@@ -53,8 +51,7 @@  discard block
 block discarded – undo
53 51
      * Log that a request took place
54 52
      * @param \LunixREST\APIRequest\APIRequest $request
55 53
      */
56
-    public function logRequest(APIRequest $request)
57
-    {
54
+    public function logRequest(APIRequest $request) {
58 55
         $item = $this->cacheItemPool->getItem($this->deriveCacheKey($request));
59 56
 
60 57
         if($requestCount = $item->get()) {
Please login to merge, or discard this patch.
src/Throttle/APIKeyCachePoolThrottle.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
      */
31 31
     protected function deriveCacheKey(APIRequest $request): string
32 32
     {
33
-        return $this->keyPrefix . $request->getApiKey();
33
+        return $this->keyPrefix.$request->getApiKey();
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@  discard block
 block discarded – undo
4 4
 use LunixREST\APIRequest\APIRequest;
5 5
 use Psr\Cache\CacheItemPoolInterface;
6 6
 
7
-class APIKeyCachePoolThrottle extends CachePoolThrottle
8
-{
7
+class APIKeyCachePoolThrottle extends CachePoolThrottle {
9 8
     /**
10 9
      * @var string
11 10
      */
@@ -18,8 +17,7 @@  discard block
 block discarded – undo
18 17
      * @param int $perXSeconds
19 18
      * @param string $keyPrefix
20 19
      */
21
-    public function __construct(CacheItemPoolInterface $cacheItemPool, $limit = 60, $perXSeconds = 60, $keyPrefix = '')
22
-    {
20
+    public function __construct(CacheItemPoolInterface $cacheItemPool, $limit = 60, $perXSeconds = 60, $keyPrefix = '') {
23 21
         parent::__construct($cacheItemPool, $limit, $perXSeconds);
24 22
         $this->keyPrefix = $keyPrefix;
25 23
     }
Please login to merge, or discard this patch.