-
Notifications
You must be signed in to change notification settings - Fork 6
/
.php-cs-fixer.php
65 lines (60 loc) · 2.39 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
declare(strict_types=1);
$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PSR12' => true,
'@PSR12:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
// Overrides for rules included in PhpCsFixer rule sets
'array_syntax' => ['syntax' => 'short'],
'cast_spaces' => ['space' => 'single'],
'concat_space' => ['spacing' => 'one'],
'method_chaining_indentation' => false,
'multiline_whitespace_before_semicolons' => false,
'native_function_invocation' => ['include' => ['@all']],
'no_superfluous_phpdoc_tags' => false,
'no_alias_functions' => true,
'no_unset_on_property' => false,
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
'php_unit_internal_class' => false,
'php_unit_method_casing' => false,
'php_unit_strict' => false,
'php_unit_test_annotation' => false,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'php_unit_test_class_requires_covers' => false,
'phpdoc_align' => false,
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'return_assignment' => false,
'self_accessor' => false,
'single_line_comment_style' => false,
'space_after_semicolon' => false,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
// Additional rules
'declare_strict_types' => true,
'date_time_immutable' => true,
'global_namespace_import' => [
'import_classes' => null,
'import_constants' => true,
'import_functions' => true,
],
'heredoc_indentation' => ['indentation' => 'same_as_start'],
'list_syntax' => ['syntax' => 'short'],
'mb_str_functions' => true,
'native_constant_invocation' => true,
'nullable_type_declaration_for_default_null_value' => true,
'static_lambda' => true,
'ternary_to_null_coalescing' => true,
'use_arrow_functions' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude(['vendor', 'docs', 'ezpublish_legacy'])
->in(__DIR__)
)
;
return $config;