-
Notifications
You must be signed in to change notification settings - Fork 14
/
.php_cs.dist
36 lines (34 loc) · 1.43 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
<?php
$finder = PhpCsFixer\Finder::create()
->notPath('var')
->notPath('web/config.php')
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'dir_constant' => true, //risky when the function ``dirname`` is overridden
'ereg_to_preg' => true, //risky if the ``ereg`` function is overridden
'heredoc_to_nowdoc' => true,
'mb_str_functions' => true, //Risky rule: risky when any of the functions are overridden
'modernize_types_casting' => true, //risky if any of the functions ``intval``, ``floatval``, ``doubleval``, ``strval`` or ``boolval`` are overridden
'no_multiline_whitespace_before_semicolons' => true,
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'php_unit_strict' => true, //not risky for us
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'protected_to_private' => true,
'psr0' => true,
'psr4' => true,
'@PHP71Migration' => true,
'semicolon_after_instruction' => true,
'ternary_to_null_coalescing' => true,
])
->setRiskyAllowed(true)
->setFinder($finder);