class PhpFixerRuleResolver (View source)

Constants

protected INVARIANT_RULES

PHP-CS-Fixer rules that can be safely applied to all files.

In order to view/edit them, open https://mlocati.github.io/php-cs-fixer-configurator/#configurator and paste there this array.

Properties

private FixerFactory $fixerFactory

Methods

__construct(FixerFactory $fixerFactory)

No description

string
describeFlags(int $flags)

Get a description of the specified flags.

array
getRules(int $flags, bool $onlyAvailableOnes, string $minimumPhpVersion = '')

Get the rules associated to specific flags.

FixerInterface[]
getFixers(array $rules)

Resolve the fixers associated to the rules.

FixerFactory
getFixerFactory()

No description

Details

__construct(FixerFactory $fixerFactory)

No description

Parameters

FixerFactory $fixerFactory

string describeFlags(int $flags)

Get a description of the specified flags.

Parameters

int $flags

A combination of CodingStyle::FLAG_... flags.

Return Value

string

array getRules(int $flags, bool $onlyAvailableOnes, string $minimumPhpVersion = '')

Get the rules associated to specific flags.

Parameters

int $flags

A combination of PhpFixer::FLAG_... flags.

bool $onlyAvailableOnes

return only the available rules

string $minimumPhpVersion

the minimum PHP version that the files to be checked/fixed must be compatible with

Return Value

array

FixerInterface[] getFixers(array $rules)

Resolve the fixers associated to the rules.

Parameters

array $rules

the list of the rules (as returned by the getRules method)

Return Value

FixerInterface[]

protected FixerFactory getFixerFactory()

No description

Return Value

FixerFactory