ConfigInterface interface

PhpCsFixer\ConfigInterface

Defined in D:/WEBISTERS/projects/app/vendor/friendsofphp/php-cs-fixer/src/ConfigInterface.php

Constants #

PHP_VERSION_SYNTAX_SUPPORTED
-

Methods #

getCacheFile()
Returns the path to the cache file.
getCustomFixers()
Returns the custom fixers to use.
getFinder()
Returns files to scan.
getFormat()
-
getHideProgress()
Returns true if progress should be hidden.
getIndent()
-
getLineEnding()
-
getName()
Returns the name of the configuration.
getPhpExecutable()
Get configured PHP executable, if any.
getRiskyAllowed()
Check if it is allowed to run risky fixers.
getRules()
Get rules.
getUsingCache()
Returns true if caching should be enabled.
registerCustomFixers()
Adds a suite of custom fixers.
setCacheFile()
Sets the path to the cache file.
setFinder()
-
setFormat()
-
setHideProgress()
-
setIndent()
-
setLineEnding()
-
setPhpExecutable()
Set PHP executable.
setRiskyAllowed()
Set if it is allowed to run risky fixers.
setRules()
Set rules.
setUsingCache()
-

getCacheFile()

public function getCacheFile(): ?string

Returns the path to the cache file.

Returns ?string - Returns null if not using cache

getCustomFixers()

public function getCustomFixers(): array

Returns the custom fixers to use.

Returns array

getFinder()

public function getFinder(): iterable

Returns files to scan.

Returns iterable

getFormat()

public function getFormat(): string
Returns string

getHideProgress()

public function getHideProgress(): bool

Returns true if progress should be hidden.

Returns bool

getIndent()

public function getIndent(): string
Returns string

getLineEnding()

public function getLineEnding(): string
Returns string

getName()

public function getName(): string

Returns the name of the configuration.

The name must be all lowercase and without any spaces.

Returns string - The name of the configuration

getPhpExecutable()

public function getPhpExecutable(): ?string

Get configured PHP executable, if any.

Returns ?string

getRiskyAllowed()

public function getRiskyAllowed(): bool

Check if it is allowed to run risky fixers.

Returns bool

getRules()

public function getRules(): array

Get rules.

Keys of array are names of fixers/sets, values are true/false.

Returns array - array<string, mixed>|bool>

getUsingCache()

public function getUsingCache(): bool

Returns true if caching should be enabled.

Returns bool

registerCustomFixers()

public function registerCustomFixers(iterable $fixers): self

Adds a suite of custom fixers.

Name of custom fixer should follow `VendorName/rule_name` convention.

Parameters
  • iterable $fixers
Returns self

setCacheFile()

public function setCacheFile(string $cacheFile): self

Sets the path to the cache file.

Parameters
  • string $cacheFile
Returns self

setFinder()

public function setFinder(iterable $finder): self
Parameters
  • iterable $finder
Returns self

setFormat()

public function setFormat(string $format): self
Parameters
  • string $format
Returns self

setHideProgress()

public function setHideProgress(bool $hideProgress): self
Parameters
  • bool $hideProgress
Returns self

setIndent()

public function setIndent(string $indent): self
Parameters
  • string $indent
Returns self

setLineEnding()

public function setLineEnding(string $lineEnding): self
Parameters
  • string $lineEnding
Returns self

setPhpExecutable()

public function setPhpExecutable(?string $phpExecutable): self

Set PHP executable.

Parameters
  • ?string $phpExecutable
Returns self

setRiskyAllowed()

public function setRiskyAllowed(bool $isRiskyAllowed): self

Set if it is allowed to run risky fixers.

Parameters
  • bool $isRiskyAllowed
Returns self

setRules()

public function setRules(array $rules): self

Set rules.

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
  • array $rules
Returns self

setUsingCache()

public function setUsingCache(bool $usingCache): self
Parameters
  • bool $usingCache
Returns self