| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | 8 | private function make($loader) |
|
| 48 | { |
||
| 49 | 8 | if (!is_a($loader, LoaderInterface::class, true)) { |
|
| 50 | 1 | throw LoaderException::invalidLoader($loader); |
|
| 51 | } |
||
| 52 | |||
| 53 | 7 | if (!call_user_func([$loader, 'isSupported'])) { |
|
| 54 | 1 | throw LoaderException::unsupportedLoader($loader); |
|
| 55 | } |
||
| 56 | |||
| 57 | 6 | return new $loader(); |
|
| 58 | } |
||
| 59 | } |
||
| 60 |