@@ -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,7 +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
64
+ * @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $node A Node to use as the base for the crawling
65
65
*/
66
66
public function __construct ($ node = null , string $ uri = null , string $ baseHref = null )
67
67
{
@@ -107,7 +107,7 @@ public function clear()
107
107
* This method uses the appropriate specialized add*() method based
108
108
* on the type of the argument.
109
109
*
110
- * @param \DOMNodeList|\DOMNode|array |string|null $node A node
110
+ * @param \DOMNodeList|\DOMNode|\DOMNode[] |string|null $node A node
111
111
*
112
112
* @throws \InvalidArgumentException when node is not the expected type
113
113
*/
@@ -1058,7 +1058,7 @@ private function relativize(string $xpath): string
1058
1058
}
1059
1059
1060
1060
/**
1061
- * @return \DOMElement |null
1061
+ * @return \DOMNode |null
1062
1062
*/
1063
1063
public function getNode (int $ position )
1064
1064
{
@@ -1074,7 +1074,7 @@ public function count()
1074
1074
}
1075
1075
1076
1076
/**
1077
- * @return \ArrayIterator|\DOMElement []
1077
+ * @return \ArrayIterator|\DOMNode []
1078
1078
*/
1079
1079
public function getIterator ()
1080
1080
{
@@ -1191,7 +1191,7 @@ private function findNamespacePrefixes(string $xpath): array
1191
1191
/**
1192
1192
* Creates a crawler for some subnodes.
1193
1193
*
1194
- * @param \DOMElement|\DOMElement []|\DOMNodeList |null $nodes
1194
+ * @param \DOMNodeList|\DOMNode|\DOMNode []|string |null $nodes
1195
1195
*
1196
1196
* @return static
1197
1197
*/
@@ -1207,7 +1207,7 @@ private function createSubCrawler($nodes): object
1207
1207
}
1208
1208
1209
1209
/**
1210
- * @throws \RuntimeException If the CssSelector Component is not available
1210
+ * @throws \LogicException If the CssSelector Component is not available
1211
1211
*/
1212
1212
private function createCssSelectorConverter (): CssSelectorConverter
1213
1213
{
0 commit comments