Completed
Push — master ( 6aa47e...cf79b7 )
by Ievgen
05:38
created
src/Railway.php 3 patches
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,10 +6,10 @@
 block discarded – undo
6 6
 use function einfach\operation\response\isValidResponse;
7 7
 use const einfach\operation\response\RESPONSE_TYPE_ERROR;
8 8
 use const einfach\operation\response\RESPONSE_TYPE_OK;
9
-use einfach\operation\step\Step;
10
-use einfach\operation\step\Failure;
11 9
 use einfach\operation\step\AbstractStep;
12 10
 use einfach\operation\step\Always;
11
+use einfach\operation\step\Failure;
12
+use einfach\operation\step\Step;
13 13
 use einfach\operation\step\TryCatch;
14 14
 
15 15
 class Railway
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -89,6 +89,7 @@
 block discarded – undo
89 89
 
90 90
     /**
91 91
      * @throws \Exception
92
+     * @param AbstractStep $step
92 93
      */
93 94
     protected function performStep($step, &$params, $track)
94 95
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         $track = self::TRACK_SUCCESS;
83 83
         foreach ($this->stepsQueue as $step) {
84 84
             /**
85
- * @var $step AbstractStep
85
+             * @var $step AbstractStep
86 86
 */
87 87
             $track = $this->performStep($step, $params, $track);
88 88
         }
Please login to merge, or discard this patch.
src/step/AbstractStep.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
         $stepResult = $result;
70 70
         
71 71
         if (is_a($result, Result::class)) {
72
-             $stepResult = [
72
+                $stepResult = [
73 73
                     'params' => $result->params(),
74 74
                     'type' => ($result->isSuccess()) ? RESPONSE_TYPE_OK : RESPONSE_TYPE_ERROR
75 75
                 ];
Please login to merge, or discard this patch.
examples/UpdateOperation.php 1 patch
Spacing   +2 added lines, -2 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']);
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function nestedRailway($params)
39 39
     {
40 40
         return (new Railway)
41
-            ->step(function ($params) {
41
+            ->step(function($params) {
42 42
                 //return error($params, 'Nested Railway failed!');
43 43
                 return ok($params, ['nestedRwParam' => 'nestedRwValue']);
44 44
             })
Please login to merge, or discard this patch.