-
Notifications
You must be signed in to change notification settings - Fork 6
/
.php_cs
47 lines (42 loc) · 1.47 KB
/
.php_cs
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
<?php
declare(strict_types=1);
$root = __DIR__;
$finder = \PhpCsFixer\Finder::create()
->exclude('vendor')
->in($root);
return \PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PhpCsFixer' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
'declare_strict_types' => true,
'return_assignment' => false,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'dir_constant' => true,
'elseif' => false,
'ereg_to_preg' => true,
'is_null' => true,
'list_syntax' => ['syntax' => 'short'],
'mb_str_functions' => false, // RISKY: as in some function we need to use strlen() to get length of bytes instead mb_strlen()
'phpdoc_order' => true,
'concat_space' => ['spacing' => 'one'],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
'fully_qualified_strict_types' => true,
'global_namespace_import' => [
'import_classes' => true,
],
'phpdoc_to_comment' => false,
'method_argument_space' => ['on_multiline' => 'ignore'],
'php_unit_ordered_covers' => false,
])
->setCacheFile(sys_get_temp_dir() . '/php_cs.cache')
->setFinder($finder);