🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-15 04:59:39 | PHP 8.1.34
📂
/ (Root)
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
PHPStanStaticTypeMapper
/
TypeMapper
📍 /opt/cpanel/ea-wappspector/vendor/rector/rector/src/PHPStanStaticTypeMapper/TypeMapper
🔄 Refresh
✏️
Editing: ConditionalTypeForParameterMapper.php
Read Only
<?php declare (strict_types=1); namespace Rector\PHPStanStaticTypeMapper\TypeMapper; use PhpParser\Node; use PHPStan\PhpDocParser\Ast\Type\TypeNode; use PHPStan\Type\ConditionalTypeForParameter; use PHPStan\Type\Type; use PHPStan\Type\TypeCombinator; use Rector\PHPStanStaticTypeMapper\Contract\TypeMapperInterface; use Rector\PHPStanStaticTypeMapper\Enum\TypeKind; use Rector\PHPStanStaticTypeMapper\PHPStanStaticTypeMapper; /** * @implements TypeMapperInterface<ConditionalTypeForParameter> */ final class ConditionalTypeForParameterMapper implements TypeMapperInterface { /** * @var \Rector\PHPStanStaticTypeMapper\PHPStanStaticTypeMapper */ private $phpStanStaticTypeMapper; public function autowire(PHPStanStaticTypeMapper $phpStanStaticTypeMapper) : void { $this->phpStanStaticTypeMapper = $phpStanStaticTypeMapper; } public function getNodeClass() : string { return ConditionalTypeForParameter::class; } /** * @param ConditionalTypeForParameter $type */ public function mapToPHPStanPhpDocTypeNode(Type $type) : TypeNode { return $type->toPhpDocNode(); } /** * @param ConditionalTypeForParameter $type * @param TypeKind::* $typeKind */ public function mapToPhpParserNode(Type $type, string $typeKind) : ?Node { $type = TypeCombinator::union($type->getIf(), $type->getElse()); return $this->phpStanStaticTypeMapper->mapToPhpParserNode($type, $typeKind); } }
💾 Save Changes
❌ Cancel