From 2b8ef1d6d7283580a492dcd6a117dfe186ede0c5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 24 Aug 2019 17:35:14 +0200 Subject: [PATCH] [DomCrawler] fix return type declarations --- src/Symfony/Component/DomCrawler/Crawler.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 1e7ba789a1..1cc72cc132 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -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 */