@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | /** |
57 | 57 | * @var array |
58 | 58 | */ |
59 | - protected $exception_targets = [Exception::class]; |
|
59 | + protected $exception_targets = [ Exception::class ]; |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * Retry constructor. |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * @param int $delay |
67 | 67 | * @param array $exception_targets |
68 | 68 | */ |
69 | - public function __construct($retries = 1, Closure $closure, $delay = 0, $exception_targets = []) |
|
69 | + public function __construct($retries = 1, Closure $closure, $delay = 0, $exception_targets = [ ]) |
|
70 | 70 | { |
71 | 71 | $this->counter = $retries; |
72 | 72 | $this->max_attempts_count = $retries; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @return static |
85 | 85 | */ |
86 | - static public function times($attempts = 1, Closure $closure, $delay = 0, $exception_targets = []) |
|
86 | + static public function times($attempts = 1, Closure $closure, $delay = 0, $exception_targets = [ ]) |
|
87 | 87 | { |
88 | 88 | return new static($attempts, $closure, $delay, $exception_targets); |
89 | 89 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * |
97 | 97 | * @return mixed |
98 | 98 | */ |
99 | - static public function retry($attempts = 1, Closure $closure, $delay = 0, $exception_targets = []) |
|
99 | + static public function retry($attempts = 1, Closure $closure, $delay = 0, $exception_targets = [ ]) |
|
100 | 100 | { |
101 | 101 | return static::times($attempts, $closure, $delay, $exception_targets)->play(); |
102 | 102 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | try { |
115 | 115 | do { $response = $this->next(); } while ($this->counter > 0); |
116 | 116 | return $response; |
117 | - } catch(RetryLogicException $e) { |
|
117 | + } catch (RetryLogicException $e) { |
|
118 | 118 | if ($silent === true) { |
119 | 119 | return $e; |
120 | 120 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | try { |
132 | 132 | $this->errored = false; |
133 | 133 | return $this->invokeUserFunction(); |
134 | - } catch ( Exception $e ) { |
|
134 | + } catch (Exception $e) { |
|
135 | 135 | |
136 | 136 | $this->attempts_count++; |
137 | 137 | $this->counter--; |