-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php_cs.dist
74 lines (67 loc) · 2.37 KB
/
.php_cs.dist
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
68
69
70
71
72
73
74
<?php
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__.'/src',
__DIR__.'/tests'
]);
$header = <<<EOF
This file is part of the Serendipity HQ Console Styles Component.
Copyright (c) Adamo Aerendir Crespi <[email protected]>.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
return PhpCsFixer\Config::create()
->setFinder($finder)
->setUsingCache(true)
->setCacheFile(__DIR__.'/var/cache/.php_cs.cache')
->setRiskyAllowed(true)
->setRules([
'header_comment' => ['header' => $header],
'@Symfony' => true,
// Symfony overwritings
'binary_operator_spaces' => [
'align_double_arrow' => true,
'align_equals' => true,
],
'concat_space' => ['spacing' => 'one'],
'phpdoc_to_comment' => false,
// Other rules
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_return' => true,
'combine_consecutive_unsets' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'no_multiline_whitespace_before_semicolons' => true,
'no_null_property_initialization' => true,
'no_short_echo_tag' => true,
'no_superfluous_phpdoc_tags' => false,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'not_operator_with_space' => true,
'not_operator_with_successor_space' => true,
'ordered_class_elements' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'phpunit',
'method_public',
'method_protected',
'method_private',
'destruct',
'magic'
],
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'phpdoc_var_without_name' => false,
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
'single_line_comment_style' => ['comment_types' => ['hash']],
'strict_comparison' => true
]);