| Conditions | 3 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | public function register(Container $container): void |
||
| 31 | { |
||
| 32 | $container->set(Application::class, function (ContainerInterface $container) { |
||
| 33 | $application = new Application(); |
||
| 34 | |||
| 35 | $dispatcher = $container->get(SymfonyEventDispatcher::class); |
||
| 36 | $application->setDispatcher($dispatcher); |
||
| 37 | |||
| 38 | $loader = new ContainerCommandLoader( |
||
| 39 | $container, |
||
| 40 | $this->commands |
||
| 41 | ); |
||
| 42 | |||
| 43 | $application->setCommandLoader($loader); |
||
| 44 | |||
| 45 | if ($this->name !== '') { |
||
| 46 | $application->setName($this->name); |
||
| 47 | } |
||
| 48 | |||
| 49 | if ($this->version !== '') { |
||
| 50 | $application->setVersion($this->version); |
||
| 51 | } |
||
| 52 | |||
| 53 | $application->setAutoExit(false); |
||
| 54 | |||
| 55 | return $application; |
||
| 56 | }); |
||
| 59 |