-
Notifications
You must be signed in to change notification settings - Fork 114
/
Copy path.php-cs-fixer.dist.php
44 lines (40 loc) · 1.38 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
declare(strict_types=1);
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->append([__FILE__])
;
return (new PhpCsFixer\Config())
->setUsingCache(true)
->setRules([
'@DoctrineAnnotation' => true,
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'array_indentation' => true,
'class_definition' => ['multi_line_extends_each_single_line' => true],
'compact_nullable_typehint' => true,
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'heredoc_to_nowdoc' => true,
'list_syntax' => ['syntax' => 'short'],
'no_null_property_initialization' => true,
'no_superfluous_phpdoc_tags' => true,
'nullable_type_declaration_for_default_null_value' => true,
'no_trailing_whitespace_in_string' => false,
'ordered_imports' => [
'imports_order' => [
OrderedImportsFixer::IMPORT_TYPE_CONST,
OrderedImportsFixer::IMPORT_TYPE_FUNCTION,
OrderedImportsFixer::IMPORT_TYPE_CLASS,
],
],
'pow_to_exponentiation' => true,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_summary' => false,
'ternary_to_null_coalescing' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;