-
Notifications
You must be signed in to change notification settings - Fork 8
/
.php-cs-fixer.dist.php
36 lines (34 loc) · 1.24 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
<?php
$finder = (new PhpCsFixer\Finder())
->in([__DIR__.'/config', __DIR__.'/src', __DIR__.'/tests'])
->exclude('Fixtures')
->append([__DIR__.'/deptrac.php']);
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setCacheFile('./.cache/php-cs-fixer.cache')
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'single_line_empty_body' => true,
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
'import_classes' => true,
],
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_unused_imports' => true,
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => ['class', 'function', 'const'],
],
'phpdoc_align' => ['align' => 'left'],
'phpdoc_to_comment' => false,
'self_static_accessor' => true,
'static_lambda' => true,
'strict_param' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
])
->setFinder($finder);