@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * Returns the value from $hash matching the given path ($path) or |
21 | 21 | * if the path cannot be found in the hash, it returns the default |
22 | 22 | * value ($default). |
23 | - * @param $path A list of keys to traverse, seperated by '/' |
|
23 | + * @param null|string $path A list of keys to traverse, seperated by '/' |
|
24 | 24 | * @param $hash The hash to search |
25 | 25 | * @param null $default The default value if the path is not found. |
26 | 26 | * @return mixed|null |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * Converts a hash to a \arc\tree\NamedNode |
100 | 100 | * @param $hash |
101 | 101 | * @param null $parent |
102 | - * @return tree\NamedNode|null |
|
102 | + * @return tree\NamedNode |
|
103 | 103 | */ |
104 | 104 | public static function tree($hash, $parent = null) |
105 | 105 | { |
@@ -88,7 +88,7 @@ |
||
88 | 88 | * @param array $namedArgs Optional. The named arguments to pepper the function with, the order must be the order |
89 | 89 | * in which the unpeppered function expects them. If not set, pepper will use Reflection to get them. |
90 | 90 | * Format is [ 'argumentName' => 'defaultValue' ] |
91 | - * @return callable |
|
91 | + * @return \Closure |
|
92 | 92 | */ |
93 | 93 | public static function pepper(callable $callable, $namedArgs=null) |
94 | 94 | { |
@@ -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 ); |