Skip to content

Commit edb5675

Browse files
JeppeKnockaertlaravel-ide-helper
andauthored
Fix PHP 8.4 deprecations (#1618)
* Replace implicitly nullable parameters for PHP 8.4 * composer fix-style --------- Co-authored-by: laravel-ide-helper <[email protected]>
1 parent 4d2728c commit edb5675

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/MacroTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function testInitPhpDocClosureWithoutDocBlock(): void
5555
{
5656
$phpdoc = (new MacroMock())->getPhpDoc(
5757
new ReflectionFunction(
58-
function (int $a = null): int {
58+
function (?int $a = null): int {
5959
return 0;
6060
}
6161
)
@@ -79,7 +79,7 @@ public function testInitPhpDocClosureWithArgsAndReturnType(): void
7979
/**
8080
* Test docblock.
8181
*/
82-
function (int $a = null): int {
82+
function (?int $a = null): int {
8383
return 0;
8484
}
8585
)
@@ -103,7 +103,7 @@ public function testInitPhpDocClosureWithArgs(): void
103103
/**
104104
* Test docblock.
105105
*/
106-
function (int $a = null) {
106+
function (?int $a = null) {
107107
return 0;
108108
}
109109
)
@@ -274,7 +274,7 @@ public function __construct()
274274
// no need to call parent
275275
}
276276

277-
public function getPhpDoc(ReflectionFunctionAbstract $method, ReflectionClass $class = null): DocBlock
277+
public function getPhpDoc(ReflectionFunctionAbstract $method, ?ReflectionClass $class = null): DocBlock
278278
{
279279
return (new Macro($method, '', $class ?? $method->getClosureScopeClass()))->phpdoc;
280280
}

0 commit comments

Comments
 (0)