PhpdocAlignFixer
extends AbstractFixer
in package
implements
ConfigurationDefinitionFixerInterface, WhitespacesAwareFixerInterface
Tags
Interfaces, Classes and Traits
Table of Contents
- $align : string
- $alignableTags : mixed
- $regex : string
- $regexCommentLine : string
- $tagsWithMethodSignature : mixed
- $tagsWithName : mixed
- configure() : mixed
- {@inheritdoc}
- getDefinition() : mixed
- {@inheritdoc}
- getPriority() : mixed
- {@inheritdoc}
- isCandidate() : mixed
- {@inheritdoc}
- applyFix() : mixed
- {@inheritdoc}
- createConfigurationDefinition() : mixed
- {@inheritdoc}
- fixDocBlock() : mixed
- getIndent() : string
- getLeftAlignedDescriptionIndent() : int
- getMatches() : null|array<string, null|string>
- getSentenceIndent() : int
- Get indent for sentence.
Properties
$align
private
string
$align
$alignableTags
private
static mixed
$alignableTags
= ['param', 'property', 'property-read', 'property-write', 'return', 'throws', 'type', 'var', 'method']
$regex
private
string
$regex
$regexCommentLine
private
string
$regexCommentLine
$tagsWithMethodSignature
private
static mixed
$tagsWithMethodSignature
= ['method']
$tagsWithName
private
static mixed
$tagsWithName
= ['param', 'property']
Methods
configure()
{@inheritdoc}
public
configure([array<string|int, mixed> $configuration = null ]) : mixed
Parameters
- $configuration : array<string|int, mixed> = null
Return values
mixed —getDefinition()
{@inheritdoc}
public
getDefinition() : mixed
Return values
mixed —getPriority()
{@inheritdoc}
public
getPriority() : mixed
Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, CommentToPhpdocFixer, GeneralPhpdocAnnotationRemoveFixer, GeneralPhpdocTagRenameFixer, NoBlankLinesAfterPhpdocFixer, NoEmptyPhpdocFixer, NoSuperfluousPhpdocTagsFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAddMissingParamAnnotationFixer, PhpdocAnnotationWithoutDotFixer, PhpdocIndentFixer, PhpdocIndentFixer, PhpdocInlineTagFixer, PhpdocInlineTagNormalizerFixer, PhpdocLineSpanFixer, PhpdocNoAccessFixer, PhpdocNoAliasTagFixer, PhpdocNoEmptyReturnFixer, PhpdocNoPackageFixer, PhpdocNoUselessInheritdocFixer, PhpdocOrderByValueFixer, PhpdocOrderFixer, PhpdocReturnSelfReferenceFixer, PhpdocScalarFixer, PhpdocScalarFixer, PhpdocSeparationFixer, PhpdocSingleLineVarSpacingFixer, PhpdocSummaryFixer, PhpdocTagCasingFixer, PhpdocTagTypeFixer, PhpdocToCommentFixer, PhpdocToCommentFixer, PhpdocToParamTypeFixer, PhpdocToPropertyTypeFixer, PhpdocToReturnTypeFixer, PhpdocTrimConsecutiveBlankLineSeparationFixer, PhpdocTrimFixer, PhpdocTypesFixer, PhpdocTypesFixer, PhpdocTypesOrderFixer, PhpdocVarAnnotationCorrectOrderFixer, PhpdocVarWithoutNameFixer.
Return values
mixed —isCandidate()
{@inheritdoc}
public
isCandidate(Tokens $tokens) : mixed
Parameters
- $tokens : Tokens
Return values
mixed —applyFix()
{@inheritdoc}
protected
applyFix(SplFileInfo $file, Tokens $tokens) : mixed
Parameters
- $file : SplFileInfo
- $tokens : Tokens
Return values
mixed —createConfigurationDefinition()
{@inheritdoc}
protected
createConfigurationDefinition() : mixed
Return values
mixed —fixDocBlock()
private
fixDocBlock(DocBlock $docBlock) : mixed
Parameters
- $docBlock : DocBlock
Return values
mixed —getIndent()
private
getIndent(int $verticalAlignIndent[, int $leftAlignIndent = 1 ]) : string
Parameters
- $verticalAlignIndent : int
- $leftAlignIndent : int = 1
Return values
string —getLeftAlignedDescriptionIndent()
private
getLeftAlignedDescriptionIndent(array<string|int, array<string|int, mixed>> $items, int $index) : int
Parameters
- $items : array<string|int, array<string|int, mixed>>
- $index : int
Return values
int —getMatches()
private
getMatches(string $line[, bool $matchCommentOnly = false ]) : null|array<string, null|string>
Parameters
- $line : string
- $matchCommentOnly : bool = false
Return values
null|array<string, null|string> —getSentenceIndent()
Get indent for sentence.
private
getSentenceIndent(null|string $sentence) : int
Parameters
- $sentence : null|string