| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2.0054 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | 3 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 40 | { |
||
| 41 | // Save the input interfaces |
||
| 42 | 3 | $this->input = $input; |
|
| 43 | 3 | $this->output = $output; |
|
| 44 | |||
| 45 | 3 | $subscriptionId = $input->getArgument('id'); |
|
| 46 | 3 | $subscription = $this->getContainer()->get('terox.subscription.repository.subscription')->findById($subscriptionId); |
|
| 47 | |||
| 48 | 3 | if(null === $subscription) { |
|
| 49 | return $output->writeln(sprintf('<error>The subscription with ID "%s" was not found.</error>', $subscriptionId)); |
||
| 50 | } |
||
| 51 | |||
| 52 | // Execute the action |
||
| 53 | 3 | $this->action($subscription); |
|
| 54 | |||
| 55 | 3 | $output->writeln('<green>Finished.</green>'); |
|
| 56 | 3 | } |
|
| 77 |