-
Notifications
You must be signed in to change notification settings - Fork 106
/
.php-cs-fixer.dist.php
44 lines (42 loc) · 1.36 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
;
$config = new PhpCsFixer\Config();
return $config->setRiskyAllowed(true)
->setRules([
'@PHP74Migration' => true,
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_between_import_groups' => false,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_unused_imports' => true,
'declare_strict_types' => true,
'ordered_imports' => [
'imports_order' => ['class', 'function', 'const'],
'sort_algorithm' => 'alpha',
],
'phpdoc_order' => true,
'phpdoc_align' => true,
'phpdoc_no_access' => true,
'phpdoc_separation' => true,
'increment_style' => true,
'single_quote' => true,
'trim_array_spaces' => true,
'single_blank_line_before_namespace' => true,
'yoda_style' => false,
'global_namespace_import' => [
'import_classes' => false,
'import_constants' => false,
'import_functions' => false,
],
// risky -->
'strict_param' => true,
])
->setFinder($finder)
;