8000 Merge branch '5.3' into 5.4 · symfony/symfony@402901c · GitHub
[go: up one dir, main page]

Skip to content

Commit 402901c

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: [DomCrawler] Backport type fixes
2 parents 83825c5 + 19b96f8 commit 402901c

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

src/Symfony/Component/DomCrawler/AbstractUriElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class AbstractUriElement
3535

3636
/**
3737
* @param \DOMElement $node A \DOMElement instance
38-
* @param string $currentUri The URI of the page where the link is embedded (or the base href)
38+
* @param string|null $currentUri The URI of the page where the link is embedded (or the base href)
3939
* @param string|null $method The method to use for the link (GET by default)
4040
*
4141
* @throws \InvalidArgumentException if the node is not a link

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,22 @@
2121
*/
2222
class Crawler implements \Countable, \IteratorAggregate
2323
{
24+
/**
25+
* @var string|null
26+
*/
2427
protected $uri;
2528

2629
/**
27-
* @var string The default namespace prefix to be used with XPath and CSS expressions
30+
* The default namespace prefix to be used with XPath and CSS expressions.
31+
*
32+
* @var string
2833
*/
2934
private $defaultNamespacePrefix = 'default';
3035

3136
/**
32-
* @var array A map of manually registered namespaces
37+
* A map of manually registered namespaces.
38+
*
39+
* @var array<string, string>
3340
*/
3441
private $namespaces = [];
3542

@@ -39,7 +46,9 @@ class Crawler implements \Countable, \IteratorAggregate
3946
private $cachedNamespaces;
4047

4148
/**
42-
* @var string The base href value
49+
* The base href value.
50+
*
51+
* @var string|null
4352
*/
4453
private $baseHref;
4554

@@ -81,7 +90,7 @@ public function __construct($node = null, string $uri = null, string $baseHref =
8190
/**
8291
* Returns the current URI.
8392
*
84-
* @return string
93+
* @return string|null
8594
*/
8695
public function getUri()
8796
{
@@ -91,7 +100,7 @@ public function getUri()
91100
/**
92101
* Returns base href.
93102
*
94-
* @return string
103+
* @return string|null
95104
*/
96105
public function getBaseHref()
97106
{

src/Symfony/Component/DomCrawler/Form.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class Form extends Link implements \ArrayAccess
3838

3939
/**
4040
* @param \DOMElement $node A \DOMElement instance
41-
* @param string $currentUri The URI of the page where the form is embedded
42-
* @param string $method The method to use for the link (if null, it defaults to the method defined by the form)
43-
* @param string $baseHref The URI of the <base> used for relative links, but not for empty action
41+
* @param string|null $currentUri The URI of the page where the form is embedded
42+
* @param string|null $method The method to use for the link (if null, it defaults to the method defined by the form)
43+
* @param string|null $baseHref The URI of the <base> used for relative links, but not for empty action
4444
*
4545
* @throws \LogicException if the node is not a button inside a form tag
4646
*/

0 commit comments

Comments
 (0)
0