PHP Interface PhpCsFixer\RuleSetInterface

Example of set: ["@PSR2" => true, "@PSR1" => false, "strict" => true].
Author: Dariusz Rumiński ([email protected])
显示文件 Open project: friendsofphp/php-cs-fixer Interface Usage Examples

Public Methods

Method Description
__construct ( array $set = [] )
create ( array $set = [] )
getRuleConfiguration ( string $rule ) : array | null Get configuration for given rule.
getRules ( ) : array Get all rules from rules set.
getSetDefinitionNames ( ) : string[] Get names of all set definitions.
hasRule ( string $rule ) : boolean Check given rule is in rules set.

Method Details

__construct() public method

public __construct ( array $set = [] )
$set array

create() public static method

public static create ( array $set = [] )
$set array

getRuleConfiguration() public method

Get configuration for given rule.
public getRuleConfiguration ( string $rule ) : array | null
$rule string name of rule
return array | null

getRules() public method

Get all rules from rules set.
public getRules ( ) : array
return array

getSetDefinitionNames() public method

Get names of all set definitions.
public getSetDefinitionNames ( ) : string[]
return string[]

hasRule() public method

Check given rule is in rules set.
public hasRule ( string $rule ) : boolean
$rule string name of rule
return boolean