Documentation

PhpdocToParamTypeFixer extends AbstractPhpdocToTypeDeclarationFixer
in package

Tags
author

Jan Gantzert jan@familie-gantzert.de

Table of Contents

$excludeFuncNames  : mixed
$skippedTypes  : array<string, true>
getDefinition()  : mixed
{@inheritdoc}
getPriority()  : mixed
{@inheritdoc}
isCandidate()  : mixed
{@inheritdoc}
applyFix()  : mixed
{@inheritdoc}
isSkippedType()  : mixed
findCorrectVariable()  : null|int
hasParamTypeHint()  : bool
Determine whether the function already has a param type hint.

Properties

$excludeFuncNames

private mixed $excludeFuncNames = [[T_STRING, '__clone'], [T_STRING, '__destruct']]

$skippedTypes

private array<string, true> $skippedTypes = ['mixed' => true, 'resource' => true, 'static' => true, 'void' => true]

Methods

getPriority()

{@inheritdoc}

public getPriority() : mixed

Must run before NoSuperfluousPhpdocTagsFixer, PhpdocAlignFixer. Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.

Return values
mixed

applyFix()

{@inheritdoc}

protected applyFix(SplFileInfo $file, Tokens $tokens) : mixed
Parameters
$file : SplFileInfo
$tokens : Tokens
Return values
mixed

isSkippedType()

protected isSkippedType(mixed $type) : mixed
Parameters
$type : mixed
Return values
mixed

hasParamTypeHint()

Determine whether the function already has a param type hint.

private hasParamTypeHint(Tokens $tokens, int $index) : bool
Parameters
$tokens : Tokens
$index : int

The index of the end of the function definition line, EG at { or ;

Return values
bool

Search results