-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
33 lines (29 loc) · 1.13 KB
/
.php-cs-fixer.php
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
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = Finder::create()
->in(__DIR__) // Adjust to the directories you want to scan
->exclude('vendor') // Exclude vendor directory
->name('*.php')
->notName('*.blade.php');
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setFinder($finder)
->setRiskyAllowed(true) // Allow risky rules if needed
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'concat_space' => ['spacing' => 'one'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'no_unused_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'single_import_per_statement' => true,
'single_quote' => true,
'trailing_comma_in_multiline' => true,
'simplified_if_return' => true,
]);