Completed
Pull Request — master (#499)
by .
03:00
created
src/Runner.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     public function __construct($roboClass = null, $roboFile = null)
45 45
     {
46 46
         // set the const as class properties to allow overwriting in child classes
47
-        $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS ;
47
+        $this->roboClass = $roboClass ? $roboClass : self::ROBOCLASS;
48 48
         $this->roboFile  = $roboFile ? $roboFile : self::ROBOFILE;
49 49
         $this->dir = getcwd();
50 50
     }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         require_once $roboFilePath;
80 80
 
81 81
         if (!class_exists($this->roboClass)) {
82
-            $output->writeln("<error>Class ".$this->roboClass." was not loaded</error>");
82
+            $output->writeln("<error>Class " . $this->roboClass . " was not loaded</error>");
83 83
             return false;
84 84
         }
85 85
         return true;
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
 
299 299
         if (substr($argv[$pos], 0, 12) == '--load-from=') {
300 300
             $this->dir = substr($argv[$pos], 12);
301
-        } elseif (isset($argv[$pos +1])) {
302
-            $this->dir = $argv[$pos +1];
303
-            unset($argv[$pos +1]);
301
+        } elseif (isset($argv[$pos + 1])) {
302
+            $this->dir = $argv[$pos + 1];
303
+            unset($argv[$pos + 1]);
304 304
         }
305 305
         unset($argv[$pos]);
306 306
         // Make adjustments if '--load-from' points at a file.
Please login to merge, or discard this patch.
examples/RoboFile.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function tryWatch()
33 33
     {
34
-        $this->taskWatch()->monitor(['composer.json', 'composer.lock'], function () {
34
+        $this->taskWatch()->monitor(['composer.json', 'composer.lock'], function() {
35 35
             $this->taskComposerUpdate()->run();
36 36
         })->run();
37 37
     }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function tryInput()
43 43
     {
44 44
         $answer = $this->ask('how are you?');
45
-        $this->say('You are '.$answer);
45
+        $this->say('You are ' . $answer);
46 46
         $yes = $this->confirm('Do you want one more question?');
47 47
         if (!$yes) {
48 48
             return Result::cancelled();
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $lang = $this->askDefault('what is your favorite scripting language?', 'PHP');
51 51
         $this->say($lang);
52 52
         $pin = $this->askHidden('Ok, now tell your PIN code (it is hidden)');
53
-        $this->yell('Ha-ha, your pin code is: '.$pin);
53
+        $this->yell('Ha-ha, your pin code is: ' . $pin);
54 54
         $this->say('Bye!');
55 55
     }
56 56
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         // using yaml or json output formats.
175 175
         $data->addRendererFunction(
176 176
             // n.b. There is a fourth parameter $rowData that may be added here.
177
-            function ($key, $cellData, FormatterOptions $options) {
177
+            function($key, $cellData, FormatterOptions $options) {
178 178
                 if ($key == 'name') {
179 179
                     return "<info>$cellData</>";
180 180
                 }
@@ -204,10 +204,10 @@  discard block
 block discarded – undo
204 204
     public function tryFormatters($somthing = 'default', $options = ['format' => 'table', 'fields' => ''])
205 205
     {
206 206
         $outputData = [
207
-            'en' => [ 'first' => 'One',  'second' => 'Two',  'third' => 'Three' ],
208
-            'de' => [ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei'  ],
209
-            'jp' => [ 'first' => 'Ichi', 'second' => 'Ni',   'third' => 'San'   ],
210
-            'es' => [ 'first' => 'Uno',  'second' => 'Dos',  'third' => 'Tres'  ],
207
+            'en' => ['first' => 'One', 'second' => 'Two', 'third' => 'Three'],
208
+            'de' => ['first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei'],
209
+            'jp' => ['first' => 'Ichi', 'second' => 'Ni', 'third' => 'San'],
210
+            'es' => ['first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres'],
211 211
         ];
212 212
         return new RowsOfFields($outputData);
213 213
     }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     public function alterFormatters($result, CommandData $commandData)
223 223
     {
224 224
         if ($commandData->input()->getOption('french')) {
225
-            $result['fr'] = [ 'first' => 'Un',  'second' => 'Deux',  'third' => 'Trois'  ];
225
+            $result['fr'] = ['first' => 'Un', 'second' => 'Deux', 'third' => 'Trois'];
226 226
         }
227 227
 
228 228
         return $result;
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
             ->taskForEach($processList)
378 378
                 ->iterationMessage('Processing {value}')
379 379
                 ->call(
380
-                    function ($value) use($delay) {
380
+                    function($value) use($delay) {
381 381
                         // TaskForEach::call should only be used to do
382 382
                         // non-Robo operations. To use Robo tasks in an
383 383
                         // iterator, @see TaskForEach::withBuilder.
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
             ->taskCleanDir($workdir)
400 400
             ->taskForEach($processList)
401 401
                 ->withBuilder(
402
-                    function ($builder, $key, $value) use ($workdir) {
402
+                    function($builder, $key, $value) use ($workdir) {
403 403
                         return $builder
404 404
                             ->taskFilesystemStack()
405 405
                                 ->mkdir("$workdir/$value");
Please login to merge, or discard this patch.