Skip to content

Commit cc68655

Browse files
Merge branch '3.4' into 4.3
* 3.4: (21 commits) [SecurityBundle] fix return type declarations [BrowserKit] fix return type declarations [PropertyInfo] fix return type declarations [Bridge/Doctrine] fix return type declarations [Form] fix return type declarations [Console] fix return type declarations [Intl] fix return type declarations [Templating] fix return type declarations [DomCrawler] fix return type declarations [Validator] fix return type declarations [Process] fix return type declarations [Workflow] fix return type declarations [Cache] fix return type declarations [Serializer] fix return type declarations [Translation] fix return type declarations [DI] fix return type declarations [Config] fix return type declarations [HttpKernel] Fix return type declarations [Security] Fix return type declarations [Routing] Fix return type declarations ...
2 parents 004f207 + 8558d1b commit cc68655

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
@@ -44,7 +44,7 @@ class Crawler implements \Countable, \IteratorAggregate
4444
private $document;
4545

4646
/**
47-
* @var \DOMElement[]
47+
* @var \DOMNode[]
4848
*/
4949
private $nodes = [];
5050

@@ -61,9 +61,7 @@ class Crawler implements \Countable, \IteratorAggregate
6161
private $html5Parser;
6262

6363
/**
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
6765
*/
6866
public function __construct($node = null, string $uri = null, string $baseHref = null)
6967
{
@@ -109,7 +107,7 @@ public function clear()
109107
* This method uses the appropriate specialized add*() method based
110108
* on the type of the argument.
111109
*
112-
* @param \DOMNodeList|\DOMNode|array|string|null $node A node
110+
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $node A node
113111
*
114112
* @throws \InvalidArgumentException when node is not the expected type
115113
*/
@@ -1059,7 +1057,7 @@ private function relativize(string $xpath): string
10591057
/**
10601058
* @param int $position
10611059
*
1062-
* @return \DOMElement|null
1060+
* @return \DOMNode|null
10631061
*/
10641062
public function getNode($position)
10651063
{
@@ -1075,7 +1073,7 @@ public function count()
10751073
}
10761074

10771075
/**
1078-
* @return \ArrayIterator|\DOMElement[]
1076+
* @return \ArrayIterator|\DOMNode[]
10791077
*/
10801078
public function getIterator()
10811079
{
@@ -1193,7 +1191,7 @@ private function findNamespacePrefixes(string $xpath): array
11931191
/**
11941192
* Creates a crawler for some subnodes.
11951193
*
1196-
* @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes
1194+
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $nodes
11971195
*
11981196
* @return static
11991197
*/

0 commit comments

Comments
 (0)