-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
53 lines (49 loc) · 1.91 KB
/
.php-cs-fixer.dist.php
File metadata and controls
53 lines (49 loc) · 1.91 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
46
47
48
49
50
51
52
53
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCSIgnored(true);
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'@DoctrineAnnotation' => true,
'blank_line_after_opening_tag' => true,
'blank_line_between_import_groups' => true,
'braces' => [
'allow_single_line_anonymous_class_with_empty_body' => true,
],
'class_definition' => [
'inline_constructor_arguments' => false,
'space_before_parenthesis' => true,
],
'compact_nullable_typehint' => true,
'declare_equal_normalize' => true,
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'new_with_braces' => true,
'no_blank_lines_after_class_opening' => true,
'no_leading_import_slash' => true,
'no_whitespace_in_blank_line' => true,
'ordered_class_elements' => ['order' => ['use_trait']],
'ordered_imports' => [
'imports_order' => [
'class',
'function',
'const'
],
'sort_algorithm' => 'none',
],
'return_type_declaration' => true,
'short_scalar_cast' => true,
'single_import_per_statement' => ['group_to_single_imports' => false],
'single_trait_insert_per_statement' => true,
'ternary_operator_spaces' => true,
'visibility_required' => true,
'array_syntax' => ['syntax' => 'short'],
'strict_param' => false,
// Risky rules
'void_return' => true,
'declare_strict_types' => true
])->setFinder($finder);