Skip to content

Commit

Permalink
Merge pull request #70 from mck89/php-8.4-compatibility
Browse files Browse the repository at this point in the history
Php 8.4 compatibility
  • Loading branch information
mck89 committed Jul 23, 2024
2 parents 5d441a0 + 1b39438 commit f5c4786
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
max-parallel: 12
matrix:
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
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 f5c4786

Please sign in to comment.