Documentation

RuleSetInterface
in

Set of rules to be used by fixer.

Example of set: ["@PSR2" => true, "@PSR1" => false, "strict" => true].

Tags
author

Dariusz RumiƄski dariusz.ruminski@gmail.com

Table of Contents

__construct()  : mixed
create()  : mixed
getRuleConfiguration()  : null|array<string|int, mixed>
Get configuration for given rule.
getRules()  : array<string|int, mixed>
Get all rules from rules set.
getSetDefinitionNames()  : mixed
hasRule()  : bool
Check given rule is in rules set.

Methods

__construct()

public __construct([array<string|int, mixed> $set = [] ]) : mixed
Parameters
$set : array<string|int, mixed> = []
Return values
mixed

create()

public static create([array<string|int, mixed> $set = [] ]) : mixed
Parameters
$set : array<string|int, mixed> = []
Tags
deprecated

will be removed in 3.0 Use the constructor.

Return values
mixed

getRuleConfiguration()

Get configuration for given rule.

public getRuleConfiguration(string $rule) : null|array<string|int, mixed>
Parameters
$rule : string

name of rule

Return values
null|array<string|int, mixed>

getRules()

Get all rules from rules set.

public getRules() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSetDefinitionNames()

public getSetDefinitionNames() : mixed
Tags
deprecated

will be removed in 3.0 Use PhpCsFixer\RuleSet\RuleSets::getSetDefinitionNames

Return values
mixed

hasRule()

Check given rule is in rules set.

public hasRule(string $rule) : bool
Parameters
$rule : string

name of rule

Return values
bool

Search results