1 | <?php |
||
16 | final class Ruleset |
||
17 | { |
||
18 | /** |
||
19 | * The key is the sniff code |
||
20 | * and the value is the sniff object. |
||
21 | * |
||
22 | * @var Sniff[] |
||
23 | */ |
||
24 | private $sniffs = []; |
||
25 | |||
26 | /** |
||
27 | * An array of rules from the ruleset.xml file. |
||
28 | * |
||
29 | * It may be empty, indicating that the ruleset does not override |
||
30 | * any of the default sniff settings. |
||
31 | * |
||
32 | * @var array<string, mixed> |
||
33 | */ |
||
34 | public $ruleset = []; |
||
35 | |||
36 | /** |
||
37 | * @var SniffProvider |
||
38 | */ |
||
39 | private $sniffProvider; |
||
40 | |||
41 | /** |
||
42 | * @var RulesetBuilder |
||
43 | */ |
||
44 | private $rulesetBuilder; |
||
45 | |||
46 | /** |
||
47 | * @var EventDispatcherInterface |
||
48 | */ |
||
49 | private $eventDispatcher; |
||
50 | |||
51 | public function __construct( |
||
60 | |||
61 | public function createSniffList() |
||
66 | |||
67 | private function registerSniffs(array $sniffClasses) |
||
76 | |||
77 | private function loadSniffsToTokensTheyListenToo() |
||
92 | |||
93 | private function setCustomProperties(string $sniffCode) |
||
101 | |||
102 | /** |
||
103 | * @param string $sniffCode |
||
104 | * @param string $name |
||
105 | * @param string|array $value |
||
106 | */ |
||
107 | private function setSniffProperty(string $sniffCode, string $name, $value) |
||
127 | } |
||
128 |