Skip to content

Commit

Permalink
Remove deprecation notices in PHP8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
adoy committed Nov 28, 2024
1 parent 7399589 commit 19e804f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Parser
private array $macro = [];
private array $variables = [];

public function __construct(Lexer $lexer = null)
public function __construct(?Lexer $lexer = null)
{
$this->lexer = $lexer ?: new Lexer();
}
Expand Down Expand Up @@ -153,7 +153,7 @@ private function parseObject(): ObjectNode
* KeyValueList ::= VariableAssignation|KeyValue [ Separator [ KeyValueList ] ]
* KeyValue ::= ( ( T_END_STR | T_NAME ) OptionalAssignementOperator Value ) | MacroCall
*/
private function parseInnerObject(ObjectNode $object = null): ObjectNode
private function parseInnerObject(?ObjectNode $object = null): ObjectNode
{
$object = $object ?: new ObjectNode();
do {
Expand Down
2 changes: 1 addition & 1 deletion tests/NaclTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testNacl(string $naclFile, string $jsonFile): void

$this->parser->registerMacro(new Macros\Callback('testMacroWithOptions', fn($p, $a = []) => [
'param' => $p,
'options' => $a
'options' => $a,
]));

$this->parser->registerMacro(new Macros\Callback('testMacro', fn($p, $a = []) => $p));
Expand Down

0 comments on commit 19e804f

Please sign in to comment.