-
Notifications
You must be signed in to change notification settings - Fork 6
/
.php-cs-fixer.php
47 lines (42 loc) · 1.14 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
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = Finder::create()
->exclude('vendor')
->in([getcwd()]);
$config = new Config();
return $config->setRules([
'@PSR12' => true,
'@Symfony' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
'elements' => ['arguments', 'arrays', 'match', 'parameters'],
],
'array_syntax' => ['syntax' => 'short'],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
'declare_strict_types' => true,
'visibility_required' => [
'elements' => ['property', 'method'],
],
'no_superfluous_phpdoc_tags' => true,
'php_unit_method_casing' => [
'case' => 'snake_case',
],
'not_operator_with_successor_space' => true,
'concat_space' => [
'spacing' => 'one',
],
'self_accessor' => true,
'nullable_type_declaration' => ['syntax' => 'union'],
'ordered_types' => [
'null_adjustment' => 'always_last',
'sort_algorithm' => 'none',
],
])
->setRiskyAllowed(true)
->setFinder($finder);