Completed
Pull Request — master (#580)
by Greg
03:17
created
src/Collection/Collection.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@  discard block
 block discarded – undo
2 2
 namespace Robo\Collection;
3 3
 
4 4
 use Robo\Result;
5
-use Robo\ResultData;
6 5
 use Psr\Log\LogLevel;
7 6
 use Robo\Contract\TaskInterface;
8 7
 use Robo\Task\StackBasedTask;
@@ -12,7 +11,6 @@  discard block
 block discarded – undo
12 11
 use Robo\Exception\TaskException;
13 12
 use Robo\Exception\TaskExitException;
14 13
 use Robo\Contract\CommandInterface;
15
-
16 14
 use Robo\Contract\InflectionInterface;
17 15
 use Robo\State\StateAwareInterface;
18 16
 use Robo\State\StateAwareTrait;
Please login to merge, or discard this patch.
src/Collection/CollectionBuilder.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -76,6 +76,10 @@
 block discarded – undo
76 76
         $this->resetState();
77 77
     }
78 78
 
79
+    /**
80
+     * @param \League\Container\ContainerInterface $container
81
+     * @param BuilderAwareInterface $commandFile
82
+     */
79 83
     public static function create($container, $commandFile)
80 84
     {
81 85
         $builder = new self($commandFile);
Please login to merge, or discard this patch.
src/State/StateAwareTrait.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -7,6 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     /**
9 9
      * {@inheritdoc}
10
+     * @return ResultData
10 11
      */
11 12
     public function getState()
12 13
     {
Please login to merge, or discard this patch.
tests/unit/Task/CollectionTest.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -191,6 +191,10 @@  discard block
 block discarded – undo
191 191
     protected $key;
192 192
     protected $value;
193 193
 
194
+    /**
195
+     * @param string $key
196
+     * @param string $value
197
+     */
194 198
     public function __construct($key, $value)
195 199
     {
196 200
         $this->key = $key;
@@ -237,6 +241,10 @@  discard block
 block discarded – undo
237 241
         return Result::success($this, '', $this->data);
238 242
     }
239 243
 
244
+    /**
245
+     * @param string $key
246
+     * @param string $value
247
+     */
240 248
     public function provideData($key, $value)
241 249
     {
242 250
         $this->data[$key] = $value;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
             ->completion($completion1)
103 103
             ->rollbackCode(function() use($rollback1) { $rollback1->run(); } )
104 104
             ->completionCode(function() use($completion1) { $completion1->run(); } )
105
-            ->addCode(function () { return 42; })
105
+            ->addCode(function() { return 42; })
106 106
             ->progressMessage("not reached")
107 107
             ->rollback($rollback2)
108 108
             ->completion($completion2)
109
-            ->addCode(function () { return 13; });
109
+            ->addCode(function() { return 13; });
110 110
 
111 111
         $collection->setLogger($this->guy->logger());
112 112
 
@@ -128,15 +128,15 @@  discard block
 block discarded – undo
128 128
 
129 129
         $result = $collection
130 130
             ->addCode(
131
-                function (ResultData $state) {
131
+                function(ResultData $state) {
132 132
                     $state['one'] = 'first';
133 133
                 })
134 134
             ->addCode(
135
-                function (ResultData $state) {
135
+                function(ResultData $state) {
136 136
                     $state['two'] = 'second';
137 137
                 })
138 138
             ->addCode(
139
-                function (ResultData $state) {
139
+                function(ResultData $state) {
140 140
                     $state['three'] = "{$state['one']} and {$state['two']}";
141 141
                 })
142 142
             ->run();
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             ->add($first)
160 160
             ->add($second)
161 161
             ->addCode(
162
-                function (ResultData $state) {
162
+                function(ResultData $state) {
163 163
                     $state['three'] = "{$state['one']} and {$state['two']}";
164 164
                 })
165 165
             ->run();
Please login to merge, or discard this patch.
tests/unit/Common/ResultDataTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@
 block discarded – undo
33 33
         $a = new ResultData(ResultData::EXITCODE_OK, '', ['one' => 'first', 'two' => 'second']);
34 34
 
35 35
         $to_be_merged = [
36
-            ['one' => 'ignored',],
37
-            ['three' => 'new',],
36
+            ['one' => 'ignored', ],
37
+            ['three' => 'new', ],
38 38
         ];
39 39
 
40 40
         foreach ($to_be_merged as $mergeThis) {
Please login to merge, or discard this patch.