Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
23 | 2 | public function getClassByName($name) |
|
24 | { |
||
25 | 2 | $taskClasses = $this->discoverer->getTasks(); |
|
26 | |||
27 | 2 | if (!isset($taskClasses[$name])) { |
|
28 | 1 | throw new TaskException( |
|
29 | 1 | sprintf("No Task found for name %s. You may need to add the Task to the Registry", $name) |
|
30 | ); |
||
31 | } |
||
32 | |||
33 | 1 | return $taskClasses[$name]; |
|
34 | } |
||
35 | } |
||
37 |