Skip to content

Commit 8558d1b

Browse files
[DomCrawler] fix return type declarations
1 parent 2f0e66c commit 8558d1b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Crawler.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Crawler implements \Countable, \IteratorAggregate
4343
private $document;
4444

4545
/**
46-
* @var \DOMElement[]
46+
* @var \DOMNode[]
4747
*/
4848
private $nodes = [];
4949

@@ -55,9 +55,7 @@ class Crawler implements \Countable, \IteratorAggregate
5555
private $isHtml = true;
5656

5757
/**
58-
* @param mixed $node A Node to use as the base for the crawling
59-
* @param string $uri The current URI
60-
* @param string $baseHref The base href value
58+
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $node A Node to use as the base for the crawling
6159
*/
6260
public function __construct($node = null, $uri = null, $baseHref = null)
6361
{
@@ -102,7 +100,7 @@ public function clear()
102100
* This method uses the appropriate specialized add*() method based
103101
* on the type of the argument.
104102
*
105-
* @param \DOMNodeList|\DOMNode|array|string|null $node A node
103+
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $node A node
106104
*
107105
* @throws \InvalidArgumentException when node is not the expected type
108106
*/
@@ -1049,7 +1047,7 @@ private function relativize($xpath)
10491047
/**
10501048
* @param int $position
10511049
*
1052-
* @return \DOMElement|null
1050+
* @return \DOMNode|null
10531051
*/
10541052
public function getNode($position)
10551053
{
@@ -1065,7 +1063,7 @@ public function count()
10651063
}
10661064

10671065
/**
1068-
* @return \ArrayIterator|\DOMElement[]
1066+
* @return \ArrayIterator|\DOMNode[]
10691067
*/
10701068
public function getIterator()
10711069
{
@@ -1146,7 +1144,7 @@ private function findNamespacePrefixes($xpath)
11461144
/**
11471145
* Creates a crawler for some subnodes.
11481146
*
1149-
* @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes
1147+
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $nodes
11501148
*
11511149
* @return static
11521150
*/

0 commit comments

Comments
 (0)