-
Notifications
You must be signed in to change notification settings - Fork 195
/
Copy path.php-cs-fixer.php
51 lines (45 loc) · 1.4 KB
/
.php-cs-fixer.php
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
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('templates')
->exclude('node_modules')
->in(__DIR__);
$config = new PhpCsFixer\Config();
$config->setRules([
// Presets
'@PSR2' => true,
'@PHP80Migration' => true,
'@PhpCsFixer' => true,
// Disable rules
'explicit_string_variable' => false,
'yoda_style' => false,
'php_unit_internal_class' => false,
'php_unit_test_class_requires_covers' => false,
'phpdoc_align' => false,
'multiline_whitespace_before_semicolons' => false,
// Namespace configuration
'no_blank_lines_before_namespace' => true,
'single_blank_line_before_namespace' => false,
'blank_line_after_opening_tag' => false,
'linebreak_after_opening_tag' => false,
// Options tweaks
'echo_tag_syntax' => [
'format' => 'short'
],
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'method'
]
]
]);
$config->setFinder($finder);
return $config;