@@ -184,7 +184,7 @@ |
||
| 184 | 184 | /** |
| 185 | 185 | * @param string|NodeList|\DOMNode|\Closure $input |
| 186 | 186 | * |
| 187 | - * @return string|self |
|
| 187 | + * @return string|null |
|
| 188 | 188 | */ |
| 189 | 189 | public function text($input = null) { |
| 190 | 190 | if (is_null($input)) { |
@@ -353,8 +353,9 @@ |
||
| 353 | 353 | */ |
| 354 | 354 | public function contents() { |
| 355 | 355 | $results = $this->collection()->reduce(function($carry, $node) { |
| 356 | - if($node->isRemoved()) |
|
| 357 | - return $this->newNodeList(); |
|
| 356 | + if($node->isRemoved()) { |
|
| 357 | + return $this->newNodeList(); |
|
| 358 | + } |
|
| 358 | 359 | return $carry->merge( |
| 359 | 360 | $node->newNodeList($node->childNodes) |
| 360 | 361 | ); |