1 | <?php |
||
9 | class PhpCsFixer extends ActionAbstract |
||
10 | { |
||
11 | /** |
||
12 | * @var FileList |
||
13 | */ |
||
14 | protected $files; |
||
15 | |||
16 | /** |
||
17 | * @var string|null |
||
18 | */ |
||
19 | protected $binFile; |
||
20 | |||
21 | /** |
||
22 | * @var string|null |
||
23 | */ |
||
24 | protected $configFile; |
||
25 | |||
26 | /** |
||
27 | * @var bool |
||
28 | */ |
||
29 | protected $addAutomatically; |
||
30 | |||
31 | /** |
||
32 | * Runs all the provided files through PHP-CS-Fixer, fixing any code style issues. |
||
33 | * |
||
34 | * @param FileList $files The files to check |
||
35 | * @param string|null $binFile (Optional, default is from vendor) File path to PHP-CS-Fixer binary |
||
36 | * @param string|null $configFile (Optional, default is project root) File path to PHP-CS-Fixer config |
||
37 | * @param bool $addAutomatically (Optional, default is true) Whether to add modified files to commit or not |
||
38 | */ |
||
39 | 3 | public function __construct(FileList $files, $binFile = null, $configFile = null, $addAutomatically = true) |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function getName() |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function checkSupport() |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | 3 | public function execute(InputInterface $input, OutputInterface $output) |
|
121 | |||
122 | /** |
||
123 | * @return string |
||
124 | */ |
||
125 | protected function getBinFile() |
||
132 | } |
||
133 |