Merge pull request #2741 from rectorphp/fix-inter

fix IntersectionTypeMapper
This commit is contained in:
Tomas Votruba 2020-01-22 01:53:56 +01:00 committed by GitHub
commit a9596f2195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,6 @@ use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\Type\IntersectionType; use PHPStan\Type\IntersectionType;
use PHPStan\Type\Type; use PHPStan\Type\Type;
use Rector\AttributeAwarePhpDoc\Ast\Type\AttributeAwareIntersectionTypeNode; use Rector\AttributeAwarePhpDoc\Ast\Type\AttributeAwareIntersectionTypeNode;
use Rector\Exception\NotImplementedException;
use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface; use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface;
use Rector\PHPStanStaticTypeMapper\PHPStanStaticTypeMapper; use Rector\PHPStanStaticTypeMapper\PHPStanStaticTypeMapper;
@ -54,7 +53,8 @@ final class IntersectionTypeMapper implements TypeMapperInterface
*/ */
public function mapToPhpParserNode(Type $type, ?string $kind = null): ?Node public function mapToPhpParserNode(Type $type, ?string $kind = null): ?Node
{ {
throw new NotImplementedException(); // intersection types in PHP are not yet supported
return null;
} }
/** /**