-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
40 lines (37 loc) · 1.27 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
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__);
$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
// '@PHP74Migration' => true,
'@PHP81Migration' => true,
'@PhpCsFixer' => true,
'list_syntax' => ['syntax' => 'short'],
'self_static_accessor' => true,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'concat_space' => ['spacing' => 'one'],
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'blank_line_before_statement' => ['statements' => ['return',
'switch',
'throw',
'try',
'exit',
],
],
'increment_style' => ['style' => 'post'],
'no_superfluous_phpdoc_tags' => false,
'combine_nested_dirname' => true,
'no_alias_functions' => ['sets' => ['@internal', '@IMAP']],
'void_return' => true,
'modernize_types_casting' => true,
'trim_array_spaces' => true,
'cast_spaces' => ['space' => 'none'],
'phpdoc_no_package' => false,
'method_argument_space' => true,
])
->setFinder($finder);
return $config;