-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
29 lines (26 loc) · 902 Bytes
/
Copy path.php-cs-fixer.php
File metadata and controls
29 lines (26 loc) · 902 Bytes
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
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/modules/php')
->append([
__DIR__ . '/gameinfos.inc.php',
])
->name('*.php')
->notPath('bga_initial_code_template');
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PER-CS2x0' => true,
'@PER-CS2x0:risky' => true,
'@PHP8x4Migration' => true,
'declare_strict_types' => true,
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'single_quote' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
'no_trailing_whitespace' => true,
'no_whitespace_in_blank_line' => true,
])
->setFinder($finder)
->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');