Passed
Pull Request — master (#54)
by Eugene
05:24
created
src/Middleware/RetryMiddleware.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,28 +30,28 @@
 block discarded – undo
30 30
 
31 31
     public static function constant(int $maxRetries = self::DEFAULT_MAX_RETRIES, int $intervalMs = 100) : self
32 32
     {
33
-        return new self(static function (int $retries) use ($maxRetries, $intervalMs) {
33
+        return new self(static function(int $retries) use ($maxRetries, $intervalMs) {
34 34
             return $retries > $maxRetries ? null : $intervalMs;
35 35
         });
36 36
     }
37 37
 
38 38
     public static function exponential(int $maxRetries = self::DEFAULT_MAX_RETRIES, int $baseMs = 100) : self
39 39
     {
40
-        return new self(static function (int $retries) use ($maxRetries, $baseMs) {
40
+        return new self(static function(int $retries) use ($maxRetries, $baseMs) {
41 41
             return $retries > $maxRetries ? null : $baseMs ** $retries;
42 42
         });
43 43
     }
44 44
 
45 45
     public static function linear(int $maxRetries = self::DEFAULT_MAX_RETRIES, int $differenceMs = 100) : self
46 46
     {
47
-        return new self(static function (int $retries) use ($maxRetries, $differenceMs) {
47
+        return new self(static function(int $retries) use ($maxRetries, $differenceMs) {
48 48
             return $retries > $maxRetries ? null : $differenceMs * $retries;
49 49
         });
50 50
     }
51 51
 
52 52
     public static function custom(\Closure $getDelayMs) : self
53 53
     {
54
-        return new self(static function (int $retries) use ($getDelayMs) : ?int {
54
+        return new self(static function(int $retries) use ($getDelayMs) : ?int {
55 55
             return $getDelayMs($retries);
56 56
         });
57 57
     }
Please login to merge, or discard this patch.