ConfigInterface
in
Tags
Table of Contents
Methods
- getCacheFile() : null|string
- Returns the path to the cache file.
- getCustomFixers() : array<int, FixerInterface>
- Returns the custom fixers to use.
- getFinder() : iterable<string|int, SplFileInfo>
- Returns files to scan.
- getFormat() : string
- getHideProgress() : bool
- Returns true if progress should be hidden.
- getIndent() : string
- getLineEnding() : 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() : self
- Adds a suite of custom fixers.
- setCacheFile() : self
- Sets the path to the cache file.
- setFinder() : self
- setFormat() : self
- setHideProgress() : self
- setIndent() : self
- setLineEnding() : self
- setPhpExecutable() : self
- Set PHP executable.
- setRiskyAllowed() : self
- Set if it is allowed to run risky fixers.
- setRules() : self
- Set rules.
- setUsingCache() : self
Methods
getCacheFile()
Returns the path to the cache file.
public
getCacheFile() : null|string
Return values
null|string —Returns null if not using cache
getCustomFixers()
Returns the custom fixers to use.
public
getCustomFixers() : array<int, FixerInterface>
Return values
array<int, FixerInterface>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() : string
Return values
stringgetLineEnding()
public
getLineEnding() : string
Return values
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
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) : self
Name of custom fixer should follow VendorName/rule_name
convention.
Parameters
- $fixers : iterable<string|int, FixerInterface>
Return values
selfsetCacheFile()
Sets the path to the cache file.
public
setCacheFile(string $cacheFile) : self
Parameters
- $cacheFile : string
Return values
selfsetFinder()
public
setFinder(iterable<string|int, SplFileInfo> $finder) : self
Parameters
- $finder : iterable<string|int, SplFileInfo>
Return values
selfsetFormat()
public
setFormat(string $format) : self
Parameters
- $format : string
Return values
selfsetHideProgress()
public
setHideProgress(bool $hideProgress) : self
Parameters
- $hideProgress : bool
Return values
selfsetIndent()
public
setIndent(string $indent) : self
Parameters
- $indent : string
Return values
selfsetLineEnding()
public
setLineEnding(string $lineEnding) : self
Parameters
- $lineEnding : string
Return values
selfsetPhpExecutable()
Set PHP executable.
public
setPhpExecutable(string|null $phpExecutable) : self
Parameters
- $phpExecutable : string|null
Return values
selfsetRiskyAllowed()
Set if it is allowed to run risky fixers.
public
setRiskyAllowed(bool $isRiskyAllowed) : self
Parameters
- $isRiskyAllowed : bool
Return values
selfsetRules()
Set rules.
public
setRules(array<string, array<string, mixed>|bool> $rules) : self
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
selfsetUsingCache()
public
setUsingCache(bool $usingCache) : self
Parameters
- $usingCache : bool