Documentation

ConfigInterface

Tags
author

Fabien Potencier fabien@symfony.com

author

Dariusz Rumiński dariusz.ruminski@gmail.com

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

getFinder()

Returns files to scan.

public getFinder() : iterable<string|int, SplFileInfo>
Return values
iterable<string|int, SplFileInfo>

getHideProgress()

Returns true if progress should be hidden.

public getHideProgress() : bool
Return values
bool

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() : string|null
Return values
string|null

getRiskyAllowed()

Check if it is allowed to run risky fixers.

public getRiskyAllowed() : bool
Return values
bool

getRules()

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
bool

registerCustomFixers()

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
self

setCacheFile()

Sets the path to the cache file.

public setCacheFile(string $cacheFile) : self
Parameters
$cacheFile : string
Return values
self

setFinder()

public setFinder(iterable<string|int, SplFileInfo$finder) : self
Parameters
$finder : iterable<string|int, SplFileInfo>
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(string|null $phpExecutable) : self
Parameters
$phpExecutable : string|null
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, 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
self

setUsingCache()

public setUsingCache(bool $usingCache) : self
Parameters
$usingCache : bool
Return values
self

        
On this page

Search results