1 | <?php |
||
12 | final class CodeSnifferRunner |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var PHP_CodeSniffer |
||
17 | */ |
||
18 | private $codeSniffer; |
||
19 | |||
20 | /** |
||
21 | * @var string[] |
||
22 | */ |
||
23 | private $standardRulesets = [ |
||
24 | 'ZenifyCodingStandard' => __DIR__ . '/../src/ZenifyCodingStandard/ruleset.xml' |
||
25 | ]; |
||
26 | |||
27 | |||
28 | public function __construct(string $sniff) |
||
35 | |||
36 | |||
37 | public function getErrorCountInFile(string $source) : int |
||
44 | |||
45 | |||
46 | public function getFixedContent(string $source) : string |
||
55 | |||
56 | |||
57 | public function detectRulesetFromSniffName(string $name) : string |
||
69 | |||
70 | |||
71 | private function ensureFileExists(string $source) |
||
79 | |||
80 | |||
81 | private function detectStandardFromSniffName(string $sniff) : string |
||
90 | |||
91 | } |
||
92 |