@@ -158,8 +158,9 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | $results = []; |
| 160 | 160 | |
| 161 | - if ($this->name == $search) |
|
| 162 | - $results[] = $this; |
|
| 161 | + if ($this->name == $search) { |
|
| 162 | + $results[] = $this; |
|
| 163 | + } |
|
| 163 | 164 | |
| 164 | 165 | foreach($this->children() as $child) { |
| 165 | 166 | $results = array_merge($results, $child->find($search)); |
@@ -167,8 +168,9 @@ discard block |
||
| 167 | 168 | |
| 168 | 169 | if ($search[0] == '@') { |
| 169 | 170 | $search = substr($search, 1); |
| 170 | - if (property_exists($this->attributes, $search)) |
|
| 171 | - $results[] = $this->attributes->$search; |
|
| 171 | + if (property_exists($this->attributes, $search)) { |
|
| 172 | + $results[] = $this->attributes->$search; |
|
| 173 | + } |
|
| 172 | 174 | } |
| 173 | 175 | |
| 174 | 176 | return $results; |