@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | class Configure extends Command { |
| 23 | 23 | /** @var AGateway[] */ |
| 24 | - private array $gateways = []; |
|
| 24 | + private array $gateways = [ ]; |
|
| 25 | 25 | |
| 26 | 26 | public function __construct( |
| 27 | 27 | private Factory $gatewayFactory, |
@@ -31,26 +31,26 @@ discard block |
||
| 31 | 31 | $fqcnList = $this->gatewayFactory->getFqcnList(); |
| 32 | 32 | foreach ($fqcnList as $fqcn) { |
| 33 | 33 | $gateway = $this->gatewayFactory->get($fqcn); |
| 34 | - $this->gateways[$gateway->getProviderId()] = $gateway; |
|
| 34 | + $this->gateways[ $gateway->getProviderId() ] = $gateway; |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | $this->addArgument( |
| 38 | 38 | 'gateway', |
| 39 | 39 | InputArgument::OPTIONAL, |
| 40 | - 'The name of the gateway: ' . implode(', ', array_keys($this->gateways)) |
|
| 40 | + 'The name of the gateway: '.implode(', ', array_keys($this->gateways)) |
|
| 41 | 41 | ); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - #[\Override] |
|
| 44 | + #[\Override ] |
|
| 45 | 45 | protected function execute(InputInterface $input, OutputInterface $output): int { |
| 46 | 46 | $gatewayName = strtolower((string)$input->getArgument('gateway')); |
| 47 | 47 | if (!array_key_exists($gatewayName, $this->gateways)) { |
| 48 | 48 | $helper = new QuestionHelper(); |
| 49 | 49 | $choiceQuestion = new ChoiceQuestion('Please choose a provider:', array_keys($this->gateways)); |
| 50 | 50 | $selectedIndex = $helper->ask($input, $output, $choiceQuestion); |
| 51 | - $gateway = $this->gateways[$selectedIndex]; |
|
| 51 | + $gateway = $this->gateways[ $selectedIndex ]; |
|
| 52 | 52 | } else { |
| 53 | - $gateway = $this->gateways[$gatewayName]; |
|
| 53 | + $gateway = $this->gateways[ $gatewayName ]; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | try { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | class Remove extends Command { |
| 22 | 22 | /** @var AGateway[] */ |
| 23 | - private array $gateways = []; |
|
| 23 | + private array $gateways = [ ]; |
|
| 24 | 24 | |
| 25 | 25 | public function __construct( |
| 26 | 26 | private Factory $gatewayFactory, |
@@ -30,26 +30,26 @@ discard block |
||
| 30 | 30 | $fqcnList = $this->gatewayFactory->getFqcnList(); |
| 31 | 31 | foreach ($fqcnList as $fqcn) { |
| 32 | 32 | $gateway = $this->gatewayFactory->get($fqcn); |
| 33 | - $this->gateways[$gateway->getProviderId()] = $gateway; |
|
| 33 | + $this->gateways[ $gateway->getProviderId() ] = $gateway; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | $this->addArgument( |
| 37 | 37 | 'gateway', |
| 38 | 38 | InputArgument::OPTIONAL, |
| 39 | - 'The name of the gateway: ' . implode(', ', array_keys($this->gateways)) |
|
| 39 | + 'The name of the gateway: '.implode(', ', array_keys($this->gateways)) |
|
| 40 | 40 | ); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - #[\Override] |
|
| 43 | + #[\Override ] |
|
| 44 | 44 | protected function execute(InputInterface $input, OutputInterface $output): int { |
| 45 | 45 | $gatewayName = strtolower((string)$input->getArgument('gateway')); |
| 46 | 46 | if (!array_key_exists($gatewayName, $this->gateways)) { |
| 47 | 47 | $helper = new QuestionHelper(); |
| 48 | 48 | $choiceQuestion = new ChoiceQuestion('Please choose a provider:', array_keys($this->gateways)); |
| 49 | 49 | $selected = $helper->ask($input, $output, $choiceQuestion); |
| 50 | - $gateway = $this->gateways[$selected]; |
|
| 50 | + $gateway = $this->gateways[ $selected ]; |
|
| 51 | 51 | } else { |
| 52 | - $gateway = $this->gateways[$gatewayName]; |
|
| 52 | + $gateway = $this->gateways[ $gatewayName ]; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $gateway->remove(); |