CustomRulesetsAwareConfigInterface
extends
ConfigInterface
in
Tags
Table of Contents
Methods
- getCacheFile() : null|non-empty-string
- Returns the path to the cache file.
- getCustomFixers() : array<int, FixerInterface>
- Returns the custom fixers to use.
- getCustomRuleSets() : array<int, RuleSetDefinitionInterface>
- getFinder() : iterable<string|int, SplFileInfo>
- Returns files to scan.
- getFormat() : string
- getHideProgress() : bool
- Returns true if progress should be hidden.
- getIndent() : non-empty-string
- getLineEnding() : non-empty-string
- getName() : string
- Returns the name of the configuration.
- getPhpExecutable() : string|null
- Get configured PHP executable, if any.
- getRiskyAllowed() : bool
- Check if it is allowed to run risky fixers.
- getRules() : array<string, array<string, mixed>|bool>
- Get rules.
- getUsingCache() : bool
- Returns true if caching should be enabled.
- registerCustomFixers() : $this
- Adds a suite of custom fixers.
- registerCustomRuleSets() : $this
- Registers custom rule sets to be used the same way as built-in rule sets.
- setCacheFile() : $this
- Sets the path to the cache file.
- setFinder() : $this
- setFormat() : $this
- setHideProgress() : $this
- setIndent() : $this
- setLineEnding() : $this
- setPhpExecutable() : $this
- Set PHP executable.
- setRiskyAllowed() : $this
- Set if it is allowed to run risky fixers.
- setRules() : $this
- Set rules.
- setUsingCache() : $this
Methods
getCacheFile()
Returns the path to the cache file.
public
getCacheFile() : null|non-empty-string
Return values
null|non-empty-string —Returns null if not using cache
getCustomFixers()
Returns the custom fixers to use.
public
getCustomFixers() : array<int, FixerInterface>
Return values
array<int, FixerInterface>getCustomRuleSets()
public
getCustomRuleSets() : array<int, RuleSetDefinitionInterface>
Return values
array<int, RuleSetDefinitionInterface>getFinder()
Returns files to scan.
public
getFinder() : iterable<string|int, SplFileInfo>
Return values
iterable<string|int, SplFileInfo>getFormat()
public
getFormat() : string
Return values
stringgetHideProgress()
Returns true if progress should be hidden.
public
getHideProgress() : bool
Return values
boolgetIndent()
public
getIndent() : non-empty-string
Return values
non-empty-stringgetLineEnding()
public
getLineEnding() : non-empty-string
Return values
non-empty-stringgetName()
Returns the name of the configuration.
public
getName() : string
The name must be all lowercase and without any spaces.
Return values
string —The name of the configuration
getPhpExecutable()
Get configured PHP executable, if any.
public
getPhpExecutable() : string|null
Tags
Return values
string|nullgetRiskyAllowed()
Check if it is allowed to run risky fixers.
public
getRiskyAllowed() : bool
Return values
boolgetRules()
Get rules.
public
getRules() : array<string, array<string, mixed>|bool>
Keys of array are names of fixers/sets, values are true/false.
Return values
array<string, array<string, mixed>|bool>getUsingCache()
Returns true if caching should be enabled.
public
getUsingCache() : bool
Return values
boolregisterCustomFixers()
Adds a suite of custom fixers.
public
registerCustomFixers(iterable<string|int, FixerInterface> $fixers) : $this
Name of custom fixer should follow VendorName/rule_name convention.
Parameters
- $fixers : iterable<string|int, FixerInterface>
Return values
$thisregisterCustomRuleSets()
Registers custom rule sets to be used the same way as built-in rule sets.
public
registerCustomRuleSets(array<int, RuleSetDefinitionInterface> $ruleSets) : $this
Parameters
- $ruleSets : array<int, RuleSetDefinitionInterface>
Tags
Return values
$thissetCacheFile()
Sets the path to the cache file.
public
setCacheFile(non-empty-string $cacheFile) : $this
Parameters
- $cacheFile : non-empty-string
Return values
$thissetFinder()
public
setFinder(iterable<string|int, SplFileInfo> $finder) : $this
Parameters
- $finder : iterable<string|int, SplFileInfo>
Return values
$thissetFormat()
public
setFormat(string $format) : $this
Parameters
- $format : string
Return values
$thissetHideProgress()
public
setHideProgress(bool $hideProgress) : $this
Parameters
- $hideProgress : bool
Return values
$thissetIndent()
public
setIndent(non-empty-string $indent) : $this
Parameters
- $indent : non-empty-string
Return values
$thissetLineEnding()
public
setLineEnding(non-empty-string $lineEnding) : $this
Parameters
- $lineEnding : non-empty-string
Return values
$thissetPhpExecutable()
Set PHP executable.
public
setPhpExecutable(string|null $phpExecutable) : $this
Parameters
- $phpExecutable : string|null
Tags
Return values
$thissetRiskyAllowed()
Set if it is allowed to run risky fixers.
public
setRiskyAllowed(bool $isRiskyAllowed) : $this
Parameters
- $isRiskyAllowed : bool
Return values
$thissetRules()
Set rules.
public
setRules(array<string, array<string, mixed>|bool> $rules) : $this
Keys of array are names of fixers or sets. Value for set must be bool (turn it on or off). Value for fixer may be bool (turn it on or off) or array of configuration (turn it on and contains configuration for FixerInterface::configure method).
Parameters
- $rules : array<string, array<string, mixed>|bool>
Return values
$thissetUsingCache()
public
setUsingCache(bool $usingCache) : $this
Parameters
- $usingCache : bool