-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
40 lines (33 loc) · 994 Bytes
/
Copy path.php-cs-fixer.dist.php
File metadata and controls
40 lines (33 loc) · 994 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
30
31
32
33
34
35
36
37
38
39
40
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php');
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@PHP82Migration' => true,
// Strict
'strict_param' => true,
'declare_strict_types' => true,
// Imports
'no_unused_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
// Syntax
'single_quote' => true,
'trailing_comma_in_multiline' => true,
'no_empty_statement' => true,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
// PHPDoc
'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true],
'phpdoc_order' => true,
'phpdoc_separation' => true,
'phpdoc_trim' => true,
'phpdoc_align' => ['align' => 'left'],
])
->setFinder($finder);