| Conditions | 4 |
| Paths | 5 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4.0092 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 2 | public function loadCollection() |
|
| 36 | { |
||
| 37 | 2 | $collection = new MethodCollection(); |
|
| 38 | |||
| 39 | 2 | foreach ($this->resources as $resource) { |
|
| 40 | 2 | $loader = $this->resolver->resolve($resource); |
|
| 41 | |||
| 42 | 2 | if (false === $loader) { |
|
| 43 | throw new \RuntimeException(sprintf('Could not resolve loader for resource "%s"', $resource)); |
||
| 44 | } |
||
| 45 | |||
| 46 | 2 | $collection->addCollection($loader->load($resource)); |
|
| 47 | 2 | } |
|
| 48 | |||
| 49 | 2 | foreach ($this->context as $item) { |
|
| 50 | 2 | $collection->addContext($item); |
|
| 51 | 2 | } |
|
| 52 | |||
| 53 | 2 | return $collection; |
|
| 54 | } |
||
| 55 | } |
||
| 56 |