[DomCrawler] fix return type declarations

This commit is contained in:
Nicolas Grekas 2019-08-24 17:35:14 +02:00
parent 2ea98bb4a1
commit 2b8ef1d6d7
1 changed files with 6 additions and 8 deletions

View File

@ -43,7 +43,7 @@ class Crawler implements \Countable, \IteratorAggregate
private $document;
/**
* @var \DOMElement[]
* @var \DOMNode[]
*/
private $nodes = [];
@ -55,9 +55,7 @@ class Crawler implements \Countable, \IteratorAggregate
private $isHtml = true;
/**
* @param mixed $node A Node to use as the base for the crawling
* @param string $uri The current URI
* @param string $baseHref The base href value
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $node A Node to use as the base for the crawling
*/
public function __construct($node = null, $uri = null, $baseHref = null)
{
@ -102,7 +100,7 @@ class Crawler implements \Countable, \IteratorAggregate
* This method uses the appropriate specialized add*() method based
* on the type of the argument.
*
* @param \DOMNodeList|\DOMNode|array|string|null $node A node
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $node A node
*
* @throws \InvalidArgumentException when node is not the expected type
*/
@ -1049,7 +1047,7 @@ class Crawler implements \Countable, \IteratorAggregate
/**
* @param int $position
*
* @return \DOMElement|null
* @return \DOMNode|null
*/
public function getNode($position)
{
@ -1065,7 +1063,7 @@ class Crawler implements \Countable, \IteratorAggregate
}
/**
* @return \ArrayIterator|\DOMElement[]
* @return \ArrayIterator|\DOMNode[]
*/
public function getIterator()
{
@ -1146,7 +1144,7 @@ class Crawler implements \Countable, \IteratorAggregate
/**
* Creates a crawler for some subnodes.
*
* @param \DOMElement|\DOMElement[]|\DOMNodeList|null $nodes
* @param \DOMNodeList|\DOMNode|\DOMNode[]|string|null $nodes
*
* @return static
*/