-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php.cs.fixer.php
34 lines (29 loc) · 1.28 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->name('*.php')
->exclude(['vendor', 'resources', 'node_modules', 'docker', 'boostrap', 'public', 'storage']);
$config = new PhpCsFixer\Config();
// https://cs.symfony.com/doc/rules/
// '@PSR12' => true,
// '@Symfony' => true,
// '@PSR12:risky' => true,
// '@Symfony:risky' => true,
return $config->setRules(
[
'@PSR12' => true,
'lowercase_static_reference' => false, //https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/6673
'visibility_required' => false,
'psr_autoloading' => false,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'native_function_invocation' => false,
'not_operator_with_successor_space' => true,
'single_blank_line_at_eof' => false,
'no_unused_imports' => true,
'binary_operator_spaces' => [
'operators' => [
'=>' => 'align_single_space_minimal',
],
],
]
)->setFinder($finder);