Skip to content

Commit

Permalink
Removed implicitly nullable parameter declarations for php 8.4 compat…
Browse files Browse the repository at this point in the history
…ibility
  • Loading branch information
mck89 committed Jul 23, 2024
1 parent 97dd57f commit 1b39438
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/Peast/Selector/Matches.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct($matches = array())
* @param Node $node
* @param Node|null $parent
*/
public function addMatch(Node $node, Node $parent = null)
public function addMatch(Node $node, $parent = null)
{
$this->matches[] = array($node, $parent);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Peast/Selector/Node/Part/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function setRegex($regex)
*
* @return bool
*/
public function check(Node $node, Node $parent = null)
public function check(Node $node, $parent = null)
{
$attr = $node;
foreach ($this->names as $name) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Peast/Selector/Node/Part/Part.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ public function getPriority()
*
* @abstract
*/
abstract public function check(Node $node, Node $parent = null);
abstract public function check(Node $node, $parent = null);
}
2 changes: 1 addition & 1 deletion lib/Peast/Selector/Node/Part/PseudoIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function setOffset($offset)
*
* @return bool
*/
public function check(Node $node, Node $parent = null)
public function check(Node $node, $parent = null)
{
$props = Utils::getExpandedNodeProperties($parent);
$count = count($props);
Expand Down
2 changes: 1 addition & 1 deletion lib/Peast/Selector/Node/Part/PseudoSelector.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function setSelector(Selector $selector)
*
* @return bool
*/
public function check(Node $node, Node $parent = null)
public function check(Node $node, $parent = null)
{
$match = new Matches();
$match->addMatch($node, $parent);
Expand Down
2 changes: 1 addition & 1 deletion lib/Peast/Selector/Node/Part/PseudoSimple.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class PseudoSimple extends Pseudo
*
* @return bool
*/
public function check(Node $node, Node $parent = null)
public function check(Node $node, $parent = null)
{
switch ($this->name) {
case "pattern":
Expand Down
2 changes: 1 addition & 1 deletion lib/Peast/Selector/Node/Part/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function setType($type)
*
* @return bool
*/
public function check(Node $node, Node $parent = null)
public function check(Node $node, $parent = null)
{
return $node->getType() === $this->type;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Peast/Syntax/CommentsRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function onScannerResetState(&$state)
*
* @return void
*/
public function onTokenConsumed(Token $token = null)
public function onTokenConsumed($token = null)
{
//Check if it's a comment
if ($token && $token->type === Token::TYPE_COMMENT) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Peast/Syntax/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ public function getPosition($scanPosition = false)
*
* @return $this
*/
public function setScanPosition(Position $position = null)
public function setScanPosition(Position $position)
{
$this->line = $position->getLine();
$this->column = $position->getColumn();
Expand Down

0 comments on commit 1b39438

Please sign in to comment.