@@ -55,7 +55,7 @@ |
||
| 55 | 55 | // pretend I am doing a query |
| 56 | 56 | // $user = DB::findById($params['id']); |
| 57 | 57 | $user = (object) ['id' => 123, 'name' => 'Eugene', 'phone' => '111111']; |
| 58 | - return ok(['model' => $user]); |
|
| 58 | + return ok(['model' => $user]); |
|
| 59 | 59 | //return error('User not found!'); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | public 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 |
||
| 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 | }) |