| @@ 158-167 (lines=10) @@ | ||
| 155 | * |
|
| 156 | * @param array|object $target |
|
| 157 | */ |
|
| 158 | protected function applyNodeResults(&$target) |
|
| 159 | { |
|
| 160 | foreach ($target as &$value) { |
|
| 161 | if ($value instanceof Node) { |
|
| 162 | $value = $value->getResult(); |
|
| 163 | } elseif (is_array($value) || is_object($value)) { |
|
| 164 | $this->applyNodeResults($value); |
|
| 165 | } |
|
| 166 | } |
|
| 167 | } |
|
| 168 | } |
|
| 169 | ||
| @@ 43-56 (lines=14) @@ | ||
| 40 | * |
|
| 41 | * @param array|object $target |
|
| 42 | */ |
|
| 43 | protected function applyNodeResults(&$target) |
|
| 44 | { |
|
| 45 | if (!is_array($target) && !is_object($target)) { |
|
| 46 | return; |
|
| 47 | } |
|
| 48 | ||
| 49 | foreach ($target as &$value) { |
|
| 50 | if ($value instanceof self) { |
|
| 51 | $value = $value->getResult(); |
|
| 52 | } |
|
| 53 | ||
| 54 | $this->applyNodeResults($value); |
|
| 55 | } |
|
| 56 | } |
|
| 57 | ||
| 58 | /** |
|
| 59 | * Get the processed result |
|