PHP Interface PhpCsFixer\ConfigInterface

Author: Fabien Potencier ([email protected])
Afficher le fichier Open project: friendsofphp/php-cs-fixer Interface Usage Examples

Méthodes publiques

Méthode Description
getCacheFile ( ) : string | null Returns the path to the cache file.
getCustomFixers ( ) : PhpCsFixer\Fixer\FixerInterface[] Returns the custom fixers to use.
getFinder ( ) : iterable | Traversable | string[] Returns files to scan.
getFormat ( ) : string
getHideProgress ( ) : boolean 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 ( ) : boolean Check if it is allowed to run risky fixers.
getRules ( ) : array Get rules.
getUsingCache ( ) : boolean Returns true if caching should be enabled.
registerCustomFixers ( iterable | Traversable | PhpCsFixer\Fixer\FixerInterface[] $fixers ) Adds a suite of custom fixers.
setCacheFile ( string $cacheFile ) : self Sets the path to the cache file.
setFinder ( iterable | Traversable | string[] $finder ) : self
setFormat ( string $format ) : self
setHideProgress ( boolean $hideProgress ) : self
setIndent ( string $indent ) : self
setLineEnding ( string $lineEnding ) : self
setPhpExecutable ( string | null $phpExecutable ) : self Set PHP executable.
setRiskyAllowed ( boolean $isRiskyAllowed ) : self Set if it is allowed to run risky fixers.
setRules ( array $rules ) : self Set rules.
setUsingCache ( boolean $usingCache ) : self

Method Details

getCacheFile() public méthode

Returns the path to the cache file.
public getCacheFile ( ) : string | null
Résultat string | null Returns null if not using cache

getCustomFixers() public méthode

Returns the custom fixers to use.
public getCustomFixers ( ) : PhpCsFixer\Fixer\FixerInterface[]
Résultat PhpCsFixer\Fixer\FixerInterface[]

getFinder() public méthode

Returns files to scan.
public getFinder ( ) : iterable | Traversable | string[]
Résultat iterable | Traversable | string[]

getFormat() public méthode

public getFormat ( ) : string
Résultat string

getHideProgress() public méthode

Returns true if progress should be hidden.
public getHideProgress ( ) : boolean
Résultat boolean

getIndent() public méthode

public getIndent ( ) : string
Résultat string

getLineEnding() public méthode

public getLineEnding ( ) : string
Résultat string

getName() public méthode

The name must be all lowercase and without any spaces.
public getName ( ) : string
Résultat string The name of the configuration

getPhpExecutable() public méthode

Get configured PHP executable, if any.
public getPhpExecutable ( ) : string | null
Résultat string | null

getRiskyAllowed() public méthode

Check if it is allowed to run risky fixers.
public getRiskyAllowed ( ) : boolean
Résultat boolean

getRules() public méthode

Keys of array are names of fixers/sets, values are true/false.
public getRules ( ) : array
Résultat array

getUsingCache() public méthode

Returns true if caching should be enabled.
public getUsingCache ( ) : boolean
Résultat boolean

registerCustomFixers() public méthode

Name of custom fixer should follow VendorName/rule_name convention.
public registerCustomFixers ( iterable | Traversable | PhpCsFixer\Fixer\FixerInterface[] $fixers )
$fixers iterable | Traversable | PhpCsFixer\Fixer\FixerInterface[]

setCacheFile() public méthode

Sets the path to the cache file.
public setCacheFile ( string $cacheFile ) : self
$cacheFile string
Résultat self

setFinder() public méthode

public setFinder ( iterable | Traversable | string[] $finder ) : self
$finder iterable | Traversable | string[]
Résultat self

setFormat() public méthode

public setFormat ( string $format ) : self
$format string
Résultat self

setHideProgress() public méthode

public setHideProgress ( boolean $hideProgress ) : self
$hideProgress boolean
Résultat self

setIndent() public méthode

public setIndent ( string $indent ) : self
$indent string
Résultat self

setLineEnding() public méthode

public setLineEnding ( string $lineEnding ) : self
$lineEnding string
Résultat self

setPhpExecutable() public méthode

Set PHP executable.
public setPhpExecutable ( string | null $phpExecutable ) : self
$phpExecutable string | null
Résultat self

setRiskyAllowed() public méthode

Set if it is allowed to run risky fixers.
public setRiskyAllowed ( boolean $isRiskyAllowed ) : self
$isRiskyAllowed boolean
Résultat self

setRules() public méthode

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).
public setRules ( array $rules ) : self
$rules array
Résultat self

setUsingCache() public méthode

public setUsingCache ( boolean $usingCache ) : self
$usingCache boolean
Résultat self