-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
36 lines (34 loc) · 1.4 KB
/
.php-cs-fixer.dist.php
File metadata and controls
36 lines (34 loc) · 1.4 KB
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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->ignoreDotFiles(true)
->ignoreVCS(true)
->exclude('vendor')
->files()
->name('*.php')
;
return (new PhpCsFixer\Config())
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setUsingCache(true)
->setRiskyAllowed(true)
->setFinder($finder)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit48Migration:risky' => true,
'fopen_flags' => false,
'protected_to_private' => true,
'native_function_invocation' => ['exclude' => ['sprintf']],
// Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'single_line_throw' => false,
// this must be disabled because the output of some tests include NBSP characters
'non_printable_character' => false,
'blank_line_between_import_groups' => false,
'no_trailing_comma_in_singleline' => false,
'nullable_type_declaration_for_default_null_value' => true,
'phpdoc_to_comment' => false,
// Override @Symfony ruleset to keep mixed return type for PHPStan
'no_superfluous_phpdoc_tags' => ['allow_hidden_params' => true, 'allow_mixed' => true, 'remove_inheritdoc' => true],
])
;