@@ -15,7 +15,7 @@ |
||
| 15 | 15 | */ |
| 16 | 16 | class RoboFile extends \Robo\Tasks |
| 17 | 17 | { |
| 18 | - /** |
|
| 18 | + /** |
|
| 19 | 19 | * Watch a file. |
| 20 | 20 | * |
| 21 | 21 | * Demonstrates the 'watch' command. Runs 'composer update' any time |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function tryWatch() |
| 31 | 31 | { |
| 32 | - $this->taskWatch()->monitor(['composer.json', 'composer.lock'], function () { |
|
| 32 | + $this->taskWatch()->monitor(['composer.json', 'composer.lock'], function() { |
|
| 33 | 33 | $this->taskComposerUpdate()->run(); |
| 34 | 34 | })->run(); |
| 35 | 35 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | public function tryInput() |
| 41 | 41 | { |
| 42 | 42 | $answer = $this->ask('how are you?'); |
| 43 | - $this->say('You are '.$answer); |
|
| 43 | + $this->say('You are ' . $answer); |
|
| 44 | 44 | $yes = $this->confirm('Do you want one more question?'); |
| 45 | 45 | if (!$yes) { |
| 46 | 46 | return Result::cancelled(); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $lang = $this->askDefault('what is your favorite scripting language?', 'PHP'); |
| 49 | 49 | $this->say($lang); |
| 50 | 50 | $pin = $this->askHidden('Ok, now tell your PIN code (it is hidden)'); |
| 51 | - $this->yell('Ha-ha, your pin code is: '.$pin); |
|
| 51 | + $this->yell('Ha-ha, your pin code is: ' . $pin); |
|
| 52 | 52 | $this->say('Bye!'); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -164,10 +164,10 @@ discard block |
||
| 164 | 164 | public function tryFormatters($somthing = 'default', $options = ['format' => 'table', 'fields' => '']) |
| 165 | 165 | { |
| 166 | 166 | $outputData = [ |
| 167 | - 'en' => [ 'first' => 'One', 'second' => 'Two', 'third' => 'Three' ], |
|
| 168 | - 'de' => [ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei' ], |
|
| 169 | - 'jp' => [ 'first' => 'Ichi', 'second' => 'Ni', 'third' => 'San' ], |
|
| 170 | - 'es' => [ 'first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres' ], |
|
| 167 | + 'en' => ['first' => 'One', 'second' => 'Two', 'third' => 'Three'], |
|
| 168 | + 'de' => ['first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei'], |
|
| 169 | + 'jp' => ['first' => 'Ichi', 'second' => 'Ni', 'third' => 'San'], |
|
| 170 | + 'es' => ['first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres'], |
|
| 171 | 171 | ]; |
| 172 | 172 | return new RowsOfFields($outputData); |
| 173 | 173 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | public function alterFormatters($result, array $args, AnnotationData $annotationData) |
| 183 | 183 | { |
| 184 | 184 | if ($args['options']['french']) { |
| 185 | - $result['fr'] = [ 'first' => 'Un', 'second' => 'Deux', 'third' => 'Trois' ]; |
|
| 185 | + $result['fr'] = ['first' => 'Un', 'second' => 'Deux', 'third' => 'Trois']; |
|
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | return $result; |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | ->taskForEach($processList) |
| 338 | 338 | ->iterationMessage('Processing {value}') |
| 339 | 339 | ->call( |
| 340 | - function ($value) use($delay) { |
|
| 340 | + function($value) use($delay) { |
|
| 341 | 341 | // TaskForEach::call should only be used to do |
| 342 | 342 | // non-Robo operations. To use Robo tasks in an |
| 343 | 343 | // iterator, @see TaskForEach::withBuilder. |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | ->taskCleanDir($workdir) |
| 360 | 360 | ->taskForEach($processList) |
| 361 | 361 | ->withBuilder( |
| 362 | - function ($builder, $key, $value) use ($workdir) { |
|
| 362 | + function($builder, $key, $value) use ($workdir) { |
|
| 363 | 363 | return $builder |
| 364 | 364 | ->taskFilesystemStack() |
| 365 | 365 | ->mkdir("$workdir/$value"); |
@@ -53,6 +53,6 @@ |
||
| 53 | 53 | if ($duration > self::MINUTE) { |
| 54 | 54 | return gmdate("i:s", $duration); |
| 55 | 55 | } |
| 56 | - return round($duration, 3).'s'; |
|
| 56 | + return round($duration, 3) . 's'; |
|
| 57 | 57 | } |
| 58 | 58 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | protected function findProjectBin() |
| 103 | 103 | { |
| 104 | - $candidates = [ __DIR__ . '/../../vendor/bin', __DIR__ . '/../../bin' ]; |
|
| 104 | + $candidates = [__DIR__ . '/../../vendor/bin', __DIR__ . '/../../bin']; |
|
| 105 | 105 | |
| 106 | 106 | // If this project is inside a vendor directory, give highest priority |
| 107 | 107 | // to that directory. |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } |
| 146 | 146 | $this->getExecTimer()->start(); |
| 147 | 147 | if ($this->isPrinted) { |
| 148 | - $process->run(function ($type, $buffer) { |
|
| 148 | + $process->run(function($type, $buffer) { |
|
| 149 | 149 | print $buffer; |
| 150 | 150 | }); |
| 151 | 151 | } else { |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | public function __call($property, $args) |
| 15 | 15 | { |
| 16 | 16 | if (!property_exists($this, $property)) { |
| 17 | - throw new \RuntimeException("Property $property in task ".get_class($this).' does not exists'); |
|
| 17 | + throw new \RuntimeException("Property $property in task " . get_class($this) . ' does not exists'); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | // toggle boolean values |
@@ -223,6 +223,6 @@ |
||
| 223 | 223 | |
| 224 | 224 | protected static function getTmpDir() |
| 225 | 225 | { |
| 226 | - return getcwd().'/tmp'.rand().time(); |
|
| 226 | + return getcwd() . '/tmp' . rand() . time(); |
|
| 227 | 227 | } |
| 228 | 228 | } |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | if ($p->getExitCode() === 0) { |
| 120 | 120 | continue; |
| 121 | 121 | } |
| 122 | - $errorMessage .= "'" . $p->getCommandLine() . "' exited with code ". $p->getExitCode()." \n"; |
|
| 122 | + $errorMessage .= "'" . $p->getCommandLine() . "' exited with code " . $p->getExitCode() . " \n"; |
|
| 123 | 123 | $exitCode = max($exitCode, $p->getExitCode()); |
| 124 | 124 | } |
| 125 | 125 | if (!$errorMessage) { |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | if (!$this->background and $this->isPrinted) { |
| 145 | 145 | $this->startTimer(); |
| 146 | 146 | $this->process->run( |
| 147 | - function ($type, $buffer) { |
|
| 147 | + function($type, $buffer) { |
|
| 148 | 148 | $progressWasVisible = $this->hideTaskProgress(); |
| 149 | 149 | print($buffer); |
| 150 | 150 | $this->showTaskProgress($progressWasVisible); |
@@ -73,7 +73,6 @@ |
||
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | 75 | * Path to the bootstrap file. |
| 76 | - |
|
| 77 | 76 | * @param $file |
| 78 | 77 | * |
| 79 | 78 | * @return $this |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | return $this->shortenParameter(var_export($item, true)); |
| 97 | 97 | } |
| 98 | 98 | if (is_object($item)) { |
| 99 | - return '[' . get_class($item). ' object]'; |
|
| 99 | + return '[' . get_class($item) . ' object]'; |
|
| 100 | 100 | } |
| 101 | 101 | if (is_string($item)) { |
| 102 | 102 | return $this->shortenParameter("'$item'"); |