@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * @param array $pipes |
| 46 | 46 | * @param CallableFactoryInterface $factory |
| 47 | 47 | */ |
| 48 | - public function __construct(array $pipes = [], CallableFactoryInterface $factory = null) |
|
| 48 | + public function __construct(array $pipes = [ ], CallableFactoryInterface $factory = null) |
|
| 49 | 49 | { |
| 50 | 50 | $this->factory = $factory ?: new StackCallableFactory(); |
| 51 | 51 | $this->pipes = $pipes; |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | public function pipe($last) |
| 70 | 70 | { |
| 71 | - $this->pipes[] = $last; |
|
| 71 | + $this->pipes[ ] = $last; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | public function createCallable(array $pipes, callable $outlet = null) |
| 18 | 18 | { |
| 19 | 19 | if ($outlet !== null) { |
| 20 | - $pipes[] = $outlet; |
|
| 20 | + $pipes[ ] = $outlet; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | return function($payload) use($pipes) { |
@@ -45,13 +45,13 @@ |
||
| 45 | 45 | if ($outlet !== null) { |
| 46 | 46 | $callable = $outlet; |
| 47 | 47 | } else { |
| 48 | - $callable = function ($payload) { |
|
| 48 | + $callable = function($payload) { |
|
| 49 | 49 | return $payload; |
| 50 | 50 | }; |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | while ($pipe = array_pop($pipes)) { |
| 54 | - $callable = function (...$payload) use ($pipe, $callable) { |
|
| 54 | + $callable = function(...$payload) use ($pipe, $callable) { |
|
| 55 | 55 | return $pipe($callable, ...$payload); |
| 56 | 56 | }; |
| 57 | 57 | } |