Completed
Push — master ( 5d51b9...626678 )
by Ievgen
03:50
created
src/step/Failure.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     function __invoke(&$params, string $track)
11 11
     {
12 12
         // works only on Error track
13
-        if ($track == Railway::TRACK_FAILURE){
13
+        if ($track == Railway::TRACK_FAILURE) {
14 14
             call_user_func($this->function, $params);
15 15
             // does not respect function return and always back to error track
16 16
             return ['type' => RESPONSE_TYPE_ERROR];
Please login to merge, or discard this patch.
examples/UpdateOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     public function __invoke($params)
14 14
     {
15 15
         $result = (new Railway)
16
-            ->step(function ($params) {
16
+            ->step(function($params) {
17 17
                 echo "Hey {$params['name']}. Say hello to anonymous function!";
18 18
                 //return error('Early fail');
19 19
                 return ok(['newParam' => 'newValue']);
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
         return $result;
32 32
     }
33 33
 
34
-    public function nestedRailway($params){
34
+    public function nestedRailway($params) {
35 35
         return (new Railway)
36
-            ->step(function ($params){
36
+            ->step(function($params) {
37 37
                 return error('Nested Railway failed!');
38 38
                 return ok(['nestedRwParam' => 'nestedRwValue']);
39 39
             })
Please login to merge, or discard this patch.