-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
30 lines (26 loc) · 1.01 KB
/
.php-cs-fixer.dist.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
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = (new Finder())
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
;
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRules([
'@Symfony' => true,
'yoda_style' => false, // overrides @Symfony rule set
'global_namespace_import' => false, // overrides @Symfony rule set
'concat_space' => ['spacing' => 'one'], // overrides @Symfony rule set
'phpdoc_align' => false,
'no_useless_else' => true,
'no_useless_return' => true,
'nullable_type_declaration' => true,
'nullable_type_declaration_for_default_null_value' => true, // overrides @Symfony rule set
'heredoc_indentation' => ['indentation' => 'start_plus_one'],
'php_unit_method_casing' => ['case' => 'snake_case'],
])
->setIndent(" ") // Ensure proper indentation (4 spaces)
->setLineEnding("\n")
->setFinder($finder);