Skip to content

Commit

Permalink
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_…
Browse files Browse the repository at this point in the history
…null_value
  • Loading branch information
nicolas-grekas committed Jan 23, 2024
1 parent 0ad3f7e commit 9e615d3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Node/ElementNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ElementNode extends AbstractNode
private $namespace;
private $element;

public function __construct(string $namespace = null, string $element = null)
public function __construct(?string $namespace = null, ?string $element = null)
{
$this->namespace = $namespace;
$this->element = $element;
Expand Down
2 changes: 1 addition & 1 deletion Node/SelectorNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SelectorNode extends AbstractNode
private $tree;
private $pseudoElement;

public function __construct(NodeInterface $tree, string $pseudoElement = null)
public function __construct(NodeInterface $tree, ?string $pseudoElement = null)
{
$this->tree = $tree;
$this->pseudoElement = $pseudoElement ? strtolower($pseudoElement) : null;
Expand Down
2 changes: 1 addition & 1 deletion Parser/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Parser implements ParserInterface
{
private $tokenizer;

public function __construct(Tokenizer $tokenizer = null)
public function __construct(?Tokenizer $tokenizer = null)
{
$this->tokenizer = $tokenizer ?? new Tokenizer();
}
Expand Down
2 changes: 1 addition & 1 deletion XPath/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Translator implements TranslatorInterface
private $pseudoClassTranslators = [];
private $attributeMatchingTranslators = [];

public function __construct(ParserInterface $parser = null)
public function __construct(?ParserInterface $parser = null)
{
$this->mainParser = $parser ?? new Parser();

Expand Down

0 comments on commit 9e615d3

Please sign in to comment.