-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
45 lines (43 loc) · 1.5 KB
/
.php-cs-fixer.dist.php
File metadata and controls
45 lines (43 loc) · 1.5 KB
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
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
->exclude('vendor')
->exclude('node_modules')
->notPath('config/reference.php'); // autogenerated by composer scripts
return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'align_multiline_comment' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'declare_strict_types' => true,
'fully_qualified_strict_types' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => false,
],
'native_function_invocation' => false,
'no_closing_tag' => true,
'no_leading_import_slash' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'single_import_per_statement' => true,
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => ['class', 'function', 'const'],
],
'void_return' => true,
'yoda_style' => false,
'new_expression_parentheses' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
->setCacheFile('.php-cs-fixer.cache');