Documentation

PhpdocParamOrderFixer extends AbstractFixer
in package

FinalYes
Tags
author

Jonathan Gruber gruberjonathan@gmail.com

Table of Contents

Constants

PARAM_TAG  = 'param'

Methods

getDefinition()  : FixerDefinitionInterface
getPriority()  : int
{@inheritdoc}
isCandidate()  : bool
applyFix()  : void
findParamAnnotationByIdentifier()  : array<int, int>|null
Return the indices of the lines of a specific parameter annotation.
getFunctionParamNames()  : array<int, Token>
getOtherAnnotationsBetweenParams()  : array<int, string>
Fetch all annotations except the param ones.
rewriteDocBlock()  : DocBlock
Overwrite the param annotations in order.
sortParamAnnotations()  : array<int, string>
Sort the param annotations according to the function parameters.

Constants

Methods

getPriority()

{@inheritdoc}

public getPriority() : int

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

Return values
int

findParamAnnotationByIdentifier()

Return the indices of the lines of a specific parameter annotation.

private findParamAnnotationByIdentifier(array<int, Annotation$paramAnnotations, string $identifier) : array<int, int>|null
Parameters
$paramAnnotations : array<int, Annotation>
$identifier : string
Return values
array<int, int>|null

getOtherAnnotationsBetweenParams()

Fetch all annotations except the param ones.

private getOtherAnnotationsBetweenParams(DocBlock $doc, array<int, Annotation$paramAnnotations) : array<int, string>
Parameters
$doc : DocBlock
$paramAnnotations : array<int, Annotation>
Return values
array<int, string>

sortParamAnnotations()

Sort the param annotations according to the function parameters.

private sortParamAnnotations(array<int, Token$funcParamNames, array<int, Annotation$paramAnnotations) : array<int, string>
Parameters
$funcParamNames : array<int, Token>
$paramAnnotations : array<int, Annotation>
Return values
array<int, string>

        
On this page

Search results