-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php_cs.dist
45 lines (42 loc) · 1.5 KB
/
.php_cs.dist
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
<?php
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
$finder = PhpCsFixer\Finder::create()
->name('console')
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->exclude('cache')
;
return PhpCsFixer\Config::create()
->setUsingCache(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'list_syntax' => ['syntax' => 'short'],
'no_empty_phpdoc' => false,
'phpdoc_align' => '',
'phpdoc_no_empty_return' => false,
'phpdoc_summary' => false,
'ordered_imports' => [
'sortAlgorithm' => OrderedImportsFixer::SORT_ALPHA,
'importsOrder' => [
OrderedImportsFixer::IMPORT_TYPE_CONST,
OrderedImportsFixer::IMPORT_TYPE_FUNCTION,
OrderedImportsFixer::IMPORT_TYPE_CLASS,
],
],
'class_definition' => ['multiLineExtendsEachSingleLine' => true],
'ternary_to_null_coalescing' => true,
'yoda_style' => true,
'compact_nullable_typehint' => true,
'visibility_required' => true,
'no_superfluous_phpdoc_tags' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;