Passed
Pull Request — master (#133)
by Timo
02:58
created
src/Helpers/InterfaceHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      */
10 10
     public static function getImplementations(string $interfaceName): array
11 11
     {
12
-        return \array_filter(\get_declared_classes(), function ($className) use ($interfaceName) {
12
+        return \array_filter(\get_declared_classes(), function($className) use ($interfaceName) {
13 13
             return self::implementsInterface($className, $interfaceName);
14 14
         });
15 15
     }
Please login to merge, or discard this patch.
src/Cache/Strategies/Cacheable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     public function request(RequestInterface $request, callable $handler): PromiseInterface
22 22
     {
23
-        return $handler()->then(function (ResponseInterface $response) use ($request) {
23
+        return $handler()->then(function(ResponseInterface $response) use ($request) {
24 24
             $this->_saveResponse($request, $response);
25 25
 
26 26
             return $response;
Please login to merge, or discard this patch.
src/Cache/Strategies/Cache.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,12 @@
 block discarded – undo
11 11
 {
12 12
     public function request(RequestInterface $request, callable $handler): PromiseInterface
13 13
     {
14
-        try {
14
+        try
15
+        {
15 16
             return parent::request($request, $handler);
16
-        } catch (TooManyRequestsHttpException $tooManyRequestsHttpException) {
17
+        }
18
+        catch (TooManyRequestsHttpException $tooManyRequestsHttpException)
19
+        {
17 20
             $response = $this->_getResponse($request);
18 21
             if ($response !== null) {
19 22
                 return new FulfilledPromise($response);
Please login to merge, or discard this patch.
src/SystemClock.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@
 block discarded – undo
10 10
 
11 11
     private DateTimeImmutable $_now;
12 12
 
13
-    public function __construct(DateTimeImmutable|null $now = null)
13
+    public function __construct(DateTimeImmutable | null $now = null)
14 14
     {
15 15
         $this->_now = $now ?? new DateTimeImmutable();
16 16
     }
17 17
 
18
-    public static function create(DateTimeImmutable|null $now = null): self
18
+    public static function create(DateTimeImmutable | null $now = null): self
19 19
     {
20 20
         return new self($now);
21 21
     }
Please login to merge, or discard this patch.
src/TimeKeeper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 class TimeKeeper
8 8
 {
9 9
     private int $_expirationIntervalSeconds;
10
-    private DateTimeImmutable|null $_expiresAt = null;
10
+    private DateTimeImmutable | null $_expiresAt = null;
11 11
 
12 12
     public function __construct(int $intervalInSeconds)
13 13
     {
Please login to merge, or discard this patch.
src/Middleware/ThrottleMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function handle(): callable
24 24
     {
25
-        return function (callable $handler): callable {
26
-            return function (RequestInterface $request, array $options) use ($handler) {
25
+        return function(callable $handler): callable {
26
+            return function(RequestInterface $request, array $options) use ($handler) {
27 27
                 return $this->_requestLimitRuleset->cache($request, $this->_requestHandler($handler, $request, $options));
28 28
             };
29 29
         };
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     private function _requestHandler(callable $handler, RequestInterface $request, array $options): callable
33 33
     {
34
-        return function () use ($handler, $request, $options) {
34
+        return function() use ($handler, $request, $options) {
35 35
             $requestLimitGroup = $this->_requestLimitRuleset->getRequestLimitGroup();
36 36
             if (!$requestLimitGroup->canRequest($request, $options)) {
37 37
                 throw new TooManyRequestsHttpException(
Please login to merge, or discard this patch.