Skip to content

Commit 8ea7fd8

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [DomCrawler] Backport type fixes
2 parents 69000c4 + 59735ed commit 8ea7fd8

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

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

Crawler.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,29 @@
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

3643
/**
37-
* @var string The base href value
44+
* The base href value.
45+
*
46+
* @var string|null
3847
*/
3948
private $baseHref;
4049

@@ -75,7 +84,7 @@ public function __construct($node = null, string $uri = null, string $baseHref =
7584
/**
7685
* Returns the current URI.
7786
*
78-
* @return string
87+
* @return string|null
7988
*/
8089
public function getUri()
8190
{
@@ -85,7 +94,7 @@ public function getUri()
8594
/**
8695
* Returns base href.
8796
*
88-
* @return string
97+
* @return string|null
8998
*/
9099
public function getBaseHref()
91100
{

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)