Skip to content

Commit

Permalink
Allow Node::setParent() to accept null values (fixes #203)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed Nov 4, 2015
1 parent 38df800 commit a315691
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
### Changed
- `AbstractBlock::finalize()` now reqires a second parameter, `$endLineNumber`
- `RegexHelper::REGEX_ENTITY` no longer includes the starting `/` or the ending `/i` (#194)
- `Node::setParent()` now accepts null values (#203)

### Fixed
- Fixed incorrect `endLine` positions (#187)
Expand Down
5 changes: 4 additions & 1 deletion src/Node/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public function parent()
return $this->parent;
}

protected function setParent(Node $node)
/**
* @param Node|null $node
*/
protected function setParent(Node $node = null)
{
$this->parent = $node;
}
Expand Down

0 comments on commit a315691

Please sign in to comment.