-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs
29 lines (27 loc) · 1004 Bytes
/
.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
<?php declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('config')
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'length'],
'no_unused_imports' => true,
'native_function_invocation' => true,
'lowercase_cast' => true,
'phpdoc_to_param_type' => false,
'declare_strict_types' => true,
'no_unset_on_property' => true,
// 'class_attributes_separation' => ['elements' => ['const', 'method', 'property']],
'no_useless_else' => true,
'no_useless_return' => true,
'psr4' => true,
'ternary_to_null_coalescing' => true,
'void_return' => true,
'visibility_required' => ['property', 'method', 'const'],
'linebreak_after_opening_tag' => true
])
->setFinder($finder);