Completed
Pull Request — master (#9)
by Krishnaprasad
10:11
created
src/Throttle/Throttler/MovingWindowThrottler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
         $startTime = (int) ceil($this->timeProvider->now()) - $this->timeLimit;
107 107
 
108 108
         // Clear all entries older than the window front-edge
109
-        $relevantTimestamps = array_filter(array_keys($this->hitCountMapping), function ($key) use ($startTime) {
109
+        $relevantTimestamps = array_filter(array_keys($this->hitCountMapping), function($key) use ($startTime) {
110 110
             return $startTime <= $key;
111 111
         });
112 112
 
Please login to merge, or discard this patch.
src/Throttle/Throttler/RetrialQueueThrottler.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     private $timeProvider;
41 41
 
42 42
     /**
43
-     * @param RetriableThrottlerInterface $internalThrottler
43
+     * @param ThrottlerInterface $internalThrottler
44 44
      * @param TimeAdapterInterface        $timeProvider
45 45
      */
46 46
     public function __construct(RetriableThrottlerInterface $internalThrottler, TimeAdapterInterface $timeProvider)
Please login to merge, or discard this patch.
src/Throttle/Throttler/AbstractWindowThrottler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
      */
103 103
     public function check(): bool
104 104
     {
105
-        return (! $this->throttlerCache->isExpired($this->data->getKey()))
105
+        return (!$this->throttlerCache->isExpired($this->data->getKey()))
106 106
             && ($this->throttlerCache->count($this->data->getKey()) < $this->settings->getLimit());
107 107
     }
108 108
 }
Please login to merge, or discard this patch.
src/Throttle/Throttler/ElasticWindowThrottler.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@
 block discarded – undo
27 27
 
28 28
 class ElasticWindowThrottler extends AbstractWindowThrottler implements ThrottlerInterface
29 29
 {
30
-     /**
31
-     * @inheritdoc
32
-     */
30
+        /**
31
+         * @inheritdoc
32
+         */
33 33
     public function hit(): ThrottlerInterface
34 34
     {
35 35
         $key = $this->data->getKey();
Please login to merge, or discard this patch.