-
Notifications
You must be signed in to change notification settings - Fork 19
/
.php-cs-fixer.dist.php
47 lines (42 loc) · 1.55 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
$header = <<<EOF
This file is part of Sulu.
(c) Sulu GmbH
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
$config = new PhpCsFixer\Config();
$config->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'class_definition' => false,
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'function_declaration' => ['closure_function_spacing' => 'none'],
'header_comment' => ['header' => $header],
'native_function_invocation' => ['include' => ['@internal']],
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true],
'no_useless_else' => true,
'no_useless_return' => true,
'php_unit_strict' => true,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_order' => true,
'phpdoc_to_comment' => false,
'phpdoc_types_order' => false,
'single_line_throw' => false,
'strict_comparison' => true,
'strict_param' => true,
'get_class_to_class_keyword' => false, // should be enabled as soon as support for php < 8 is dropped
'nullable_type_declaration_for_default_null_value' => true,
'no_null_property_initialization' => false,
'new_with_parentheses' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('cache')
->exclude('Tests/reports/')
->in(__DIR__)
);
return $config;