Test Failed
Push — master ( 9f1d8c...d686dc )
by DeGracia
01:31
created
src/CircuitBreaker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         return $this;
24 24
     }
25 25
 
26
-    public function closure(Closure $closure) :?array
26
+    public function closure(Closure $closure) : ?array
27 27
     {   
28 28
         try {
29 29
             return $closure();
Please login to merge, or discard this patch.
src/Breaker.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,9 +16,11 @@
 block discarded – undo
16 16
         return $this;
17 17
     }
18 18
 
19
-    public function do(Closure $closure) :Breaker
19
+    public function do {
20
+        (Closure $closure) :Breaker
20 21
     {
21 22
         $this->closure = $closure;
23
+    }
22 24
 
23 25
         return $this;
24 26
     }
Please login to merge, or discard this patch.
tests/CircuitBreakerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             ->addBreaker($firstBreaker)
23 23
             ->addBreaker($secondBreaker)
24 24
             ->addBreaker($thirdBreaker)
25
-            ->closure(function(){
25
+            ->closure(function() {
26 26
                 throw new Exception();
27 27
             });
28 28
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $results = (new CircuitBreaker())
44 44
             ->addBreaker($firstBreaker)
45
-            ->closure(function(){
45
+            ->closure(function() {
46 46
                 return;
47 47
             });
48 48
 
Please login to merge, or discard this patch.