-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
50 lines (45 loc) · 1.67 KB
/
.php-cs-fixer.dist.php
File metadata and controls
50 lines (45 loc) · 1.67 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
<?php
// The main file that defines the PHP code style for this project is located at
// `src/backend/.php-cs-fixer.dist.php`
// This file is essentially a convienience copy of the same file for
// easier editor integration at the root of the repository.
// We disabled some disruptive rules for the editor integration that might
// intefer with a development flow.
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'bootstrap/cache',
])
;
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
// customisation
'no_superfluous_phpdoc_tags' => false,
'yoda_style' => false,
'method_chaining_indentation' => true,
'braces_position' => [
'control_structures_opening_brace' => 'same_line',
'functions_opening_brace' => 'same_line',
'anonymous_functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'same_line',
'anonymous_classes_opening_brace' => 'same_line',
'allow_single_line_empty_anonymous_classes' => true,
'allow_single_line_anonymous_functions' => true,
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
],
'single_line_empty_body' => true,
'phpdoc_no_alias_tag' => false,
'phpdoc_align' => [
'tags' => ['method', 'param', 'property', 'property-read', 'return', 'throws', 'type', 'var'],
],
'phpdoc_to_comment' => [
'allow_before_return_statement' => true,
],
// disabled for editor integration
'no_unused_imports' => false,
])
->setFinder($finder)
;