| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 47 | 19 | public function buildStack(ResourceRepository $repository, $path) |
|
| 48 | { |
||
| 49 | 19 | if (isset($this->stack[$path])) { |
|
| 50 | 11 | $resources = array(); |
|
| 51 | |||
| 52 | 11 | foreach ($this->stack[$path] as $resource) { |
|
| 53 | 11 | $resource->attachTo($repository, $path); |
|
| 54 | 11 | $resources[] = $resource; |
|
| 55 | 11 | } |
|
| 56 | |||
| 57 | 11 | return new ResourceStack($resources); |
|
| 58 | } |
||
| 59 | |||
| 60 | 8 | throw new \InvalidArgumentException(sprintf('No version of path %s were found in the ChangeStream', $path)); |
|
| 61 | } |
||
| 62 | } |
||
| 63 |