forked from Runroom/archetype-symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
47 lines (42 loc) · 1.32 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
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = Finder::create()
->in(__DIR__)
->exclude([
'var',
'node_modules',
'public/bundles',
'public/ckeditor',
]);
$config = new Config();
$config->setParallelConfig(ParallelConfigFactory::detect());
$config->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'header_comment' => ['header' => "\n"],
'declare_strict_types' => true,
'no_extra_blank_lines' => true,
'no_php4_constructor' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_order' => true,
'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress', 'phpstan-ignore-next-line', 'todo']],
'compact_nullable_type_declaration' => true,
'void_return' => false,
'strict_comparison' => true,
'strict_param' => true,
'php_unit_strict' => true,
'php_unit_test_case_static_method_calls' => true,
])
->setRiskyAllowed(true)
->setFinder($finder);
return $config;