@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow\Test\Unit\Flow\Collection; |
15 | 15 | |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | |
55 | 55 | $node = m::mock(NodeCollectionInterface::class); |
56 | 56 | $node->shouldReceive('last') |
57 | - ->with($func) |
|
58 | - ->andReturn($node); |
|
57 | + ->with($func) |
|
58 | + ->andReturn($node); |
|
59 | 59 | |
60 | 60 | $response = $flow->flow($node); |
61 | 61 | |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | |
73 | 73 | $node = m::mock(NodeCollectionInterface::class); |
74 | 74 | $node->shouldReceive('last') |
75 | - ->with($func) |
|
76 | - ->andReturn($node); |
|
75 | + ->with($func) |
|
76 | + ->andReturn($node); |
|
77 | 77 | |
78 | 78 | $response = $flow->flow($node); |
79 | 79 | |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | |
91 | 91 | $node = m::mock(NodeCollectionInterface::class); |
92 | 92 | $node->shouldReceive('last') |
93 | - ->with($func) |
|
94 | - ->andReturn($node); |
|
93 | + ->with($func) |
|
94 | + ->andReturn($node); |
|
95 | 95 | |
96 | 96 | $response = call_user_func($flow, $node); |
97 | 97 |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow\Test\Unit\Flow\Collection; |
15 | 15 | |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | |
55 | 55 | $node = m::mock(NodeCollectionInterface::class); |
56 | 56 | $node->shouldReceive('map') |
57 | - ->with($func) |
|
58 | - ->andReturn([]); |
|
57 | + ->with($func) |
|
58 | + ->andReturn([]); |
|
59 | 59 | |
60 | 60 | $response = $flow->flow($node); |
61 | 61 | |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | |
74 | 74 | $node = m::mock(NodeCollectionInterface::class); |
75 | 75 | $node->shouldReceive('map') |
76 | - ->with($func) |
|
77 | - ->andReturn([]); |
|
76 | + ->with($func) |
|
77 | + ->andReturn([]); |
|
78 | 78 | |
79 | 79 | $response = $flow->flow($node); |
80 | 80 | |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | |
93 | 93 | $node = m::mock(NodeCollectionInterface::class); |
94 | 94 | $node->shouldReceive('map') |
95 | - ->with($func) |
|
96 | - ->andReturn([]); |
|
95 | + ->with($func) |
|
96 | + ->andReturn([]); |
|
97 | 97 | |
98 | 98 | $response = call_user_func($flow, $node); |
99 | 99 |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow; |
15 | 15 |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow\Test\Unit; |
15 | 15 | |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | $collection = new NodeCollection([$node1, $node2]); |
37 | 37 | |
38 | 38 | $result = Flow::create() |
39 | - ->filter(function (NodeInterface $node) { |
|
40 | - return ($node instanceof FileNodeInterface); |
|
41 | - }) |
|
42 | - ->first() |
|
43 | - ->flow($collection); |
|
39 | + ->filter(function (NodeInterface $node) { |
|
40 | + return ($node instanceof FileNodeInterface); |
|
41 | + }) |
|
42 | + ->first() |
|
43 | + ->flow($collection); |
|
44 | 44 | |
45 | 45 | static::assertSame($result, $node1); |
46 | 46 | } |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow\Test\Unit\Runner; |
15 | 15 | |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | $node3 = m::mock(NodeInterface::class); |
43 | 43 | |
44 | 44 | $flow1->shouldReceive('flow') |
45 | - ->with($node1) |
|
46 | - ->andReturn($node2); |
|
45 | + ->with($node1) |
|
46 | + ->andReturn($node2); |
|
47 | 47 | $flow2->shouldReceive('flow') |
48 | - ->with($node2) |
|
49 | - ->andReturn($node3); |
|
48 | + ->with($node2) |
|
49 | + ->andReturn($node3); |
|
50 | 50 | |
51 | 51 | static::assertEquals($node3, $runner->flow($node1)); |
52 | 52 | } |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | $node3 = m::mock(NodeInterface::class); |
64 | 64 | |
65 | 65 | $flow1->shouldReceive('flow') |
66 | - ->with($node1) |
|
67 | - ->andReturn($node2); |
|
66 | + ->with($node1) |
|
67 | + ->andReturn($node2); |
|
68 | 68 | $flow2->shouldReceive('flow') |
69 | - ->with($node2) |
|
70 | - ->andReturn($node3); |
|
69 | + ->with($node2) |
|
70 | + ->andReturn($node3); |
|
71 | 71 | |
72 | 72 | static::assertEquals($node3, $runner->flow($node1)); |
73 | 73 | } |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | $node3 = m::mock(NodeInterface::class); |
85 | 85 | |
86 | 86 | $flow1->shouldReceive('flow') |
87 | - ->with($node1) |
|
88 | - ->andReturn($node2); |
|
87 | + ->with($node1) |
|
88 | + ->andReturn($node2); |
|
89 | 89 | $flow2->shouldReceive('flow') |
90 | - ->with($node2) |
|
91 | - ->andReturn($node3); |
|
90 | + ->with($node2) |
|
91 | + ->andReturn($node3); |
|
92 | 92 | |
93 | 93 | static::assertEquals($node3, call_user_func($runner, $node1)); |
94 | 94 | } |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow\Test\Unit\Runner; |
15 | 15 | |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | $node3 = m::mock(NodeInterface::class); |
44 | 44 | |
45 | 45 | $flow1->shouldReceive('flow') |
46 | - ->with($node1) |
|
47 | - ->andReturn($node2); |
|
46 | + ->with($node1) |
|
47 | + ->andReturn($node2); |
|
48 | 48 | $flow2->shouldReceive('flow') |
49 | - ->with($node1) |
|
50 | - ->andReturn($node3); |
|
49 | + ->with($node1) |
|
50 | + ->andReturn($node3); |
|
51 | 51 | |
52 | 52 | $output = $runner->flow($node1); |
53 | 53 | |
@@ -68,11 +68,11 @@ discard block |
||
68 | 68 | $node3 = m::mock(NodeInterface::class); |
69 | 69 | |
70 | 70 | $flow1->shouldReceive('flow') |
71 | - ->with($node1) |
|
72 | - ->andReturn($node2); |
|
71 | + ->with($node1) |
|
72 | + ->andReturn($node2); |
|
73 | 73 | $flow2->shouldReceive('flow') |
74 | - ->with($node1) |
|
75 | - ->andReturn($node3); |
|
74 | + ->with($node1) |
|
75 | + ->andReturn($node3); |
|
76 | 76 | |
77 | 77 | $output = $runner->flow($node1); |
78 | 78 | |
@@ -93,11 +93,11 @@ discard block |
||
93 | 93 | $node3 = m::mock(NodeInterface::class); |
94 | 94 | |
95 | 95 | $flow1->shouldReceive('flow') |
96 | - ->with($node1) |
|
97 | - ->andReturn($node2); |
|
96 | + ->with($node1) |
|
97 | + ->andReturn($node2); |
|
98 | 98 | $flow2->shouldReceive('flow') |
99 | - ->with($node1) |
|
100 | - ->andReturn($node3); |
|
99 | + ->with($node1) |
|
100 | + ->andReturn($node3); |
|
101 | 101 | |
102 | 102 | $output = call_user_func($runner, $node1); |
103 | 103 |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow\Test\Unit\Flow\Collection; |
15 | 15 | |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | |
55 | 55 | $node = m::mock(NodeCollectionInterface::class); |
56 | 56 | $node->shouldReceive('last') |
57 | - ->with($func) |
|
58 | - ->andReturn($node); |
|
57 | + ->with($func) |
|
58 | + ->andReturn($node); |
|
59 | 59 | |
60 | 60 | $response = $flow->flow($node); |
61 | 61 | |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | |
73 | 73 | $node = m::mock(NodeCollectionInterface::class); |
74 | 74 | $node->shouldReceive('last') |
75 | - ->with($func) |
|
76 | - ->andReturn($node); |
|
75 | + ->with($func) |
|
76 | + ->andReturn($node); |
|
77 | 77 | |
78 | 78 | $response = $flow->flow($node); |
79 | 79 | |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | |
91 | 91 | $node = m::mock(NodeCollectionInterface::class); |
92 | 92 | $node->shouldReceive('last') |
93 | - ->with($func) |
|
94 | - ->andReturn($node); |
|
93 | + ->with($func) |
|
94 | + ->andReturn($node); |
|
95 | 95 | |
96 | 96 | $response = call_user_func($flow, $node); |
97 | 97 |
@@ -1,15 +1,15 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow\Test\Unit\Flow\Collection; |
15 | 15 | |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | |
55 | 55 | $node = m::mock(NodeCollectionInterface::class); |
56 | 56 | $node->shouldReceive('last') |
57 | - ->with($func) |
|
58 | - ->andReturn($node); |
|
57 | + ->with($func) |
|
58 | + ->andReturn($node); |
|
59 | 59 | |
60 | 60 | $response = $flow->flow($node); |
61 | 61 | |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | |
73 | 73 | $node = m::mock(NodeCollectionInterface::class); |
74 | 74 | $node->shouldReceive('last') |
75 | - ->with($func) |
|
76 | - ->andReturn($node); |
|
75 | + ->with($func) |
|
76 | + ->andReturn($node); |
|
77 | 77 | |
78 | 78 | $response = $flow->flow($node); |
79 | 79 | |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | |
91 | 91 | $node = m::mock(NodeCollectionInterface::class); |
92 | 92 | $node->shouldReceive('last') |
93 | - ->with($func) |
|
94 | - ->andReturn($node); |
|
93 | + ->with($func) |
|
94 | + ->andReturn($node); |
|
95 | 95 | |
96 | 96 | $response = call_user_func($flow, $node); |
97 | 97 |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of graze/data-flow |
|
4 | - * |
|
5 | - * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | - * |
|
7 | - * For the full copyright and license information, please view the LICENSE |
|
8 | - * file that was distributed with this source code. |
|
9 | - * |
|
10 | - * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | - * @link https://github.com/graze/data-flow |
|
12 | - */ |
|
3 | + * This file is part of graze/data-flow |
|
4 | + * |
|
5 | + * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com> |
|
6 | + * |
|
7 | + * For the full copyright and license information, please view the LICENSE |
|
8 | + * file that was distributed with this source code. |
|
9 | + * |
|
10 | + * @license https://github.com/graze/data-flow/blob/master/LICENSE.md |
|
11 | + * @link https://github.com/graze/data-flow |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | namespace Graze\DataFlow; |
15 | 15 |
@@ -29,6 +29,7 @@ |
||
29 | 29 | * FlowCollection constructor. |
30 | 30 | * |
31 | 31 | * @param FlowInterface ...$flows |
32 | + * @param FlowInterface[] $flows |
|
32 | 33 | */ |
33 | 34 | public function __construct(...$flows) |
34 | 35 | { |