-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp-cs-fixer.config.php
More file actions
67 lines (64 loc) · 3.33 KB
/
php-cs-fixer.config.php
File metadata and controls
67 lines (64 loc) · 3.33 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
$finder = PhpCsFixer\Finder::create()
->notPath('.ebextensions')
->notPath('.elasticbeanstalk')
->notPath('docs')
->notPath('public')
->notPath('resources')
->notPath('storage')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$config = new PhpCsFixer\Config();
return $config
->setCacheFile(__DIR__ . '/vendor/.php_cs.cache')
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRules([
'@PER-CS' => true,
'@PHP84Migration' => true,
'binary_operator_spaces' => [
'operators' => [
'=>' => 'align_single_space_minimal',
],
],
'blank_line_before_statement' => true,
'cast_spaces' => ['space' => 'single'],
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_closing_tag' => true,
'no_empty_phpdoc' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_short_bool_cast' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_after_function_name' => true,
'no_spaces_inside_parenthesis' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_unused_imports' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'not_operator_with_successor_space' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['const', 'class', 'function']],
'phpdoc_align' => true,
'phpdoc_indent' => true,
'phpdoc_line_span' => ['method' => 'single', 'const' => 'single', 'property' => 'single', 'class' => 'single', 'case' => 'single', 'other' => 'single', 'trait_import' => 'single'],
'phpdoc_no_access' => true,
'phpdoc_no_package' => true,
'phpdoc_order' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_summary' => true,
'phpdoc_to_comment' => false,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'phpdoc_var_without_name' => true,
'types_spaces' => ['space' => 'none'],
])
->setFinder($finder);