Total Complexity | 8 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
8 | class AddPHPCSTask extends TaskBase implements Task |
||
9 | { |
||
10 | /** @return string bash variable for use in Travis script */ |
||
11 | public function getFlag(): string |
||
12 | { |
||
13 | return 'PHPCS_TEST'; |
||
14 | } |
||
15 | |||
16 | |||
17 | public function getCommand(): string |
||
18 | { |
||
19 | return 'phpcs'; |
||
20 | } |
||
21 | |||
22 | |||
23 | public function getTravisBeforeScript(): ?string |
||
24 | { |
||
25 | return null; |
||
26 | } |
||
27 | |||
28 | |||
29 | public function getTravisScript(): ?string |
||
30 | { |
||
31 | return 'vendor/bin/phpcs --standard=ruleset.xml --extensions=php --tab-width=4 -sp src tests'; |
||
32 | } |
||
33 | |||
34 | |||
35 | /** @return array<string,string> */ |
||
36 | public function getComposerScripts(): array |
||
37 | { |
||
38 | return [ |
||
39 | "checkcs"=> "vendor/bin/phpcs --standard=ruleset.xml --extensions=php --tab-width=4 -sp src tests", |
||
40 | "fixcs" => "vendor/bin/phpcbf --standard=ruleset.xml --extensions=php --tab-width=4 -sp src tests", |
||
41 | ]; |
||
42 | } |
||
43 | |||
44 | |||
45 | /** @return array<string> */ |
||
46 | public function getComposerPackages(): array |
||
49 | } |
||
50 | |||
51 | |||
52 | /** @return array<string, string> */ |
||
53 | public function filesToCopy(): array |
||
56 | } |
||
57 | |||
58 | |||
59 | public function isCodeCheck(): bool |
||
62 | } |
||
63 | } |
||
64 |