Skip to content

Commit

Permalink
Use explicit nullability in test
Browse files Browse the repository at this point in the history
Avoid a deprecation warning on PHP 8.4.
  • Loading branch information
nikic committed Sep 21, 2024
1 parent 0f585f0 commit 78f289c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/PhpParser/Parser/MultipleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ public function testThrownError() {
$this->expectExceptionMessage('FAIL A');

$parserA = new class implements \PhpParser\Parser {
public function parse(string $code, ErrorHandler $errorHandler = null) {
public function parse(string $code, ?ErrorHandler $errorHandler = null) {
throw new Error('FAIL A');
}
};
$parserB = new class implements \PhpParser\Parser {
public function parse(string $code, ErrorHandler $errorHandler = null) {
public function parse(string $code, ?ErrorHandler $errorHandler = null) {
throw new Error('FAIL B');
}
};
Expand Down

0 comments on commit 78f289c

Please sign in to comment.