Documentation

OrderedClassElementsFixer extends AbstractFixer
in package
implements ConfigurationDefinitionFixerInterface

Tags
author

Gregor Harlan gharlan@web.de

Interfaces, Classes and Traits

ConfigurationDefinitionFixerInterface

Table of Contents

$specialTypes  : array<string|int, mixed>
$supportedSortAlgorithms  : array<string|int, string>
Array of supported sort algorithms in configuration.
$typeHierarchy  : array<string|int, mixed>
$typePosition  : array<string|int, mixed>
configure()  : mixed
{@inheritdoc}
getDefinition()  : mixed
{@inheritdoc}
getPriority()  : mixed
{@inheritdoc}
isCandidate()  : mixed
{@inheritdoc}
applyFix()  : mixed
{@inheritdoc}
createConfigurationDefinition()  : mixed
{@inheritdoc}
detectElementType()  : array<string|int, mixed>|string
findElementEnd()  : int
getElements()  : array<string|int, array<string|int, mixed>>
sortElements()  : array<string|int, array<string|int, mixed>>
sortGroupElements()  : mixed
sortTokens()  : mixed

Properties

$specialTypes

private static array<string|int, mixed> $specialTypes = ['construct' => null, 'destruct' => null, 'magic' => null, 'phpunit' => null]

$supportedSortAlgorithms

Array of supported sort algorithms in configuration.

private array<string|int, string> $supportedSortAlgorithms = [self::SORT_NONE, self::SORT_ALPHA]

$typeHierarchy

private static array<string|int, mixed> $typeHierarchy = ['use_trait' => null, 'public' => null, 'protected' => null, 'private' => null, 'constant' => null, 'constant_public' => ['constant', 'public'], 'constant_protected' => ['constant', 'protected'], 'constant_private' => ['constant', 'private'], 'property' => null, 'property_static' => ['property'], 'property_public' => ['property', 'public'], 'property_protected' => ['property', 'protected'], 'property_private' => ['property', 'private'], 'property_public_static' => ['property_static', 'property_public'], 'property_protected_static' => ['property_static', 'property_protected'], 'property_private_static' => ['property_static', 'property_private'], 'method' => null, 'method_abstract' => ['method'], 'method_static' => ['method'], 'method_public' => ['method', 'public'], 'method_protected' => ['method', 'protected'], 'method_private' => ['method', 'private'], 'method_public_abstract' => ['method_abstract', 'method_public'], 'method_protected_abstract' => ['method_abstract', 'method_protected'], 'method_public_abstract_static' => ['method_abstract', 'method_static', 'method_public'], 'method_protected_abstract_static' => ['method_abstract', 'method_static', 'method_protected'], 'method_public_static' => ['method_static', 'method_public'], 'method_protected_static' => ['method_static', 'method_protected'], 'method_private_static' => ['method_static', 'method_private']]

Methods

configure()

{@inheritdoc}

public configure([array<string|int, mixed> $configuration = null ]) : mixed
Parameters
$configuration : array<string|int, mixed> = null
Return values
mixed

getPriority()

{@inheritdoc}

public getPriority() : mixed

Must run before ClassAttributesSeparationFixer, MethodSeparationFixer, NoBlankLinesAfterClassOpeningFixer, SpaceAfterSemicolonFixer. Must run after NoPhp4ConstructorFixer, ProtectedToPrivateFixer.

Return values
mixed

createConfigurationDefinition()

{@inheritdoc}

protected createConfigurationDefinition() : mixed
Return values
mixed

detectElementType()

private detectElementType(Tokens $tokens, int $index) : array<string|int, mixed>|string
Parameters
$tokens : Tokens
$index : int
Return values
array<string|int, mixed>|string

type or array of type and name

getElements()

private getElements(Tokens $tokens, int $startIndex) : array<string|int, array<string|int, mixed>>
Parameters
$tokens : Tokens
$startIndex : int
Return values
array<string|int, array<string|int, mixed>>

sortElements()

private sortElements(array<string|int, array<string|int, mixed>> $elements) : array<string|int, array<string|int, mixed>>
Parameters
$elements : array<string|int, array<string|int, mixed>>
Return values
array<string|int, array<string|int, mixed>>

sortGroupElements()

private sortGroupElements(array<string|int, mixed> $a, array<string|int, mixed> $b) : mixed
Parameters
$a : array<string|int, mixed>
$b : array<string|int, mixed>
Return values
mixed

sortTokens()

private sortTokens(Tokens $tokens, int $startIndex, int $endIndex, array<string|int, array<string|int, mixed>> $elements) : mixed
Parameters
$tokens : Tokens
$startIndex : int
$endIndex : int
$elements : array<string|int, array<string|int, mixed>>
Return values
mixed

Search results