BossBey File Manager
PHP:
7.4.33
OS:
Linux
User:
root
Root
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
PHPStanStaticTypeMapper
/
TypeMapper
📤 Upload
📝 New File
📁 New Folder
Close
Editing: ParentStaticTypeMapper.php
<?php declare (strict_types=1); namespace Rector\PHPStanStaticTypeMapper\TypeMapper; use PhpParser\Node; use PhpParser\Node\Name; use PHPStan\PhpDocParser\Ast\Type\TypeNode; use PHPStan\Type\Type; use Rector\Enum\ObjectReference; use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface; use Rector\StaticTypeMapper\ValueObject\Type\ParentStaticType; /** * @implements TypeMapperInterface<ParentStaticType> */ final class ParentStaticTypeMapper implements TypeMapperInterface { public function getNodeClass() : string { return ParentStaticType::class; } /** * @param ParentStaticType $type */ public function mapToPHPStanPhpDocTypeNode(Type $type) : TypeNode { return $type->toPhpDocNode(); } /** * @param ParentStaticType $type */ public function mapToPhpParserNode(Type $type, string $typeKind) : ?Node { return new Name(ObjectReference::PARENT); } }
Save
Cancel