| Conditions | 7 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 7 |
| Changes | 0 | ||
| 1 | <?php |
||
| 97 | 7 | protected function walk($node, array $matches) |
|
| 98 | {
|
||
| 99 | 7 | if (is_object($node)) {
|
|
| 100 | 5 | $match = array_shift($matches); |
|
| 101 | 5 | if (property_exists($node, $match)) {
|
|
| 102 | 5 | if(count($matches) === 0 && isset($node->$match)) {
|
|
| 103 | 5 | $this->founds[] = $node->$match; |
|
| 104 | |||
| 105 | 5 | return; |
|
| 106 | } |
||
| 107 | 5 | $this->walk($node->$match, $matches); |
|
| 108 | } |
||
| 109 | 6 | } elseif (is_array($node)) {
|
|
| 110 | 5 | foreach($node as $n) {
|
|
| 111 | 4 | $this->walk($n, $matches); |
|
| 112 | } |
||
| 123 |