-
Notifications
You must be signed in to change notification settings - Fork 5
/
.php-cs-fixer.php
48 lines (44 loc) · 1.42 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
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('vendor')
->in(__DIR__)
->name('*.php');
$config = new PhpCsFixer\Config();
$config
->setUsingCache(false)
->setFinder($finder)
->setRules(
[
'@PSR12' => true,
'final_class' => true,
'static_lambda' => true,
'linebreak_after_opening_tag' => true,
'blank_line_after_opening_tag' => true,
'declare_strict_types' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sort_algorithm' => 'length'],
'no_unused_imports' => true,
'is_null' => true,
'list_syntax' => [
'syntax' => 'short',
],
'native_function_invocation' => [
'exclude' => [],
'opcache-only' => true,
],
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'mb_str_functions' => true,
'modernize_types_casting' => true,
'native_constant_invocation' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'blank_line_before_statement' => [
'statements' => ['declare',],
],
'return_type_declaration' => [
'space_before' => 'none',
],
]
);
return $config;