@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | public function getProvidedOption(string $key) { |
126 | - if($this->optionResult !== null) { |
|
126 | + if ($this->optionResult !== null) { |
|
127 | 127 | return $this->optionResult->get($key); |
128 | 128 | } |
129 | 129 | return null; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | public function getOptionCollection(): OptionCollection { |
163 | 163 | |
164 | - if($this->optionCollection !== null) { |
|
164 | + if ($this->optionCollection !== null) { |
|
165 | 165 | return $this->optionCollection; |
166 | 166 | } |
167 | 167 | |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | public function handleOptionParseException(): bool { |
187 | 187 | |
188 | - if($this->optionParseException === null) { |
|
188 | + if ($this->optionParseException === null) { |
|
189 | 189 | return false; |
190 | 190 | } |
191 | 191 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | foreach ($oc->options as $option) { |
248 | 248 | |
249 | 249 | $s = ' '; |
250 | - if(!empty($option->short)) { |
|
250 | + if (!empty($option->short)) { |
|
251 | 251 | $s = '-' . $option->short . ', '; |
252 | 252 | } |
253 | 253 | $s .= '--' . $option->long; |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | App::eol(); |
271 | 271 | } |
272 | 272 | |
273 | - if($has_subcommands) { |
|
273 | + if ($has_subcommands) { |
|
274 | 274 | |
275 | 275 | App::eol(); |
276 | 276 | App::echo('Available commands: ', Color::FOREGROUND_COLOR_YELLOW); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | if ($cmd !== null) { |
20 | 20 | |
21 | - if($cmd->handleOptionParseException()) { |
|
21 | + if ($cmd->handleOptionParseException()) { |
|
22 | 22 | return; |
23 | 23 | } |
24 | 24 |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | 'isa' => 'string', |
22 | 22 | 'default' => 'World' |
23 | 23 | ]) |
24 | - ->setCallable(static function (Cmd $cmd) { |
|
24 | + ->setCallable(static function(Cmd $cmd) { |
|
25 | 25 | |
26 | 26 | $name = $cmd->getProvidedOption('name'); |
27 | 27 | |
@@ -29,20 +29,20 @@ discard block |
||
29 | 29 | self::echo(sprintf('Hello %s', $name), Color::FOREGROUND_COLOR_YELLOW); |
30 | 30 | self::eol(); |
31 | 31 | |
32 | - if($cmd->hasProvidedOption('verbose')) { |
|
32 | + if ($cmd->hasProvidedOption('verbose')) { |
|
33 | 33 | $keys = array_keys($cmd->optionResult->keys); |
34 | 34 | self::eol(); |
35 | 35 | self::echo('--- VERBOSE OUTPUT ---' . APP::EOL, Color::FOREGROUND_COLOR_GREEN); |
36 | 36 | self::eol(); |
37 | 37 | self::echo(' All current options...' . APP::EOL, Color::FOREGROUND_COLOR_GREEN); |
38 | - foreach($keys as $k) { |
|
38 | + foreach ($keys as $k) { |
|
39 | 39 | self::echo(' ' . $k . ': ' . $cmd->optionResult->get($k) . APP::EOL, Color::FOREGROUND_COLOR_GREEN); |
40 | 40 | } |
41 | 41 | self::eol(); |
42 | 42 | |
43 | 43 | self::echo(' All current arguments...' . APP::EOL, Color::FOREGROUND_COLOR_GREEN); |
44 | 44 | $args = $cmd->arguments; |
45 | - foreach($args as $a) { |
|
45 | + foreach ($args as $a) { |
|
46 | 46 | self::echo(' ' . $a . APP::EOL, Color::FOREGROUND_COLOR_GREEN); |
47 | 47 | } |
48 | 48 |