-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.php
36 lines (33 loc) · 1.1 KB
/
.php-cs-fixer.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
<?php
$finder = (new PhpCsFixer\Finder())
->files()
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
->in(__DIR__ . '/src/')
->in(__DIR__ . '/tests/');
return (new PhpCsFixer\Config())
->setUsingCache(true)
->setCacheFile(__DIR__ . '/.php-cs-fixer.cache')
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@DoctrineAnnotation' => true,
'@PHP74Migration' => true,
'@PHP80Migration' => true,
'@PHP81Migration' => true,
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
'concat_space' => ['spacing' => 'one'],
'echo_tag_syntax' => ['format' => 'long'],
'linebreak_after_opening_tag' => true,
'no_alternative_syntax' => false,
'no_superfluous_elseif' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'nullable_type_declaration_for_default_null_value' => true,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_order' => true,
'phpdoc_separation' => false,
'ternary_to_null_coalescing' => true,
])
->setFinder($finder);