Completed
Pull Request — master (#499)
by .
04:13 queued 50s
created
src/Task/Assets/Minify.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@
 block discarded – undo
218 218
      */
219 219
     public function __toString()
220 220
     {
221
-        return (string) $this->getMinifiedText();
221
+        return (string)$this->getMinifiedText();
222 222
     }
223 223
 
224 224
     /**
Please login to merge, or discard this patch.
src/Task/Assets/ImageMinify.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -182,12 +182,12 @@  discard block
 block discarded – undo
182 182
         // guess the best path for the executables based on __DIR__
183 183
         if (($pos = strpos(__DIR__, 'consolidation/robo')) !== false) {
184 184
             // the executables should be stored in vendor/bin
185
-            $this->executableTargetDir = substr(__DIR__, 0, $pos).'bin';
185
+            $this->executableTargetDir = substr(__DIR__, 0, $pos) . 'bin';
186 186
         }
187 187
 
188 188
         // check if the executables are already available
189 189
         foreach ($this->imageminRepos as $exec => $url) {
190
-            $path = $this->executableTargetDir.'/'.$exec;
190
+            $path = $this->executableTargetDir . '/' . $exec;
191 191
             // if this is Windows add a .exe extension
192 192
             if (substr($this->getOS(), 0, 3) == 'win') {
193 193
                 $path .= '.exe';
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             } catch (\InvalidArgumentException $e) {
280 280
                 // if finder cannot handle it, try with in()->name()
281 281
                 if (strpos($dir, '/') === false) {
282
-                    $dir = './'.$dir;
282
+                    $dir = './' . $dir;
283 283
                 }
284 284
                 $parts = explode('/', $dir);
285 285
                 $new_dir = implode('/', array_slice($parts, 0, -1));
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 
304 304
     protected function getTarget($file, $to)
305 305
     {
306
-        $target = $to.'/'.basename($file);
306
+        $target = $to . '/' . basename($file);
307 307
 
308 308
         return $target;
309 309
     }
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
     protected function getOS()
409 409
     {
410 410
         $os = php_uname('s');
411
-        $os .= '/'.php_uname('m');
411
+        $os .= '/' . php_uname('m');
412 412
         // replace x86_64 to x64, because the imagemin repo uses that
413 413
         $os = str_replace('x86_64', 'x64', $os);
414 414
         // replace i386, i686, etc to x86, because of imagemin
@@ -458,10 +458,10 @@  discard block
 block discarded – undo
458 458
         $this->printTaskInfo('Downloading the {executable} executable from the imagemin repository', ['executable' => $executable]);
459 459
 
460 460
         $os = $this->getOS();
461
-        $url = $this->imageminRepos[$executable].'/blob/master/vendor/'.$os.'/'.$executable.'?raw=true';
461
+        $url = $this->imageminRepos[$executable] . '/blob/master/vendor/' . $os . '/' . $executable . '?raw=true';
462 462
         if (substr($os, 0, 3) == 'win') {
463 463
             // if it is win, add a .exe extension
464
-            $url = $this->imageminRepos[$executable].'/blob/master/vendor/'.$os.'/'.$executable.'.exe?raw=true';
464
+            $url = $this->imageminRepos[$executable] . '/blob/master/vendor/' . $os . '/' . $executable . '.exe?raw=true';
465 465
         }
466 466
         $data = @file_get_contents($url, false, null);
467 467
         if ($data === false) {
@@ -491,10 +491,10 @@  discard block
 block discarded – undo
491 491
             mkdir($this->executableTargetDir);
492 492
         }
493 493
         // save the executable into the target dir
494
-        $path = $this->executableTargetDir.'/'.$executable;
494
+        $path = $this->executableTargetDir . '/' . $executable;
495 495
         if (substr($os, 0, 3) == 'win') {
496 496
             // if it is win, add a .exe extension
497
-            $path = $this->executableTargetDir.'/'.$executable.'.exe';
497
+            $path = $this->executableTargetDir . '/' . $executable . '.exe';
498 498
         }
499 499
         $result = file_put_contents($path, $data);
500 500
         if ($result === false) {
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
         chmod($path, 0755);
507 507
 
508 508
         // if everything successful, store the executable path
509
-        $this->executablePaths[$executable] = $this->executableTargetDir.'/'.$executable;
509
+        $this->executablePaths[$executable] = $this->executableTargetDir . '/' . $executable;
510 510
         // if it is win, add a .exe extension
511 511
         if (substr($os, 0, 3) == 'win') {
512 512
             $this->executablePaths[$executable] .= '.exe';
Please login to merge, or discard this patch.
src/Task/Docker/Exec.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,6 +61,6 @@
 block discarded – undo
61 61
 
62 62
     public function getCommand()
63 63
     {
64
-        return $this->command . ' ' . $this->arguments . ' ' . $this->cid.' '.$this->run;
64
+        return $this->command . ' ' . $this->arguments . ' ' . $this->cid . ' ' . $this->run;
65 65
     }
66 66
 }
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     protected $run = '';
48 48
 
49 49
     /**
50
-     * @param string|\Robo\Result $cidOrResult
50
+     * @param string $cidOrResult
51 51
      */
52 52
     public function __construct($cidOrResult)
53 53
     {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     }
74 74
 
75 75
     /**
76
-     * @param string|\Robo\Contract\CommandInterface $command
76
+     * @param string $command
77 77
      *
78 78
      * @return $this
79 79
      */
Please login to merge, or discard this patch.
src/Task/Development/Changelog.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
         $text = implode(
102 102
             "\n",
103 103
             array_map(
104
-                function ($i) {
104
+                function($i) {
105 105
                         return "* $i *" . date('Y-m-d') . "*";
106 106
                 },
107 107
                 $this->log
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 namespace Robo\Task\Development;
3 3
 
4 4
 use Robo\Task\BaseTask;
5
-use Robo\Task\File\Replace;
6
-use Robo\Task\Filesystem;
7 5
 use Robo\Result;
8 6
 use Robo\Task\Development;
9 7
 use Robo\Contract\BuilderAwareInterface;
Please login to merge, or discard this patch.
src/Task/Development/OpenBrowser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
     public function __construct($url)
31 31
     {
32
-        $this->urls = (array) $url;
32
+        $this->urls = (array)$url;
33 33
     }
34 34
 
35 35
     public function run()
Please login to merge, or discard this patch.
src/Task/Development/GenerateMarkdownDoc.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 
300 300
         $methods = array_filter($methods);
301 301
 
302
-        $doc .= implode("\n", $methods)."\n";
302
+        $doc .= implode("\n", $methods) . "\n";
303 303
 
304 304
         return $doc;
305 305
     }
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
         return implode(
457 457
             "\n",
458 458
             array_map(
459
-                function ($line) use ($indent) {
459
+                function($line) use ($indent) {
460 460
                     return substr($line, $indent);
461 461
                 },
462 462
                 explode("\n", $doc)
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
         $params = implode(
474 474
             ', ',
475 475
             array_map(
476
-                function ($p) {
476
+                function($p) {
477 477
                     return $this->documentParam($p);
478 478
                 },
479 479
                 $reflectedMethod->getParameters()
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 namespace Robo\Task\Development;
3 3
 
4 4
 use Robo\Task\BaseTask;
5
-use Robo\Task\File\Write;
6
-use Robo\Task\Filesystem;
7 5
 use Robo\Result;
8 6
 use Robo\Task\Development;
9 7
 use Robo\Contract\BuilderAwareInterface;
Please login to merge, or discard this patch.
src/Task/Development/GitHubRelease.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
         $body = $this->description;
95 95
         if (!empty($this->changes)) {
96 96
             $changes = array_map(
97
-                function ($line) {
97
+                function($line) {
98 98
                     return "* $line";
99 99
                 },
100 100
                 $this->changes
Please login to merge, or discard this patch.
src/Application.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@
 block discarded – undo
31 31
     {
32 32
         $createRoboFile = new Command('init');
33 33
         $createRoboFile->setDescription("Intitalizes basic RoboFile in current dir");
34
-        $createRoboFile->setCode(function () use ($roboClass, $roboFile) {
34
+        $createRoboFile->setCode(function() use ($roboClass, $roboFile) {
35 35
             $output = Robo::output();
36 36
             $output->writeln("<comment>  ~~~ Welcome to Robo! ~~~~ </comment>");
37
-            $output->writeln("<comment>  ". basename($roboFile) ." will be created in the current directory </comment>");
37
+            $output->writeln("<comment>  " . basename($roboFile) . " will be created in the current directory </comment>");
38 38
             file_put_contents(
39 39
                 $roboFile,
40 40
                 '<?php'
Please login to merge, or discard this patch.
src/Robo.php 2 patches
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.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -258,7 +258,7 @@
 block discarded – undo
258 258
      * @param string $id
259 259
      *   The ID of the service to retrieve.
260 260
      *
261
-     * @return mixed
261
+     * @return \Symfony\Component\Console\Output\OutputInterface
262 262
      *   The specified service.
263 263
      */
264 264
     public static function service($id)
Please login to merge, or discard this patch.