Completed
Branch master (a69c65)
by Greg
04:32
created
examples/RoboFile.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -348,6 +348,9 @@
 block discarded – undo
348 348
 {
349 349
     protected $message;
350 350
 
351
+    /**
352
+     * @param string $message
353
+     */
351 354
     public function __construct($message)
352 355
     {
353 356
         $this->message = $message;
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      */
24 24
     public function tryWatch()
25 25
     {
26
-        $this->taskWatch()->monitor(['composer.json', 'composer.lock'], function () {
26
+        $this->taskWatch()->monitor(['composer.json', 'composer.lock'], function() {
27 27
             $this->taskComposerUpdate()->run();
28 28
         })->run();
29 29
     }
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function tryInput()
35 35
     {
36 36
         $answer = $this->ask('how are you?');
37
-        $this->say('You are '.$answer);
37
+        $this->say('You are ' . $answer);
38 38
         $yes = $this->confirm('Do you want one more question?');
39 39
         if (!$yes) {
40 40
             return Result::cancelled();
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $lang = $this->askDefault('what is your favorite scripting language?', 'PHP');
43 43
         $this->say($lang);
44 44
         $pin = $this->askHidden('Ok, now tell your PIN code (it is hidden)');
45
-        $this->yell('Ha-ha, your pin code is: '.$pin);
45
+        $this->yell('Ha-ha, your pin code is: ' . $pin);
46 46
         $this->say('Bye!');
47 47
     }
48 48
 
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
     public function tryFormatters($options = ['format' => 'table', 'fields' => ''])
155 155
     {
156 156
         $outputData = [
157
-            [ 'first' => 'One',  'second' => 'Two',  'third' => 'Three' ],
158
-            [ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei'  ],
159
-            [ 'first' => 'Ichi', 'second' => 'Ni',   'third' => 'San'   ],
160
-            [ 'first' => 'Uno',  'second' => 'Dos',  'third' => 'Tres'  ],
157
+            ['first' => 'One', 'second' => 'Two', 'third' => 'Three'],
158
+            ['first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei'],
159
+            ['first' => 'Ichi', 'second' => 'Ni', 'third' => 'San'],
160
+            ['first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres'],
161 161
         ];
162 162
         // Note that we can also simply return the output data array here.
163 163
         return ResultData::message(new RowsOfFields($outputData));
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
             ->taskForEach($processList)
313 313
                 ->iterationMessage('Processing {value}')
314 314
                 ->call(
315
-                    function ($value) use($delay) {
315
+                    function($value) use($delay) {
316 316
                         // TaskForEach::call should only be used to do
317 317
                         // non-Robo operations. To use Robo tasks in an
318 318
                         // iterator, @see TaskForEach::withBuilder.
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             ->taskCleanDir($workdir)
335 335
             ->taskForEach($processList)
336 336
                 ->withBuilder(
337
-                    function ($builder, $key, $value) use ($workdir) {
337
+                    function($builder, $key, $value) use ($workdir) {
338 338
                         return $builder
339 339
                             ->taskFilesystemStack()
340 340
                                 ->mkdir("$workdir/$value");
Please login to merge, or discard this patch.
src/Collection/Collection.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -171,6 +171,8 @@  discard block
 block discarded – undo
171 171
 
172 172
     /**
173 173
      * Add either a 'before' or 'after' function or task.
174
+     * @param string $method
175
+     * @param integer $nameOfTaskToAdd
174 176
      */
175 177
     protected function addBeforeOrAfter($method, $name, $task, $nameOfTaskToAdd)
176 178
     {
@@ -276,6 +278,7 @@  discard block
 block discarded – undo
276 278
 
277 279
     /**
278 280
      * Add the provided task to our task list.
281
+     * @param integer $name
279 282
      */
280 283
     protected function addToTaskList($name, TaskInterface $task)
281 284
     {
@@ -548,6 +551,9 @@  discard block
 block discarded – undo
548 551
         return $taskResult;
549 552
     }
550 553
 
554
+    /**
555
+     * @param CollectionInterface $parentCollection
556
+     */
551 557
     protected function setParentCollectionForTask($task, $parentCollection)
552 558
     {
553 559
         if ($task instanceof NestedCollectionInterface) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $collection = $this;
109 109
         $completionRegistrationTask = new CallableTask(
110
-            function () use ($collection, $completionTask) {
110
+            function() use ($collection, $completionTask) {
111 111
 
112 112
                 $collection->registerCompletion($completionTask);
113 113
             },
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         $context += ['name' => 'Progress'];
151 151
         $context += TaskInfo::getTaskContext($this);
152 152
         return $this->addCode(
153
-            function () use ($level, $text, $context) {
153
+            function() use ($level, $text, $context) {
154 154
                 $this->printTaskOutput($level, $text, $context);
155 155
             }
156 156
         );
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     {
161 161
         $collection = $this;
162 162
         $rollbackRegistrationTask = new CallableTask(
163
-            function () use ($collection, $rollbackTask) {
163
+            function() use ($collection, $rollbackTask) {
164 164
                 $collection->registerRollback($rollbackTask);
165 165
             },
166 166
             $this
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         if ($task instanceof StackBasedTask) {
203 203
             $task->stopOnFail(false);
204 204
         }
205
-        $ignoreErrorsInTask = function () use ($task) {
205
+        $ignoreErrorsInTask = function() use ($task) {
206 206
             $data = [];
207 207
             try {
208 208
                 $result = $this->runSubtask($task);
Please login to merge, or discard this patch.
src/Collection/CollectionBuilder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
 
206 206
     /**
207 207
      * Create a new builder with its own task collection
208
-     * @return type
208
+     * @return CollectionBuilder
209 209
      */
210 210
     public function newBuilder()
211 211
     {
Please login to merge, or discard this patch.
src/Common/CommandArguments.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
     /**
14 14
      * Pass argument to executable. Its value will be automatically escaped.
15 15
      *
16
-     * @param $arg
16
+     * @param string $arg
17 17
      * @return $this
18 18
      */
19 19
     public function arg($arg)
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * Pass multiple options to executable. Value can be a string or array.
87 87
      * Option values are automatically escaped.
88 88
      *
89
-     * @param $option
89
+     * @param string $option
90 90
      * @param string|array $value
91 91
      * @return $this
92 92
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             $args = func_get_args();
35 35
         }
36 36
         array_map('static::escape', $args);
37
-        $this->arguments .= " ".implode(' ', $args);
37
+        $this->arguments .= " " . implode(' ', $args);
38 38
         return $this;
39 39
     }
40 40
 
Please login to merge, or discard this patch.
src/Common/ResourceExistenceChecker.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      *
43 43
      * @param string $resource File or folder.
44 44
      * @param string $type "file", "dir", "fileAndDir"
45
-     * @return boolean
45
+     * @return boolean|null
46 46
      */
47 47
     protected function checkResource($resource, $type)
48 48
     {
Please login to merge, or discard this patch.
src/Common/TaskIO.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -85,6 +85,7 @@  discard block
 block discarded – undo
85 85
      * execution can continue.
86 86
      *
87 87
      * Warning messages are displayed at VERBOSITY_NORMAL.
88
+     * @param string $text
88 89
      */
89 90
     protected function printTaskWarning($text, $context = null)
90 91
     {
@@ -96,6 +97,7 @@  discard block
 block discarded – undo
96 97
      * and the task cannot continue.
97 98
      *
98 99
      * Error messages are displayed at VERBOSITY_NORMAL.
100
+     * @param string $text
99 101
      */
100 102
     protected function printTaskError($text, $context = null)
101 103
     {
@@ -148,6 +150,7 @@  discard block
 block discarded – undo
148 150
 
149 151
     /**
150 152
      * Format a quantity of bytes.
153
+     * @param integer $size
151 154
      */
152 155
     protected function formatBytes($size, $precision = 2)
153 156
     {
Please login to merge, or discard this patch.
src/Log/ResultPrinter.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -81,6 +81,9 @@
 block discarded – undo
81 81
         return false;
82 82
     }
83 83
 
84
+    /**
85
+     * @param string $message
86
+     */
84 87
     protected function printMessage($level, $message, $context = [])
85 88
     {
86 89
         $inProgress = $this->hideProgressIndicator();
Please login to merge, or discard this patch.
src/Result.php 2 patches
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -37,6 +37,10 @@  discard block
 block discarded – undo
37 37
         }
38 38
     }
39 39
 
40
+    /**
41
+     * @param string $extension
42
+     * @param string $service
43
+     */
40 44
     public static function errorMissingExtension(TaskInterface $task, $extension, $service)
41 45
     {
42 46
         $messageTpl = 'PHP extension required for %s. Please enable %s';
@@ -45,6 +49,10 @@  discard block
 block discarded – undo
45 49
         return self::error($task, $message);
46 50
     }
47 51
 
52
+    /**
53
+     * @param string $class
54
+     * @param string $package
55
+     */
48 56
     public static function errorMissingPackage(TaskInterface $task, $class, $package)
49 57
     {
50 58
         $messageTpl = 'Class %s not found. Please install %s Composer package';
@@ -155,6 +163,9 @@  discard block
 block discarded – undo
155 163
         return $this;
156 164
     }
157 165
 
166
+    /**
167
+     * @param integer $status
168
+     */
158 169
     private function exitEarly($status)
159 170
     {
160 171
         throw new TaskExitException($this->getTask(), $this->getMessage(), $status);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
 
131 131
     public function cloneTask()
132 132
     {
133
-        $reflect  = new \ReflectionClass(get_class($this->task));
133
+        $reflect = new \ReflectionClass(get_class($this->task));
134 134
         return $reflect->newInstanceArgs(func_get_args());
135 135
     }
136 136
 
Please login to merge, or discard this patch.
src/Robo.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -175,6 +175,7 @@
 block discarded – undo
175 175
 
176 176
     /**
177 177
      * Add the Robo League\Container inflectors to the container
178
+     * @param ContainerInterface $container
178 179
      */
179 180
     public static function addInflectors($container)
180 181
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
             ->withMethodCall(
144 144
                 'setDisplayErrorFunction',
145 145
                 [
146
-                    function ($output, $message) use ($container) {
146
+                    function($output, $message) use ($container) {
147 147
                         $logger = $container->get('logger');
148 148
                         $logger->error($message);
149 149
                     }
Please login to merge, or discard this patch.