diff --git a/src/Symfony/Component/DomCrawler/AbstractUriElement.php b/src/Symfony/Component/DomCrawler/AbstractUriElement.php index c7af4a61b7..8bc6be300f 100644 --- a/src/Symfony/Component/DomCrawler/AbstractUriElement.php +++ b/src/Symfony/Component/DomCrawler/AbstractUriElement.php @@ -35,7 +35,7 @@ abstract class AbstractUriElement /** * @param \DOMElement $node A \DOMElement instance - * @param string $currentUri The URI of the page where the link is embedded (or the base href) + * @param string|null $currentUri The URI of the page where the link is embedded (or the base href) * @param string|null $method The method to use for the link (GET by default) * * @throws \InvalidArgumentException if the node is not a link diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index ce409e7c54..63b35fad74 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -21,20 +21,29 @@ use Symfony\Component\CssSelector\CssSelectorConverter; */ class Crawler implements \Countable, \IteratorAggregate { + /** + * @var string|null + */ protected $uri; /** - * @var string The default namespace prefix to be used with XPath and CSS expressions + * The default namespace prefix to be used with XPath and CSS expressions. + * + * @var string */ private $defaultNamespacePrefix = 'default'; /** - * @var array A map of manually registered namespaces + * A map of manually registered namespaces. + * + * @var array */ private $namespaces = []; /** - * @var string The base href value + * The base href value. + * + * @var string|null */ private $baseHref; @@ -75,7 +84,7 @@ class Crawler implements \Countable, \IteratorAggregate /** * Returns the current URI. * - * @return string + * @return string|null */ public function getUri() { @@ -85,7 +94,7 @@ class Crawler implements \Countable, \IteratorAggregate /** * Returns base href. * - * @return string + * @return string|null */ public function getBaseHref() { diff --git a/src/Symfony/Component/DomCrawler/Form.php b/src/Symfony/Component/DomCrawler/Form.php index 9b5c2892d0..3a6b525040 100644 --- a/src/Symfony/Component/DomCrawler/Form.php +++ b/src/Symfony/Component/DomCrawler/Form.php @@ -38,9 +38,9 @@ class Form extends Link implements \ArrayAccess /** * @param \DOMElement $node A \DOMElement instance - * @param string $currentUri The URI of the page where the form is embedded - * @param string $method The method to use for the link (if null, it defaults to the method defined by the form) - * @param string $baseHref The URI of the used for relative links, but not for empty action + * @param string|null $currentUri The URI of the page where the form is embedded + * @param string|null $method The method to use for the link (if null, it defaults to the method defined by the form) + * @param string|null $baseHref The URI of the used for relative links, but not for empty action * * @throws \LogicException if the node is not a button inside a form tag */