Completed
Push — master ( 753c96...c3156c )
by Sébastien
01:47
created
src/Pipeline.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param array $pipes
39 39
      * @param ProcessorInterface $processor
40 40
      */
41
-    public function __construct(array $pipes = [], ProcessorInterface $processor = null)
41
+    public function __construct(array $pipes = [ ], ProcessorInterface $processor = null)
42 42
     {
43 43
         $this->processor = $processor ?: new StackProcessor();
44 44
         $this->pipes = $pipes;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function pipe($last)
63 63
     {
64
-        $this->pipes[] = $last;
64
+        $this->pipes[ ] = $last;
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.
src/Processor/StackProcessor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,16 +42,16 @@
 block discarded – undo
42 42
      */
43 43
     private function buildCallable($pipes, $outlet)
44 44
     {
45
-        $callable = function (...$payload) use($outlet) {
45
+        $callable = function(...$payload) use($outlet) {
46 46
             if ($outlet !== null) {
47 47
                 return $outlet(...$payload);
48 48
             }
49 49
 
50
-            return $payload[0] ?? null;
50
+            return $payload[ 0 ] ?? null;
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
         }
Please login to merge, or discard this patch.
src/Processor/PipeProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      */
17 17
     public function process(array $pipes, array $payload, callable $outlet = null)
18 18
     {
19
-        $payload = $payload[0] ?? null;
19
+        $payload = $payload[ 0 ] ?? null;
20 20
 
21 21
         foreach ($pipes as $pipe) {
22 22
             $payload = $pipe($payload);
Please login to merge, or discard this patch.