@@ -10,7 +10,6 @@ |
||
10 | 10 | namespace FluentDOM\Loader\Json { |
11 | 11 | |
12 | 12 | use FluentDOM\Document; |
13 | - use FluentDOM\Element; |
|
14 | 13 | use FluentDOM\Loadable; |
15 | 14 | use FluentDOM\Loader\Supports; |
16 | 15 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | * @param mixed $source |
46 | 46 | * @param string $contentType |
47 | 47 | * @param array $options |
48 | - * @return Document|Result|NULL |
|
48 | + * @return Document|null |
|
49 | 49 | */ |
50 | 50 | public function load($source, $contentType, array $options = []) { |
51 | 51 | if (FALSE !== ($json = $this->getJson($source, $contentType))) { |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | * |
252 | 252 | * @param string $expression Xpath expression |
253 | 253 | * @param NULL|string|callable|\DOMNode|array|\Traversable $filter |
254 | - * @param NULL|string|callable|\DOMNode|array|\Traversable $stopAt |
|
254 | + * @param null|string $stopAt |
|
255 | 255 | * @param int $options |
256 | 256 | * @return Nodes |
257 | 257 | */ |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | * If $elementsOnly is set to TRUE, only element nodes are used. |
654 | 654 | * |
655 | 655 | * @param callable $function |
656 | - * @param callable|bool|NULL $elementsFilter |
|
656 | + * @param boolean $elementsFilter |
|
657 | 657 | * @return $this |
658 | 658 | */ |
659 | 659 | public function each(callable $function, $elementsFilter = NULL) { |
@@ -8,7 +8,6 @@ |
||
8 | 8 | |
9 | 9 | namespace FluentDOM { |
10 | 10 | |
11 | - use FluentDOM\Exceptions\InvalidSerializer; |
|
12 | 11 | use FluentDOM\Xpath\Transformer; |
13 | 12 | use FluentDOM\Serializer; |
14 | 13 |
@@ -161,7 +161,7 @@ |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | - * @return mixed |
|
164 | + * @return \stdClass |
|
165 | 165 | */ |
166 | 166 | protected function getEmpty() { |
167 | 167 | return new \stdClass(); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @param \SimpleXMLElement $source |
35 | 35 | * @param string $contentType |
36 | 36 | * @param array $options |
37 | - * @return Document|Result|NULL |
|
37 | + * @return Result|null |
|
38 | 38 | */ |
39 | 39 | public function load($source, $contentType, array $options = []) { |
40 | 40 | if ($source instanceof \SimpleXMLElement) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | * @param mixed $source |
46 | 46 | * @param string $contentType |
47 | 47 | * @param array $options |
48 | - * @return Document|Result|NULL |
|
48 | + * @return Document|null |
|
49 | 49 | */ |
50 | 50 | public function load($source, $contentType, array $options = []) { |
51 | 51 | if (FALSE !== ($json = $this->getJson($source, $contentType))) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | * @param mixed $source |
46 | 46 | * @param string $contentType |
47 | 47 | * @param array $options |
48 | - * @return Document|Result|NULL |
|
48 | + * @return Document|null |
|
49 | 49 | */ |
50 | 50 | public function load($source, $contentType, array $options = []) { |
51 | 51 | if (FALSE !== ($json = $this->getJson($source, $contentType))) { |
@@ -45,7 +45,7 @@ |
||
45 | 45 | * @param mixed $source |
46 | 46 | * @param string $contentType |
47 | 47 | * @param array $options |
48 | - * @return Document|Result|NULL |
|
48 | + * @return Document|null |
|
49 | 49 | */ |
50 | 50 | public function load($source, $contentType, array $options = []) { |
51 | 51 | if (FALSE !== ($json = $this->getJson($source, $contentType))) { |
@@ -110,6 +110,10 @@ discard block |
||
110 | 110 | return NULL; |
111 | 111 | } |
112 | 112 | |
113 | + /** |
|
114 | + * @param string $contentType |
|
115 | + * @param Options $options |
|
116 | + */ |
|
113 | 117 | private function isFragment($contentType, $options) { |
114 | 118 | return ( |
115 | 119 | $contentType == 'html-fragment' || |
@@ -118,6 +122,9 @@ discard block |
||
118 | 122 | ); |
119 | 123 | } |
120 | 124 | |
125 | + /** |
|
126 | + * @param string $source |
|
127 | + */ |
|
121 | 128 | private function loadFragmentIntoDom(\DOMDocument $document, $source, $loadOptions) { |
122 | 129 | $htmlDom = new Document(); |
123 | 130 | $htmlDom->loadHTML('<html-fragment>'.$source.'</html-fragment>', $loadOptions); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @param mixed $source |
44 | 44 | * @param string $contentType |
45 | 45 | * @param array|\Traversable|Options $options |
46 | - * @return Document|Result|NULL |
|
46 | + * @return Document|null |
|
47 | 47 | */ |
48 | 48 | public function load($source, $contentType, $options = []) { |
49 | 49 | $options = $this->getOptions($options); |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | * Append the provided lines to the parent. |
86 | 86 | * |
87 | 87 | * @param \DOMNode $parent |
88 | - * @param $lines |
|
89 | - * @param $hasHeaderLine |
|
88 | + * @param \Traversable $lines |
|
89 | + * @param boolean $hasHeaderLine |
|
90 | 90 | * @param array $fields |
91 | 91 | */ |
92 | 92 | private function appendLines(\DOMNode $parent, $lines, $hasHeaderLine, array $fields = NULL) { |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | } |
175 | 175 | |
176 | 176 | /** |
177 | - * @param array|\Traversable|Options $options |
|
177 | + * @param Options $options |
|
178 | 178 | */ |
179 | 179 | private function configure($options) { |
180 | 180 | $this->_delimiter = isset($options['DELIMITER']) ? $options['DELIMITER'] : $this->_delimiter; |