Skip to content

Commit

Permalink
Fix PHP 8.4 deprecations (#1618)
Browse files Browse the repository at this point in the history
* Replace implicitly nullable parameters for PHP 8.4

* composer fix-style

---------

Co-authored-by: laravel-ide-helper <laravel-ide-helper@users.noreply.github.com>
  • Loading branch information
JeppeKnockaert and laravel-ide-helper authored Dec 14, 2024
1 parent 4d2728c commit edb5675
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/MacroTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testInitPhpDocClosureWithoutDocBlock(): void
{
$phpdoc = (new MacroMock())->getPhpDoc(
new ReflectionFunction(
function (int $a = null): int {
function (?int $a = null): int {
return 0;
}
)
Expand All @@ -79,7 +79,7 @@ public function testInitPhpDocClosureWithArgsAndReturnType(): void
/**
* Test docblock.
*/
function (int $a = null): int {
function (?int $a = null): int {
return 0;
}
)
Expand All @@ -103,7 +103,7 @@ public function testInitPhpDocClosureWithArgs(): void
/**
* Test docblock.
*/
function (int $a = null) {
function (?int $a = null) {
return 0;
}
)
Expand Down Expand Up @@ -274,7 +274,7 @@ public function __construct()
// no need to call parent
}

public function getPhpDoc(ReflectionFunctionAbstract $method, ReflectionClass $class = null): DocBlock
public function getPhpDoc(ReflectionFunctionAbstract $method, ?ReflectionClass $class = null): DocBlock
{
return (new Macro($method, '', $class ?? $method->getClosureScopeClass()))->phpdoc;
}
Expand Down

0 comments on commit edb5675

Please # to comment.