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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function __construct(
) {
}

public function cleanFuncCall(FuncCall $funcCall, BitwiseOr $bitwiseOr, string $flag, Expr $expr = null): void
public function cleanFuncCall(FuncCall $funcCall, BitwiseOr $bitwiseOr, string $flag, ?Expr $expr = null): void
{
if ($bitwiseOr->left instanceof BitwiseOr) {
/** @var BitwiseOr $leftLeft */
Expand Down
4 changes: 2 additions & 2 deletions src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct(

public function decorateReturn(ClassMethod|Function_|Closure|ArrowFunction $functionLike): void
{
if ($functionLike->returnType === null) {
if (! $functionLike->returnType instanceof Node) {
return;
}

Expand Down Expand Up @@ -159,7 +159,7 @@ public function decorateReturnWithSpecificType(
ClassMethod|Function_|Closure|ArrowFunction $functionLike,
Type $requireType
): bool {
if ($functionLike->returnType === null) {
if (! $functionLike->returnType instanceof Node) {
return false;
}

Expand Down
Loading