| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 82 | 3 | private function dfs(string $key, array $dependencies) |
|
| 83 | { |
||
| 84 | 3 | if (isset($this->states[$key])) { |
|
| 85 | 3 | return; |
|
| 86 | } |
||
| 87 | |||
| 88 | 3 | $this->states[$key] = self::STATE_NEW; |
|
| 89 | 3 | foreach ($dependencies as $dependency) { |
|
| 90 | 3 | $this->dfs($dependency, $this->dependencies[$dependency]); |
|
| 91 | } |
||
| 92 | |||
| 93 | 3 | $this->stack[] = $this->objects[$key]; |
|
| 94 | 3 | $this->states[$key] = self::STATE_PASSED; |
|
| 95 | |||
| 96 | 3 | return; |
|
| 97 | } |
||
| 98 | } |
||
| 99 |