| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 18 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 45 | protected function execute(InputInterface $input, OutputInterface $output) | ||
| 46 |     { | ||
| 47 |         $service_name = $input->getArgument('service'); | ||
| 48 |         if (!$this->getContainer()->has($service_name)) { | ||
| 49 |             $output->writeln(sprintf('<error>The service "%s" does not exist.</error>', $service_name)); | ||
| 50 | |||
| 51 | return 1; | ||
| 52 | } | ||
| 53 | $service = $this->getContainer()->get($service_name); | ||
| 54 |         if (!$service instanceof StorableInterface) { | ||
| 55 |             $output->writeln(sprintf('<error>The service "%s" is not a storable object.</error>', $service_name)); | ||
| 56 | |||
| 57 | return 2; | ||
| 58 | } | ||
| 59 | |||
| 60 | $service->regen(); | ||
| 61 |         $output->writeln('Done.'); | ||
| 62 | } | ||
| 63 | } | ||
| 64 |