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