Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.3731 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | 8 | public function resolve($resource, $type = null) |
|
42 | { |
||
43 | 8 | if ($this->supports($resource, $type)) { |
|
44 | return $this; |
||
45 | } |
||
46 | |||
47 | 8 | $loader = null === $this->resolver ? false : $this->resolver->resolve($resource, $type); |
|
48 | |||
49 | 8 | if (false === $loader) { |
|
50 | throw new \OutOfBoundsException($resource); |
||
51 | } |
||
52 | |||
53 | 8 | return $loader; |
|
54 | } |
||
55 | |||
68 |