@@ -44,7 +44,7 @@ class Crawler implements \Countable, \IteratorAggregate
44
44
private $ document ;
45
45
46
46
/**
47
- * @var \DOMElement []
47
+ * @var \DOMNode []
48
48
*/
49
49
private $ nodes = [];
50
50
@@ -61,9 +61,7 @@ class Crawler implements \Countable, \IteratorAggregate
61
61
private $ html5Parser ;
62
62
63
63
/**
64
- * @param mixed $node A Node to use as the base for the crawling
65
- * @param string $uri The current URI
66
- * @param string $baseHref The base href value
64
+ * @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $node A Node to use as the base for the crawling
67
65
*/
68
66
public function __construct ($ node = null , string $ uri = null , string $ baseHref = null )
69
67
{
@@ -109,7 +107,7 @@ public function clear()
109
107
* This method uses the appropriate specialized add*() method based
110
108
* on the type of the argument.
111
109
*
112
- * @param \DOMNodeList|\DOMNode|array |string|null $node A node
110
+ * @param \DOMNodeList|\DOMNode|\DOMNode[] |string|null $node A node
113
111
*
114
112
* @throws \InvalidArgumentException when node is not the expected type
115
113
*/
@@ -1112,7 +1110,7 @@ private function relativize(string $xpath): string
1112
1110
/**
1113
1111
* @param int $position
1114
1112
*
1115
- * @return \DOMElement |null
1113
+ * @return \DOMNode |null
1116
1114
*/
1117
1115
public function getNode ($ position )
1118
1116
{
@@ -1128,7 +1126,7 @@ public function count()
1128
1126
}
1129
1127
1130
1128
/**
1131
- * @return \ArrayIterator|\DOMElement []
1129
+ * @return \ArrayIterator|\DOMNode []
1132
1130
*/
1133
1131
public function getIterator ()
1134
1132
{
@@ -1246,7 +1244,7 @@ private function findNamespacePrefixes(string $xpath): array
1246
1244
/**
1247
1245
* Creates a crawler for some subnodes.
1248
1246
*
1249
- * @param \DOMElement|\DOMElement []|\DOMNodeList |null $nodes
1247
+ * @param \DOMNodeList|\DOMNode|\DOMNode []|string |null $nodes
1250
1248
*
1251
1249
* @return static
1252
1250
*/
@@ -1262,7 +1260,7 @@ private function createSubCrawler($nodes)
1262
1260
}
1263
1261
1264
1262
/**
1265
- * @throws \RuntimeException If the CssSelector Component is not available
1263
+ * @throws \LogicException If the CssSelector Component is not available
1266
1264
*/
1267
1265
private function createCssSelectorConverter (): CssSelectorConverter
1268
1266
{
0 commit comments