| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null): LongTasksCommand |
||
| 27 | { |
||
| 28 | $config = $container->get('config')['long_tasks']; |
||
| 29 | $tasks = $config['tasks'] ?? []; |
||
| 30 | |||
| 31 | foreach ($tasks as $key => $task) { |
||
| 32 | if (! $container->has($task)) { |
||
| 33 | unset($tasks[$key]); |
||
| 34 | continue; |
||
| 35 | } |
||
| 36 | |||
| 37 | $tasks[$key] = $container->get($task); |
||
| 38 | } |
||
| 39 | |||
| 40 | return new LongTasksCommand($tasks); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |