Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions resources/views/helper.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?= '<?php' ?>
<?php
/**
* @var \Barryvdh\LaravelIdeHelper\Alias[][] $namespaces_by_alias_ns
* @var \Barryvdh\LaravelIdeHelper\Alias[][] $namespaces_by_extends_ns
* @var Barryvdh\LaravelIdeHelper\Alias[][] $namespaces_by_alias_ns
* @var Barryvdh\LaravelIdeHelper\Alias[][] $namespaces_by_extends_ns
* @var bool $include_fluent
* @var string $helpers
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Console/ModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ protected function getCommentFromDocBlock(\ReflectionMethod $reflection)
*
* @return null|string
*/
protected function getReturnTypeFromDocBlock(\ReflectionMethod $reflection, \Reflector $reflectorForContext = null)
protected function getReturnTypeFromDocBlock(\ReflectionMethod $reflection, ?\Reflector $reflectorForContext = null)
{
$phpDocContext = (new ContextFactory())->createFromReflector($reflectorForContext ?? $reflection);
$context = new Context(
Expand Down
2 changes: 1 addition & 1 deletion src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(
$config,
/* Illuminate\View\Factory */
$view,
OutputInterface $output = null,
?OutputInterface $output = null,
$helpers = ''
) {
$this->config = $config;
Expand Down
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