Completed
Pull Request — master (#2)
by Harry
06:53
created
tests/unit/Flow/Collection/EachTest.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
         $collection = new NodeCollection([$node]);
54 54
 
55 55
         $eachFlow->shouldReceive('flow')
56
-                 ->with($node)
57
-                 ->andReturn($node);
56
+                    ->with($node)
57
+                    ->andReturn($node);
58 58
 
59 59
         $response = $flow->flow($collection);
60 60
 
@@ -72,8 +72,8 @@  discard block
 block discarded – undo
72 72
         $collection = new NodeCollection([$node]);
73 73
 
74 74
         $eachFlow->shouldReceive('flow')
75
-                 ->with($node)
76
-                 ->andReturn($node);
75
+                    ->with($node)
76
+                    ->andReturn($node);
77 77
 
78 78
         $response = $flow->flow($collection);
79 79
 
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
         $collection = new NodeCollection([$node]);
92 92
 
93 93
         $eachFlow->shouldReceive('flow')
94
-                 ->with($node)
95
-                 ->andReturn($node);
94
+                    ->with($node)
95
+                    ->andReturn($node);
96 96
 
97 97
         $response = call_user_func($flow, $collection);
98 98
 
Please login to merge, or discard this patch.
tests/unit/Flow/Collection/LastTest.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/unit/Flow/Collection/MapTest.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/unit/Flow/FlowCollectionTest.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/unit/FlowTest.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/unit/Runner/RunTest.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
tests/unit/Runner/ToAllTest.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/unit/Flow/Collection/FilterTest.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
tests/unit/Flow/Collection/FirstTest.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.