Completed
Push — master ( cf79b7...b25057 )
by Ievgen
02:41
created
examples/UpdateOperation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     public function railway() : Railway
11 11
     {
12 12
         return (new Railway)
13
-            ->step(function ($params) {
13
+            ->step(function($params) {
14 14
                 echo "Hey {$params['name']}. Say hello to anonymous function!";
15 15
                 //return error($params, 'Early fail');
16 16
                 return ok($params, ['newParam' => 'newValue']);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             ->tryCatch([$this, 'sendNotification'])
25 25
             ->always([$this, 'writeLog'])
26 26
             ->failure([$this, 'notifyAdmin'], ['name' => 'Last'])
27
-            ->step(function ($params) {
27
+            ->step(function($params) {
28 28
                 return ok($params, ['a' => 'b']);
29 29
             }, ['after' => 'First', 'name' => 'FinalCheck']);
30 30
     }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function nestedRailway($params)
43 43
     {
44 44
         return (new Railway)
45
-            ->step(function ($params) {
45
+            ->step(function($params) {
46 46
                 //return error($params, 'Nested Railway failed!');
47 47
                 return ok($params, ['nestedRwParam' => 'nestedRwValue']);
48 48
             })
Please login to merge, or discard this patch.
src/Railway.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     protected function findTargetStepIndex($stepName)
37 37
     {
38 38
         $steps = array_column($this->stepsQueue, 'step');
39
-        $names = array_map(function ($step) {
39
+        $names = array_map(function($step) {
40 40
             return $step->name();
41 41
         }, $steps);
42 42
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         return $this->rawStep(new TryCatch($callable, $name), $opt);
132 132
     }
133 133
 
134
-    public function removeStep(string $stepName){
134
+    public function removeStep(string $stepName) {
135 135
         $targetIndex = $this->findTargetStepIndex($stepName);
136 136
         unset($this->stepsQueue[$targetIndex]);
137 137
         return $this;
Please login to merge, or discard this patch.