class PhpFixer (View source)

Constants

FLAG_OLDPHP

Coding style rules flag: compatible with PHP versions prior to 5.5.9 (the minimum PHP version required by concrete5).

FLAG_PHPONLY

Coding style rules flag: PHP-only files.

FLAG_BOOTSTRAP

Coding style rules flag: bootstrap files.

FLAG_PSR4CLASS

Coding style rules flag: files that implement classes following the PSR-4 rules.

Properties

protected PhpFixerOptions $options
protected PhpFixerRuleResolver $ruleResolver
protected PhpFixerRunner $runner

Methods

__construct(PhpFixerOptions $options, PhpFixerRuleResolver $ruleResolver, PhpFixerRunner $runner)

Initialize the instance.

getOptions()

Get the fixer options.

array
fix(InputInterface $input, OutputInterface $output, array $paths, bool $dryRun = false)

No description

array
splitPathToPathAndFlags(SplFileInfo $path)

No description

array
splitFileToPathAndFlags(SplFileInfo $file)

No description

array
splitDirectoryToPathAndFlags(SplFileInfo $directory)

No description

array
mergePathAndFlags(array $list1, array $list2)

No description

Details

__construct(PhpFixerOptions $options, PhpFixerRuleResolver $ruleResolver, PhpFixerRunner $runner)

Initialize the instance.

Parameters

PhpFixerOptions $options
PhpFixerRuleResolver $ruleResolver
PhpFixerRunner $runner

PhpFixerOptions getOptions()

Get the fixer options.

Return Value

PhpFixerOptions

array fix(InputInterface $input, OutputInterface $output, array $paths, bool $dryRun = false)

No description

Parameters

InputInterface $input
OutputInterface $output
array $paths

with absolute paths

bool $dryRun

Return Value

array

protected array splitPathToPathAndFlags(SplFileInfo $path)

No description

Parameters

SplFileInfo $path

Return Value

array

Exceptions

RuntimeException

protected array splitFileToPathAndFlags(SplFileInfo $file)

No description

Parameters

SplFileInfo $file

Return Value

array

protected array splitDirectoryToPathAndFlags(SplFileInfo $directory)

No description

Parameters

SplFileInfo $directory

Return Value

array

protected array mergePathAndFlags(array $list1, array $list2)

No description

Parameters

array $list1
array $list2

Return Value

array