Completed
Pull Request — master (#10)
by Krishnaprasad
08:08 queued 03:56
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/Cache/ThrottlerCache.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 
72 72
     /**
73 73
      * @param string $key
74
-     * @param mixed  $item
74
+     * @param ThrottlerItemInterface  $item
75 75
      * @return bool
76 76
      */
77 77
     public function setItem(string $key, ThrottlerItemInterface $item): bool
Please login to merge, or discard this patch.
src/Throttle/Throttler/FixedWindowThrottler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     private function getHitsCacheKey()
138 138
     {
139
-        return $this->key . self::CACHE_KEY_HITS;
139
+        return $this->key.self::CACHE_KEY_HITS;
140 140
     }
141 141
 
142 142
     /**
@@ -144,6 +144,6 @@  discard block
 block discarded – undo
144 144
      */
145 145
     private function getTimeCacheKey()
146 146
     {
147
-        return $this->key . self::CACHE_KEY_TIME;
147
+        return $this->key.self::CACHE_KEY_TIME;
148 148
     }
149 149
 }
Please login to merge, or discard this patch.