Skip to content

Commit 5bd3347

Browse files
Add types to public and protected properties
1 parent 5ab677d commit 5bd3347

File tree

3 files changed

+10
-42
lines changed

3 files changed

+10
-42
lines changed

AbstractUriElement.php

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,9 @@
1818
*/
1919
abstract class AbstractUriElement
2020
{
21-
/**
22-
* @var \DOMElement
23-
*/
24-
protected $node;
25-
26-
/**
27-
* @var string|null The method to use for the element
28-
*/
29-
protected $method;
30-
31-
/**
32-
* @var string The URI of the page where the element is embedded (or the base href)
33-
*/
34-
protected $currentUri;
21+
protected \DOMElement $node;
22+
protected ?string $method;
23+
protected ?string $currentUri;
3524

3625
/**
3726
* @param \DOMElement $node A \DOMElement instance

Crawler.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@
2323
*/
2424
class Crawler implements \Countable, \IteratorAggregate
2525
{
26-
/**
27-
* @var string|null
28-
*/
29-
protected $uri;
26+
protected ?string $uri;
3027

3128
/**
3229
* The default namespace prefix to be used with XPath and CSS expressions.

Field/FormField.php

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,12 @@
1818
*/
1919
abstract class FormField
2020
{
21-
/**
22-
* @var \DOMElement
23-
*/
24-
protected $node;
25-
/**
26-
* @var string
27-
*/
28-
protected $name;
29-
/**
30-
* @var string
31-
*/
32-
protected $value;
33-
/**
34-
* @var \DOMDocument
35-
*/
36-
protected $document;
37-
/**
38-
* @var \DOMXPath
39-
*/
40-
protected $xpath;
41-
/**
42-
* @var bool
43-
*/
44-
protected $disabled;
21+
protected \DOMElement $node;
22+
protected string $name;
23+
protected string|array|null $value = null;
24+
protected \DOMDocument $document;
25+
protected \DOMXPath $xpath;
26+
protected bool $disabled = false;
4527

4628
/**
4729
* @param \DOMElement $node The node associated with this field

0 commit comments

Comments
 (0)