ConfigInterface
in
Tags
Table of Contents
- getCacheFile() : null|string
- Returns the path to the cache file.
- getCustomFixers() : array<string|int, FixerInterface>
- Returns the custom fixers to use.
- getFinder() : iteratable<string|int, mixed>|Traversable
- 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() : null|string
- Get configured PHP executable, if any.
- getRiskyAllowed() : bool
- Check if it is allowed to run risky fixers.
- getRules() : array<string|int, mixed>
- 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<string|int, FixerInterface>
Return values
array<string|int, FixerInterface> —getFinder()
Returns files to scan.
public
getFinder() : iteratable<string|int, mixed>|Traversable
Return values
iteratable<string|int, mixed>|Traversable —getFormat()
public
getFormat() : string
Return values
string —getHideProgress()
Returns true if progress should be hidden.
public
getHideProgress() : bool
Return values
bool —getIndent()
public
getIndent() : string
Return values
string —getLineEnding()
public
getLineEnding() : string
Return values
string —getName()
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() : null|string
Return values
null|string —getRiskyAllowed()
Check if it is allowed to run risky fixers.
public
getRiskyAllowed() : bool
Return values
bool —getRules()
Get rules.
public
getRules() : array<string|int, mixed>
Keys of array are names of fixers/sets, values are true/false.
Return values
array<string|int, mixed> —getUsingCache()
Returns true if caching should be enabled.
public
getUsingCache() : bool
Return values
bool —registerCustomFixers()
Adds a suite of custom fixers.
public
registerCustomFixers(array<string|int, FixerInterface>|iteratable<string|int, mixed>|Traversable $fixers) : self
Name of custom fixer should follow VendorName/rule_name
convention.
Parameters
- $fixers : array<string|int, FixerInterface>|iteratable<string|int, mixed>|Traversable
Return values
self —setCacheFile()
Sets the path to the cache file.
public
setCacheFile(string $cacheFile) : self
Parameters
- $cacheFile : string
Return values
self —setFinder()
public
setFinder(iteratable<string|int, mixed>|array<string|int, string>|Traversable $finder) : self
Parameters
- $finder : iteratable<string|int, mixed>|array<string|int, string>|Traversable
Return values
self —setFormat()
public
setFormat(string $format) : self
Parameters
- $format : string
Return values
self —setHideProgress()
public
setHideProgress(bool $hideProgress) : self
Parameters
- $hideProgress : bool
Return values
self —setIndent()
public
setIndent(string $indent) : self
Parameters
- $indent : string
Return values
self —setLineEnding()
public
setLineEnding(string $lineEnding) : self
Parameters
- $lineEnding : string
Return values
self —setPhpExecutable()
Set PHP executable.
public
setPhpExecutable(null|string $phpExecutable) : self
Parameters
- $phpExecutable : null|string
Return values
self —setRiskyAllowed()
Set if it is allowed to run risky fixers.
public
setRiskyAllowed(bool $isRiskyAllowed) : self
Parameters
- $isRiskyAllowed : bool
Return values
self —setRules()
Set rules.
public
setRules(array<string|int, mixed> $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|int, mixed>
Return values
self —setUsingCache()
public
setUsingCache(bool $usingCache) : self
Parameters
- $usingCache : bool