Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
24 | public function getDriverForTask(TaskTypeInterface $task) |
||
25 | { |
||
26 | $class = get_class($task); |
||
27 | |||
28 | foreach ($this->taskDrivers as $taskDriver) { |
||
29 | if ($taskDriver->supportsClass($class)) { |
||
30 | return $taskDriver; |
||
31 | } |
||
32 | } |
||
33 | |||
34 | throw new TaskException("No driver found for ".$class); |
||
35 | } |
||
36 | } |
||
37 |