Completed
Push — master ( 55d707...3e0afc )
by Greg
02:16
created
tests/unit/Task/CollectionTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Robo\Robo;
10 10
 use Robo\Result;
11 11
 use Robo\State\Data;
12
-use Robo\Task\BaseTask;
13 12
 use Robo\Collection\Collection;
14 13
 use Robo\Task\ValueProviderTask;
15 14
 use Robo\Task\CollectionTestTask;
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
             ->completion($completion1)
111 111
             ->rollbackCode(function() use($rollback1) { $rollback1->run(); } )
112 112
             ->completionCode(function() use($completion1) { $completion1->run(); } )
113
-            ->addCode(function () { return 42; })
113
+            ->addCode(function() { return 42; })
114 114
             ->progressMessage("not reached")
115 115
             ->rollback($rollback2)
116 116
             ->completion($completion2)
117
-            ->addCode(function () { return 13; });
117
+            ->addCode(function() { return 13; });
118 118
 
119 119
         $collection->setLogger($this->guy->logger());
120 120
 
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
 
138 138
         $result = $collection
139 139
             ->addCode(
140
-                function (Data $state) {
140
+                function(Data $state) {
141 141
                     $state['one'] = 'first';
142 142
                 })
143 143
             ->addCode(
144
-                function (Data $state) {
144
+                function(Data $state) {
145 145
                     $state['two'] = 'second';
146 146
                 })
147 147
             ->addCode(
148
-                function (Data $state) {
148
+                function(Data $state) {
149 149
                     $state['three'] = "{$state['one']} and {$state['two']}";
150 150
                 })
151 151
             ->run();
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             ->add($first)
170 170
             ->add($second)
171 171
             ->addCode(
172
-                function (Data $state) {
172
+                function(Data $state) {
173 173
                     $state['three'] = "{$state['one']} and {$state['two']}";
174 174
                 })
175 175
             ->run();
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             ->add($third)
199 199
                 ->defer(
200 200
                     $third,
201
-                    function ($task, $state) {
201
+                    function($task, $state) {
202 202
                         $task->provideData('three', "{$state['one']} and {$state['two']}");
203 203
                     }
204 204
                 )
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             ->add($third)
231 231
                 ->defer(
232 232
                     $third,
233
-                    function ($task, $state) {
233
+                    function($task, $state) {
234 234
                         $task->provideData('three', "{$state['one']} and {$state['two']}");
235 235
                     }
236 236
                 )
Please login to merge, or discard this patch.
tests/unit/Task/ComposerTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 use AspectMock\Test as test;
3
-
4 3
 use Robo\Traits\Common\AdjustQuotes;
5 4
 
6 5
 class ComposerTest extends \Codeception\TestCase\Test
Please login to merge, or discard this patch.
tests/unit/Task/GulpTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 use AspectMock\Test as test;
3
-
4 3
 use Robo\Traits\Common\AdjustQuotes;
5 4
 
6 5
 class GulpTest extends \Codeception\TestCase\Test
Please login to merge, or discard this patch.
Spacing   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,32 +24,32 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $this->assertEquals(
26 26
             $this->adjustQuotes("gulp 'default'"),
27
-            (new \Robo\Task\Gulp\Run('default','gulp'))->getCommand()
27
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->getCommand()
28 28
         );
29 29
 
30 30
         $this->assertEquals(
31 31
             $this->adjustQuotes("gulp 'another'"),
32
-            (new \Robo\Task\Gulp\Run('another','gulp'))->getCommand()
32
+            (new \Robo\Task\Gulp\Run('another', 'gulp'))->getCommand()
33 33
         );
34 34
 
35 35
         $this->assertEquals(
36 36
             $this->adjustQuotes("gulp 'default' --silent"),
37
-            (new \Robo\Task\Gulp\Run('default','gulp'))->silent()->getCommand()
37
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->silent()->getCommand()
38 38
         );
39 39
 
40 40
         $this->assertEquals(
41 41
             $this->adjustQuotes("gulp 'default' --no-color"),
42
-            (new \Robo\Task\Gulp\Run('default','gulp'))->noColor()->getCommand()
42
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->noColor()->getCommand()
43 43
         );
44 44
 
45 45
         $this->assertEquals(
46 46
             $this->adjustQuotes("gulp 'default' --color"),
47
-            (new \Robo\Task\Gulp\Run('default','gulp'))->color()->getCommand()
47
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->color()->getCommand()
48 48
         );
49 49
 
50 50
         $this->assertEquals(
51 51
             $this->adjustQuotes("gulp 'default' --tasks-simple"),
52
-            (new \Robo\Task\Gulp\Run('default','gulp'))->simple()->getCommand()
52
+            (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple()->getCommand()
53 53
         );
54 54
     }
55 55
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $gulp = test::double('Robo\Task\Gulp\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]);
59 59
 
60
-        $task = (new \Robo\Task\Gulp\Run('default','gulp'))->simple();
60
+        $task = (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple();
61 61
         $this->assertEquals(
62 62
             $this->adjustQuotes("gulp 'default' --tasks-simple"),
63 63
             $task->getCommand());
@@ -69,12 +69,11 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $isWindows = defined('PHP_WINDOWS_VERSION_MAJOR');
71 71
         $expected = $isWindows ?
72
-            'gulp "anotherWith weired!(\"\') Chars"' :
73
-            "gulp 'anotherWith weired!(\"'\\'') Chars'";
72
+            'gulp "anotherWith weired!(\"\') Chars"' : "gulp 'anotherWith weired!(\"'\\'') Chars'";
74 73
 
75 74
         $this->assertEquals(
76 75
             $expected,
77
-            (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand()
76
+            (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand()
78 77
         );
79 78
     }
80 79
 }
Please login to merge, or discard this patch.
src/Task/Composer/RequireDependency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
         if (isset($version)) {
30 30
             $project = array_map(
31
-                function ($item) use ($version) {
31
+                function($item) use ($version) {
32 32
                     return "$item:$version";
33 33
                 },
34 34
                 $project
Please login to merge, or discard this patch.
src/Task/Development/SemVer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
         }
236 236
 
237 237
         $this->version = array_intersect_key($matches, $this->version);
238
-        $this->version = array_map(function ($item) {
238
+        $this->version = array_map(function($item) {
239 239
             return $item[0];
240 240
         }, $this->version);
241 241
     }
Please login to merge, or discard this patch.
src/Common/ConfigAwareTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,9 +73,9 @@
 block discarded – undo
73 73
      */
74 74
     private static function getClassKey($key)
75 75
     {
76
-        $configPrefix = static::configPrefix();                            // task.
77
-        $configClass = static::configClassIdentifier(get_called_class());  // PARTIAL_NAMESPACE.CLASSNAME
78
-        $configPostFix = static::configPostfix();                          // .settings
76
+        $configPrefix = static::configPrefix(); // task.
77
+        $configClass = static::configClassIdentifier(get_called_class()); // PARTIAL_NAMESPACE.CLASSNAME
78
+        $configPostFix = static::configPostfix(); // .settings
79 79
 
80 80
         return sprintf('%s%s%s.%s', $configPrefix, $configClass, $configPostFix, $key);
81 81
     }
Please login to merge, or discard this patch.
tests/unit/ConfigurationInjectionTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 use Robo\Robo;
3
-
4 3
 use Consolidation\Config\Loader\ConfigProcessor;
5 4
 use Consolidation\Config\Loader\YamlConfigLoader;
6 5
 
Please login to merge, or discard this patch.
src/Common/ProcessUtils.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,6 @@
 block discarded – undo
7 7
 
8 8
 namespace Robo\Common;
9 9
 
10
-use Symfony\Component\Process\Exception\InvalidArgumentException;
11
-
12 10
 /**
13 11
  * ProcessUtils is a bunch of utility methods. We want to allow Robo 1.x
14 12
  * to work with Symfony 4.x while remaining backwards compatibility. This
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -74,6 +74,9 @@
 block discarded – undo
74 74
         return "'" . str_replace("'", "'\\''", $argument) . "'";
75 75
     }
76 76
 
77
+    /**
78
+     * @param string $char
79
+     */
77 80
     private static function isSurroundedBy($arg, $char)
78 81
     {
79 82
         return 2 < strlen($arg) && $char === $arg[0] && $char === $arg[strlen($arg) - 1];
Please login to merge, or discard this patch.
src/ClassDiscovery/RelativeNamespaceDiscovery.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,8 @@
 block discarded – undo
91 91
     {
92 92
         $finder = new Finder();
93 93
         $finder->files()
94
-          ->name($pattern)
95
-          ->in($directories);
94
+            ->name($pattern)
95
+            ->in($directories);
96 96
 
97 97
         return $finder;
98 98
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $relativePath = $this->convertNamespaceToPath($this->relativeNamespace);
54 54
 
55 55
         foreach ($this->classLoader->getPrefixesPsr4() as $baseNamespace => $directories) {
56
-            $directories = array_filter(array_map(function ($directory) use ($relativePath) {
56
+            $directories = array_filter(array_map(function($directory) use ($relativePath) {
57 57
                 return $directory . $relativePath;
58 58
             }, $directories), 'is_dir');
59 59
 
Please login to merge, or discard this patch.