PHP Class PHPStan\Type\TypehintHelper

Datei anzeigen Open project: phpstan/phpstan Class Usage Examples

Public Methods

Method Description
decideType ( ReflectionType $reflectionType = null, PHPStan\Type\Type $phpDocType = null, string $selfClass = null, boolean $isVariadic = false ) : PHPStan\Type\Type
decideType ( PHPStan\Type\Type $type, PHPStan\Type\Type $phpDocType = null ) : PHPStan\Type\Type
decideTypeFromReflection ( ReflectionType $reflectionType = null, PHPStan\Type\Type $phpDocType = null, string $selfClass = null, boolean $isVariadic = false ) : PHPStan\Type\Type
getPhpDocParameterTypesFromMethod ( array $typeMap, array $parameterNames, string $docComment ) : array
getPhpDocReturnTypeFromMethod ( array $typeMap, string $docComment ) : PHPStan\Type\Type | null
getTypeObjectFromTypehint ( string $typehintString, boolean $isNullable, string $selfClass = null ) : PHPStan\Type\Type

Private Methods

Method Description
getMethodParameterAnnotationTypeString ( array $phpDocParameterTypeStrings, string $parameterName ) : string | null
getReturnTypeStringFromMethod ( string $docComment ) : string | null

Method Details

decideType() public static method

public static decideType ( ReflectionType $reflectionType = null, PHPStan\Type\Type $phpDocType = null, string $selfClass = null, boolean $isVariadic = false ) : PHPStan\Type\Type
$reflectionType ReflectionType
$phpDocType PHPStan\Type\Type
$selfClass string
$isVariadic boolean
return PHPStan\Type\Type

decideType() public static method

public static decideType ( PHPStan\Type\Type $type, PHPStan\Type\Type $phpDocType = null ) : PHPStan\Type\Type
$type PHPStan\Type\Type
$phpDocType PHPStan\Type\Type
return PHPStan\Type\Type

decideTypeFromReflection() public static method

public static decideTypeFromReflection ( ReflectionType $reflectionType = null, PHPStan\Type\Type $phpDocType = null, string $selfClass = null, boolean $isVariadic = false ) : PHPStan\Type\Type
$reflectionType ReflectionType
$phpDocType PHPStan\Type\Type
$selfClass string
$isVariadic boolean
return PHPStan\Type\Type

getPhpDocParameterTypesFromMethod() public static method

public static getPhpDocParameterTypesFromMethod ( array $typeMap, array $parameterNames, string $docComment ) : array
$typeMap array
$parameterNames array
$docComment string
return array

getPhpDocReturnTypeFromMethod() public static method

public static getPhpDocReturnTypeFromMethod ( array $typeMap, string $docComment ) : PHPStan\Type\Type | null
$typeMap array
$docComment string
return PHPStan\Type\Type | null

getTypeObjectFromTypehint() public static method

public static getTypeObjectFromTypehint ( string $typehintString, boolean $isNullable, string $selfClass = null ) : PHPStan\Type\Type
$typehintString string
$isNullable boolean
$selfClass string
return PHPStan\Type\Type