Skip to content

Commit

Permalink
Add types to public and protected properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jul 27, 2023
1 parent 5ab677d commit 5bd3347
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 42 deletions.
17 changes: 3 additions & 14 deletions AbstractUriElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,9 @@
*/
abstract class AbstractUriElement
{
/**
* @var \DOMElement
*/
protected $node;

/**
* @var string|null The method to use for the element
*/
protected $method;

/**
* @var string The URI of the page where the element is embedded (or the base href)
*/
protected $currentUri;
protected \DOMElement $node;
protected ?string $method;
protected ?string $currentUri;

/**
* @param \DOMElement $node A \DOMElement instance
Expand Down
5 changes: 1 addition & 4 deletions Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
*/
class Crawler implements \Countable, \IteratorAggregate
{
/**
* @var string|null
*/
protected $uri;
protected ?string $uri;

/**
* The default namespace prefix to be used with XPath and CSS expressions.
Expand Down
30 changes: 6 additions & 24 deletions Field/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,12 @@
*/
abstract class FormField
{
/**
* @var \DOMElement
*/
protected $node;
/**
* @var string
*/
protected $name;
/**
* @var string
*/
protected $value;
/**
* @var \DOMDocument
*/
protected $document;
/**
* @var \DOMXPath
*/
protected $xpath;
/**
* @var bool
*/
protected $disabled;
protected \DOMElement $node;
protected string $name;
protected string|array|null $value = null;
protected \DOMDocument $document;
protected \DOMXPath $xpath;
protected bool $disabled = false;

/**
* @param \DOMElement $node The node associated with this field
Expand Down

0 comments on commit 5bd3347

Please sign in to comment.