-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.php-cs-fixer.dist.php
47 lines (40 loc) · 1 KB
/
.php-cs-fixer.dist.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->exclude('log')
->exclude('temp')
->in(__DIR__)
->files()
->name('*.phpt');
$rules = [
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP81Migration' => true,
'@PHP80Migration:risky' => true,
// overwrite some Symfony rules
'braces_position' => [
'functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'same_line',
],
'function_declaration' => [
'closure_function_spacing' => 'none',
'closure_fn_spacing' => 'none',
],
'concat_space' => ['spacing' => 'one'],
'phpdoc_align' => false,
'yoda_style' => false,
'global_namespace_import' => false,
// additional rules
'array_syntax' => ['syntax' => 'short'],
'modernize_types_casting' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'strict_param' => true,
];
$config = new PhpCsFixer\Config();
return $config
->setRules($rules)
->setIndent("\t")
->setRiskyAllowed(true)
->setFinder($finder);