| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 11 | public function getFactory(Specification $spec) |
|
| 41 | { |
||
| 42 | 11 | if(!isset($this->factories[get_class($spec)])) { |
|
| 43 | 1 | throw new \OutOfRangeException(sprintf( |
|
| 44 | 1 | 'Factory for Specification "%s" not registred', |
|
| 45 | 1 | get_class($spec) |
|
| 46 | 1 | )); |
|
| 47 | } |
||
| 48 | |||
| 49 | 10 | return $this->factories[get_class($spec)]; |
|
| 50 | } |
||
| 51 | } |
||
| 52 |