Skip to content

Commit 8333185

Browse files
Merge branch '4.3' into 4.4
* 4.3: (23 commits) fix merge [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 ...
2 parents c7f96ae + cc68655 commit 8333185

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Crawler.php

Lines changed: 7 additions & 9 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
*/
@@ -1112,7 +1110,7 @@ private function relativize(string $xpath): string
11121110
/**
11131111
* @param int $position
11141112
*
1115-
* @return \DOMElement|null
1113+
* @return \DOMNode|null
11161114
*/
11171115
public function getNode($position)
11181116
{
@@ -1128,7 +1126,7 @@ public function count()
11281126
}
11291127

11301128
/**
1131-
* @return \ArrayIterator|\DOMElement[]
1129+
* @return \ArrayIterator|\DOMNode[]
11321130
*/
11331131
public function getIterator()
11341132
{
@@ -1246,7 +1244,7 @@ private function findNamespacePrefixes(string $xpath): array
12461244
/**
12471245
* Creates a crawler for some subnodes.
12481246
*
1249-
* @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes
1247+
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $nodes
12501248
*
12511249
* @return static
12521250
*/
@@ -1262,7 +1260,7 @@ private function createSubCrawler($nodes)
12621260
}
12631261

12641262
/**
1265-
* @throws \RuntimeException If the CssSelector Component is not available
1263+
* @throws \LogicException If the CssSelector Component is not available
12661264
*/
12671265
private function createCssSelectorConverter(): CssSelectorConverter
12681266
{

0 commit comments

Comments
 (0)