-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
57 lines (51 loc) · 1.37 KB
/
Copy path.php-cs-fixer.php
File metadata and controls
57 lines (51 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
ini_set('memory_limit', '512M');
$root = __DIR__;
$finder = new Finder()
->in([
$root.'/config',
$root.'/dev-scripts-psalm-1',
$root.'/src',
$root.'/resources/views',
$root.'/Tests',
])
// relative not absolute paths
->exclude([
'invoice/del',
'invoice/generatorrelation',
])
->append([
$root.'/public/index.php',
]);
return new Config()
->setCacheFile(__DIR__ . '/runtime/cache/.php-cs-fixer.cache')
->setParallelConfig(ParallelConfigFactory::detect(
// $filesPerProcess
10,
// $processTimeout in seconds
200,
// $maxProcesses
10
))
/**
* Related logic:
*
* https://github.com/PHP-CS-Fixer/PHP-CS-Fixer
* vendor\friendsofphp\php-cs-fixer\src\RuleSet\Sets
* https://cs.symfony.com/doc/usage.html
*
* e.g. The PSR12 set inherits from the PSR2 set the following line
* 'single_blank_line_at_eof => true'
*
* To run a single check without changes at command line: e.g.
* php vendor/bin/php-cs-fixer fix . --rules=single_blank_line_at_eof --verbose --dry-run
*
*/
->setRules([
'@PSR12' => true,
])
->setFinder($finder);