Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jun 10, 2022
1 parent c12eedf commit d7ef485
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Rector\Core\ValueObject\PhpVersionFeature;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
use Rector\StaticTypeMapper\ValueObject\Type\NonExistingObjectType;
use Rector\TypeDeclaration\PhpDocParser\NonInformativeReturnTagRemover;
use Rector\TypeDeclaration\PhpParserTypeAnalyzer;
use Rector\TypeDeclaration\TypeAlreadyAddedChecker\ReturnTypeAlreadyAddedChecker;
Expand Down Expand Up @@ -109,7 +110,7 @@ public function refactor(Node $node): ?Node
[ReturnTypeDeclarationReturnTypeInfererTypeInferer::class]
);

if ($inferedReturnType instanceof MixedType) {
if ($inferedReturnType instanceof MixedType || $inferedReturnType instanceof NonExistingObjectType) {
return null;
}

Expand Down

0 comments on commit d7ef485

Please sign in to comment.