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