@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class RuntimeException |
| 39 | 39 | * @package Platine\Console\Exception |
| 40 | 40 | */ |
| 41 | -class RuntimeException extends ConsoleException |
|
| 42 | -{ |
|
| 41 | +class RuntimeException extends ConsoleException { |
|
| 43 | 42 | } |
@@ -40,6 +40,5 @@ |
||
| 40 | 40 | * Class ConsoleException |
| 41 | 41 | * @package Platine\Console\Exception |
| 42 | 42 | */ |
| 43 | -class ConsoleException extends Exception |
|
| 44 | -{ |
|
| 43 | +class ConsoleException extends Exception { |
|
| 45 | 44 | } |
@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class InvalidParameterException |
| 39 | 39 | * @package Platine\Console\Exception |
| 40 | 40 | */ |
| 41 | -class InvalidParameterException extends ConsoleException |
|
| 42 | -{ |
|
| 41 | +class InvalidParameterException extends ConsoleException { |
|
| 43 | 42 | } |
@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class InvalidArgumentException |
| 39 | 39 | * @package Platine\Console\Exception |
| 40 | 40 | */ |
| 41 | -class InvalidArgumentException extends ConsoleException |
|
| 42 | -{ |
|
| 41 | +class InvalidArgumentException extends ConsoleException { |
|
| 43 | 42 | } |
@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | * Class Shell |
| 55 | 55 | * @package Platine\Console\Command |
| 56 | 56 | */ |
| 57 | -class Shell |
|
| 58 | -{ |
|
| 57 | +class Shell { |
|
| 59 | 58 | public const STDIN_DESCRIPTOR = 0; |
| 60 | 59 | public const STDOUT_DESCRIPTOR = 1; |
| 61 | 60 | public const STDERR_DESCRIPTOR = 2; |
@@ -152,8 +151,7 @@ discard block |
||
| 152 | 151 | /** |
| 153 | 152 | * Create new instance |
| 154 | 153 | */ |
| 155 | - public function __construct() |
|
| 156 | - { |
|
| 154 | + public function __construct() { |
|
| 157 | 155 | if (!function_exists('proc_open')) { |
| 158 | 156 | throw new RuntimeException( |
| 159 | 157 | 'The "proc_open" could not be found in your PHP setup' |
@@ -52,8 +52,7 @@ |
||
| 52 | 52 | * Class Argument |
| 53 | 53 | * @package Platine\Console\Input |
| 54 | 54 | */ |
| 55 | -class Argument extends Parameter |
|
| 56 | -{ |
|
| 55 | +class Argument extends Parameter { |
|
| 57 | 56 | /** |
| 58 | 57 | * {@inheritdoc} |
| 59 | 58 | */ |
@@ -54,8 +54,7 @@ discard block |
||
| 54 | 54 | * Class Parameter |
| 55 | 55 | * @package Platine\Console\Input |
| 56 | 56 | */ |
| 57 | -abstract class Parameter |
|
| 58 | -{ |
|
| 57 | +abstract class Parameter { |
|
| 59 | 58 | /** |
| 60 | 59 | * The name of the parameter |
| 61 | 60 | * @var string |
@@ -182,8 +181,7 @@ discard block |
||
| 182 | 181 | * Return the parameter default value |
| 183 | 182 | * @return mixed |
| 184 | 183 | */ |
| 185 | - public function getDefault() |
|
| 186 | - { |
|
| 184 | + public function getDefault() { |
|
| 187 | 185 | if ($this->isVariadic()) { |
| 188 | 186 | return (array) $this->default; |
| 189 | 187 | } |
@@ -233,8 +231,7 @@ discard block |
||
| 233 | 231 | * @param mixed $raw |
| 234 | 232 | * @return mixed |
| 235 | 233 | */ |
| 236 | - public function filter($raw) |
|
| 237 | - { |
|
| 234 | + public function filter($raw) { |
|
| 238 | 235 | if ($this->filter !== null) { |
| 239 | 236 | $callback = $this->filter; |
| 240 | 237 | |
@@ -56,8 +56,7 @@ discard block |
||
| 56 | 56 | * Class Parser |
| 57 | 57 | * @package Platine\Console\Input |
| 58 | 58 | */ |
| 59 | -abstract class Parser |
|
| 60 | -{ |
|
| 59 | +abstract class Parser { |
|
| 61 | 60 | /** |
| 62 | 61 | * The last seen variadic option name |
| 63 | 62 | * @var string|null |
@@ -189,8 +188,7 @@ discard block |
||
| 189 | 188 | * @param string $arg |
| 190 | 189 | * @return mixed |
| 191 | 190 | */ |
| 192 | - protected function parseArgument(string $arg) |
|
| 193 | - { |
|
| 191 | + protected function parseArgument(string $arg) { |
|
| 194 | 192 | if ($this->lastVariadic) { |
| 195 | 193 | return $this->set($this->lastVariadic, $arg, true); |
| 196 | 194 | } |
@@ -215,8 +213,7 @@ discard block |
||
| 215 | 213 | * @param string|null $nextArg |
| 216 | 214 | * @return mixed|bool |
| 217 | 215 | */ |
| 218 | - protected function parseOptions(string $arg, ?string $nextArg = null) |
|
| 219 | - { |
|
| 216 | + protected function parseOptions(string $arg, ?string $nextArg = null) { |
|
| 220 | 217 | $value = null; |
| 221 | 218 | if ($nextArg !== null && substr($nextArg, 0, 1) !== '-') { |
| 222 | 219 | $value = $nextArg; |
@@ -52,8 +52,7 @@ |
||
| 52 | 52 | * Class Option |
| 53 | 53 | * @package Platine\Console\Input |
| 54 | 54 | */ |
| 55 | -class Option extends Parameter |
|
| 56 | -{ |
|
| 55 | +class Option extends Parameter { |
|
| 57 | 56 | /** |
| 58 | 57 | * The short option name |
| 59 | 58 | * @var string |