@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | ->method('getArgument') |
| 37 | 37 | ->willReturnOnConsecutiveCalls(5, 'foo', ['foo', 'bar'], 0.5, true); |
| 38 | 38 | |
| 39 | - $command = new #[AsCommand('foo')] class extends Command { |
|
| 39 | + $command = new #[AsCommand('foo')] class extends Command{ |
|
| 40 | 40 | #[Argument] |
| 41 | 41 | public int $intVal; |
| 42 | 42 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | ->expects($this->never()) |
| 76 | 76 | ->method('getArgument'); |
| 77 | 77 | |
| 78 | - $command = new #[AsCommand('foo')] class extends Command { |
|
| 78 | + $command = new #[AsCommand('foo')] class extends Command{ |
|
| 79 | 79 | #[Argument] |
| 80 | 80 | public int $arg; |
| 81 | 81 | }; |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | ->method('getOption') |
| 99 | 99 | ->willReturnOnConsecutiveCalls(5, 'foo', ['foo', 'bar'], 0.5, true, true); |
| 100 | 100 | |
| 101 | - $command = new #[AsCommand('foo')] class extends Command { |
|
| 101 | + $command = new #[AsCommand('foo')] class extends Command{ |
|
| 102 | 102 | #[Option(mode: InputOption::VALUE_REQUIRED)] |
| 103 | 103 | public int $intVal; |
| 104 | 104 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | ->expects($this->never()) |
| 142 | 142 | ->method('getOption'); |
| 143 | 143 | |
| 144 | - $command = new #[AsCommand('foo')] class extends Command { |
|
| 144 | + $command = new #[AsCommand('foo')] class extends Command{ |
|
| 145 | 145 | #[Option(mode: InputOption::VALUE_REQUIRED)] |
| 146 | 146 | public int $option; |
| 147 | 147 | }; |
@@ -234,7 +234,7 @@ |
||
| 234 | 234 | $result = $this->parser->parse(new \ReflectionClass( |
| 235 | 235 | new #[AsCommand(name: 'foo')] class { |
| 236 | 236 | #[Option(mode: InputOption::VALUE_OPTIONAL)] |
| 237 | - private int|\stdClass $option; |
|
| 237 | + private int | \stdClass $option; |
|
| 238 | 238 | } |
| 239 | 239 | )); |
| 240 | 240 | |
@@ -182,7 +182,7 @@ |
||
| 182 | 182 | $result = $this->parser->parse(new \ReflectionClass( |
| 183 | 183 | new #[AsCommand(name: 'foo')] class { |
| 184 | 184 | #[Argument] |
| 185 | - private int|\stdClass $arg; |
|
| 185 | + private int | \stdClass $arg; |
|
| 186 | 186 | } |
| 187 | 187 | )); |
| 188 | 188 | |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | public readonly string $name, |
| 14 | 14 | public readonly ?string $description = null, |
| 15 | 15 | public readonly ?string $help = null |
| 16 | - ) { |
|
| 16 | + ){ |
|
| 17 | 17 | } |
| 18 | 18 | } |
@@ -19,10 +19,10 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function __construct( |
| 21 | 21 | public readonly ?string $name = null, |
| 22 | - public readonly string|array|null $shortcut = null, |
|
| 22 | + public readonly string | array | null $shortcut = null, |
|
| 23 | 23 | public readonly ?string $description = null, |
| 24 | 24 | public readonly int $mode = InputOption::VALUE_NONE, |
| 25 | - public readonly \Closure|array $suggestedValues = [] |
|
| 26 | - ) { |
|
| 25 | + public readonly \Closure | array $suggestedValues = [] |
|
| 26 | + ){ |
|
| 27 | 27 | } |
| 28 | 28 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | public function __construct( |
| 18 | 18 | public readonly ?string $name = null, |
| 19 | 19 | public readonly ?string $description = null, |
| 20 | - public readonly \Closure|array $suggestedValues = [], |
|
| 21 | - ) { |
|
| 20 | + public readonly \Closure | array $suggestedValues = [], |
|
| 21 | + ){ |
|
| 22 | 22 | } |
| 23 | 23 | } |
@@ -13,6 +13,6 @@ |
||
| 13 | 13 | public function __construct( |
| 14 | 14 | public readonly string $question, |
| 15 | 15 | public readonly ?string $argument = null |
| 16 | - ) { |
|
| 16 | + ){ |
|
| 17 | 17 | } |
| 18 | 18 | } |
@@ -14,13 +14,13 @@ |
||
| 14 | 14 | public function configure(Command $command, \ReflectionClass $reflection): void |
| 15 | 15 | { |
| 16 | 16 | $command->setName($reflection->getConstant('NAME')); |
| 17 | - $command->setDescription((string) $reflection->getConstant('DESCRIPTION')); |
|
| 17 | + $command->setDescription((string)$reflection->getConstant('DESCRIPTION')); |
|
| 18 | 18 | |
| 19 | - foreach ($reflection->getMethod('defineOptions')->invoke($command) as $option) { |
|
| 19 | + foreach ($reflection->getMethod('defineOptions')->invoke($command) as $option){ |
|
| 20 | 20 | \call_user_func_array([$command, 'addOption'], $option); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - foreach ($reflection->getMethod('defineArguments')->invoke($command) as $argument) { |
|
| 23 | + foreach ($reflection->getMethod('defineArguments')->invoke($command) as $argument){ |
|
| 24 | 24 | \call_user_func_array([$command, 'addArgument'], $argument); |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | { |
| 15 | 15 | public function __construct( |
| 16 | 16 | private readonly Parser $parser |
| 17 | - ) { |
|
| 17 | + ){ |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | public function canConfigure(Command $command, \ReflectionClass $reflection): bool |
@@ -27,14 +27,14 @@ discard block |
||
| 27 | 27 | $result = $this->parser->parse($reflection); |
| 28 | 28 | |
| 29 | 29 | $command->setName($result->name); |
| 30 | - $command->setDescription((string) $result->description); |
|
| 31 | - $command->setHelp((string) $result->help); |
|
| 30 | + $command->setDescription((string)$result->description); |
|
| 31 | + $command->setHelp((string)$result->help); |
|
| 32 | 32 | |
| 33 | - foreach ($result->options as $option) { |
|
| 33 | + foreach ($result->options as $option){ |
|
| 34 | 34 | $command->getDefinition()->addOption($option); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - foreach ($result->arguments as $argument) { |
|
| 37 | + foreach ($result->arguments as $argument){ |
|
| 38 | 38 | $command->getDefinition()->addArgument($argument); |
| 39 | 39 | } |
| 40 | 40 | } |