| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function execute(InputInterface $input, OutputInterface $output): int |
||
| 21 | { |
||
| 22 | $reflectionClass = new ReflectionClass(Kernel::class); |
||
| 23 | /** @var Serializer $serializer */ |
||
| 24 | $serializer = $reflectionClass->getProperty('serializer')->getValue($this->kernel); |
||
| 25 | $serializerClass = new ReflectionClass($serializer); |
||
| 26 | if (rmdir($serializerClass->getProperty('serializedDir')->getValue($serializer))) { |
||
| 27 | throw new \Exception('Cannot remove dir: ' . |
||
| 28 | $serializerClass->getProperty('serializedDir')->getValue($serializer)); |
||
| 29 | } |
||
| 30 | $serializer->makeSerialization([ |
||
| 31 | ContainerLoader::class => $reflectionClass->getProperty('containerLoader')->getValue($this->kernel), |
||
| 32 | Router::class => $reflectionClass->getProperty('router')->getValue($this->kernel), |
||
| 33 | CommandsLoader::class => $reflectionClass->getProperty('commandLoader')->getValue($this->kernel) |
||
| 34 | ]); |
||
| 35 | return self::SUCCESS; |
||
| 36 | } |
||
| 37 | } |