@@ -22,6 +22,9 @@ discard block |
||
| 22 | 22 | private $childNodes = null; |
| 23 | 23 | private $nodeName = ''; |
| 24 | 24 | |
| 25 | + /** |
|
| 26 | + * @param NamedNode $parentNode |
|
| 27 | + */ |
|
| 25 | 28 | public function __construct($nodeName='', $parentNode = null, $childNodes = null, $nodeValue = null) |
| 26 | 29 | { |
| 27 | 30 | $this->nodeName = $nodeName; |
@@ -127,10 +130,7 @@ discard block |
||
| 127 | 130 | /** |
| 128 | 131 | * Adds a new child element to this node with the given name as index in the child list. |
| 129 | 132 | * If an existing child has the same name, that child will be discarded. |
| 130 | - * @param string $name The index name of the child |
|
| 131 | - * @param mixed $data The data for the new child. If $data is not an instance of \arc\tree\NamedNode |
|
| 132 | - * a new instance will be constructed with $data as its nodeValue. |
|
| 133 | - * @return \arc\tree\NamedNode The new child node. |
|
| 133 | + * @param NamedNode $child |
|
| 134 | 134 | */ |
| 135 | 135 | public function appendChild($nodeName, $child=null) |
| 136 | 136 | { |
@@ -20,6 +20,9 @@ |
||
| 20 | 20 | { |
| 21 | 21 | private $parentNode = null; |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param NamedNode $parentNode |
|
| 25 | + */ |
|
| 23 | 26 | public function __construct($list = null, $parentNode = null) |
| 24 | 27 | { |
| 25 | 28 | parent::__construct( $list ); |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | /** |
| 20 | 20 | * Recursively search a hash for a key-path and return its value or the default value if the key-path is not found. |
| 21 | - * @param $path |
|
| 21 | + * @param null|string $path |
|
| 22 | 22 | * @param $hash |
| 23 | 23 | * @param null $default |
| 24 | 24 | * @return mixed|null |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * Generate a NamedNode tree from a hash. |
| 97 | 97 | * @param $hash |
| 98 | 98 | * @param null $parent |
| 99 | - * @return tree\NamedNode|null |
|
| 99 | + * @return tree\NamedNode |
|
| 100 | 100 | */ |
| 101 | 101 | public static function tree($hash, $parent = null) |
| 102 | 102 | { |