mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
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]>
This commit is contained in:
co-authored by
laravel-ide-helper
parent
4d2728c4f0
commit
edb56754d1
+4
-4
@@ -55,7 +55,7 @@ class MacroTest extends TestCase
|
|||||||
{
|
{
|
||||||
$phpdoc = (new MacroMock())->getPhpDoc(
|
$phpdoc = (new MacroMock())->getPhpDoc(
|
||||||
new ReflectionFunction(
|
new ReflectionFunction(
|
||||||
function (int $a = null): int {
|
function (?int $a = null): int {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -79,7 +79,7 @@ class MacroTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* Test docblock.
|
* Test docblock.
|
||||||
*/
|
*/
|
||||||
function (int $a = null): int {
|
function (?int $a = null): int {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -103,7 +103,7 @@ class MacroTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* Test docblock.
|
* Test docblock.
|
||||||
*/
|
*/
|
||||||
function (int $a = null) {
|
function (?int $a = null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -274,7 +274,7 @@ class MacroMock extends Macro
|
|||||||
// no need to call parent
|
// 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;
|
return (new Macro($method, '', $class ?? $method->getClosureScopeClass()))->phpdoc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user