| Conditions | 4 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function __construct(EventDispatcherInterface $dispatcher, array $tasks) |
||
| 34 | { |
||
| 35 | foreach ($tasks as $task) { |
||
| 36 | if ($task instanceof AbstractTask) { |
||
| 37 | $task->configure(); |
||
| 38 | } |
||
| 39 | |||
| 40 | if (method_exists($task, 'setEventDispatcher')) { |
||
| 41 | $task->setEventDispatcher($dispatcher); |
||
| 42 | } |
||
| 43 | |||
| 44 | $this->tasks[$task->getName()] = $task; |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 73 |