diff --git a/resources/views/helper.php b/resources/views/helper.php index 9479a7e2f..11b691763 100644 --- a/resources/views/helper.php +++ b/resources/views/helper.php @@ -1,8 +1,8 @@ createFromReflector($reflectorForContext ?? $reflection); $context = new Context( diff --git a/src/Generator.php b/src/Generator.php index a509958d2..d77373402 100644 --- a/src/Generator.php +++ b/src/Generator.php @@ -50,7 +50,7 @@ public function __construct( $config, /* Illuminate\View\Factory */ $view, - OutputInterface $output = null, + ?OutputInterface $output = null, $helpers = '' ) { $this->config = $config; diff --git a/tests/MacroTest.php b/tests/MacroTest.php index cf1f79fa4..f1cce9a32 100644 --- a/tests/MacroTest.php +++ b/tests/MacroTest.php @@ -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; } ) @@ -79,7 +79,7 @@ public function testInitPhpDocClosureWithArgsAndReturnType(): void /** * Test docblock. */ - function (int $a = null): int { + function (?int $a = null): int { return 0; } ) @@ -103,7 +103,7 @@ public function testInitPhpDocClosureWithArgs(): void /** * Test docblock. */ - function (int $a = null) { + function (?int $a = null) { return 0; } ) @@ -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; }