| Conditions | 4 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | 8 | public function buildResourceStack(ResourceRepository $repository, $path) |
|
| 48 | { |
||
| 49 | 8 | $stack = array(); |
|
| 50 | |||
| 51 | 8 | if (isset($this->stack[$path]) && is_array($this->stack[$path])) { |
|
| 52 | 8 | foreach ($this->stack[$path] as $data) { |
|
| 53 | 8 | $resource = unserialize($data); |
|
| 54 | 8 | $resource->attachTo($repository, $path); |
|
| 55 | |||
| 56 | 8 | $stack[] = $resource; |
|
| 57 | 8 | } |
|
| 58 | 8 | } |
|
| 59 | |||
| 60 | 8 | return new ArrayResourceStack($stack); |
|
| 61 | } |
||
| 62 | } |
||
| 63 |