@@ -348,6 +348,9 @@ |
||
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; |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | use Robo\Result; |
3 | - |
|
4 | 3 | use Consolidation\AnnotatedCommand\CommandData; |
5 | 4 | use Consolidation\OutputFormatters\Options\FormatterOptions; |
6 | 5 | use Consolidation\OutputFormatters\StructuredData\RowsOfFields; |
@@ -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 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | { |
42 | 42 | $this->say('The <b>expression</b> <bogus>is</bogus> <info>a < b</> it even works'); |
43 | 43 | $answer = $this->ask('how are you?'); |
44 | - $this->say('You are '.$answer); |
|
44 | + $this->say('You are ' . $answer); |
|
45 | 45 | $yes = $this->confirm('Do you want one more question?'); |
46 | 46 | if (!$yes) { |
47 | 47 | return Result::cancelled(); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $lang = $this->askDefault('what is your favorite scripting language?', 'PHP'); |
50 | 50 | $this->say($lang); |
51 | 51 | $pin = $this->askHidden('Ok, now tell your PIN code (it is hidden)'); |
52 | - $this->yell('Ha-ha, your pin code is: '.$pin); |
|
52 | + $this->yell('Ha-ha, your pin code is: ' . $pin); |
|
53 | 53 | $this->say('Bye!'); |
54 | 54 | } |
55 | 55 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | // using yaml or json output formats. |
174 | 174 | $data->addRendererFunction( |
175 | 175 | // n.b. There is a fourth parameter $rowData that may be added here. |
176 | - function ($key, $cellData, FormatterOptions $options) { |
|
176 | + function($key, $cellData, FormatterOptions $options) { |
|
177 | 177 | if ($key == 'name') { |
178 | 178 | return "<info>$cellData</>"; |
179 | 179 | } |
@@ -203,10 +203,10 @@ discard block |
||
203 | 203 | public function tryFormatters($somthing = 'default', $options = ['format' => 'table', 'fields' => '']) |
204 | 204 | { |
205 | 205 | $outputData = [ |
206 | - 'en' => [ 'first' => 'One', 'second' => 'Two', 'third' => 'Three' ], |
|
207 | - 'de' => [ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei' ], |
|
208 | - 'jp' => [ 'first' => 'Ichi', 'second' => 'Ni', 'third' => 'San' ], |
|
209 | - 'es' => [ 'first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres' ], |
|
206 | + 'en' => ['first' => 'One', 'second' => 'Two', 'third' => 'Three'], |
|
207 | + 'de' => ['first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei'], |
|
208 | + 'jp' => ['first' => 'Ichi', 'second' => 'Ni', 'third' => 'San'], |
|
209 | + 'es' => ['first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres'], |
|
210 | 210 | ]; |
211 | 211 | return new RowsOfFields($outputData); |
212 | 212 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | public function alterFormatters($result, CommandData $commandData) |
242 | 242 | { |
243 | 243 | if ($commandData->input()->getOption('french')) { |
244 | - $result['fr'] = [ 'first' => 'Un', 'second' => 'Deux', 'third' => 'Trois' ]; |
|
244 | + $result['fr'] = ['first' => 'Un', 'second' => 'Deux', 'third' => 'Trois']; |
|
245 | 245 | } |
246 | 246 | |
247 | 247 | return $result; |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | ->taskForEach($processList) |
397 | 397 | ->iterationMessage('Processing {value}') |
398 | 398 | ->call( |
399 | - function ($value) use($delay) { |
|
399 | + function($value) use($delay) { |
|
400 | 400 | // TaskForEach::call should only be used to do |
401 | 401 | // non-Robo operations. To use Robo tasks in an |
402 | 402 | // iterator, @see TaskForEach::withBuilder. |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | ->taskCleanDir($workdir) |
419 | 419 | ->taskForEach($processList) |
420 | 420 | ->withBuilder( |
421 | - function ($builder, $key, $value) use ($workdir) { |
|
421 | + function($builder, $key, $value) use ($workdir) { |
|
422 | 422 | return $builder |
423 | 423 | ->taskFilesystemStack() |
424 | 424 | ->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 | } |
@@ -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 |
@@ -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) { |
@@ -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'"); |
@@ -112,7 +112,7 @@ |
||
112 | 112 | */ |
113 | 113 | public function place($name, $val) |
114 | 114 | { |
115 | - $this->replace('{'.$name.'}', $val); |
|
115 | + $this->replace('{' . $name . '}', $val); |
|
116 | 116 | |
117 | 117 | return $this; |
118 | 118 | } |
@@ -218,7 +218,7 @@ |
||
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 | /** |
@@ -299,7 +299,7 @@ discard block |
||
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 |
||
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 |
||
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() |
@@ -94,7 +94,7 @@ |
||
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 |