|
1 | 1 | <?php |
2 | 2 |
|
3 | | -declare(strict_types=1); |
| 3 | +// To support running PHP CS Fixer via PHAR file (e.g. in GitHub Actions) |
| 4 | +require_once __DIR__ . '/vendor/netgen/coding-standard/lib/PhpCsFixer/Config.php'; |
4 | 5 |
|
5 | | -return (new PhpCsFixer\Config()) |
6 | | - ->setRiskyAllowed(true) |
7 | | - ->setRules([ |
8 | | - '@PER' => true, |
9 | | - '@PER:risky' => true, |
10 | | - '@PhpCsFixer' => true, |
11 | | - '@PhpCsFixer:risky' => true, |
12 | | - |
13 | | - // Overrides for rules included in PhpCsFixer rule sets |
14 | | - 'concat_space' => ['spacing' => 'one'], |
15 | | - 'fully_qualified_strict_types' => ['phpdoc_tags' => []], |
16 | | - 'method_chaining_indentation' => false, |
17 | | - 'multiline_promoted_properties' => true, |
18 | | - 'multiline_whitespace_before_semicolons' => false, |
19 | | - 'native_function_invocation' => ['include' => ['@all']], |
20 | | - 'no_superfluous_phpdoc_tags' => false, |
21 | | - 'no_unset_on_property' => false, |
22 | | - 'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'], |
23 | | - 'ordered_types' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'alpha'], |
24 | | - 'php_unit_internal_class' => false, |
25 | | - 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], |
26 | | - 'php_unit_test_class_requires_covers' => false, |
27 | | - 'phpdoc_align' => false, |
28 | | - 'phpdoc_order' => ['order' => ['param', 'throws', 'return']], |
| 6 | +return (new Netgen\CodingStandard\PhpCsFixer\Config()) |
| 7 | + ->addRules([ |
29 | 8 | 'phpdoc_no_alias_tag' => false, |
30 | | - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], |
31 | | - 'single_line_comment_style' => false, |
32 | | - 'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'match', 'parameters']], |
33 | | - 'yoda_style' => false, |
34 | | - |
35 | | - // Additional rules |
36 | | - 'date_time_immutable' => true, |
37 | | - 'declare_strict_types' => true, |
38 | | - 'global_namespace_import' => [ |
39 | | - 'import_classes' => null, |
40 | | - 'import_constants' => true, |
41 | | - 'import_functions' => true, |
42 | | - ], |
43 | | - 'heredoc_indentation' => ['indentation' => 'same_as_start'], |
44 | | - // 'mb_str_functions' => true, |
45 | | - 'native_constant_invocation' => true, |
46 | | - 'nullable_type_declaration_for_default_null_value' => true, |
47 | | - 'static_lambda' => true, |
48 | | - 'ternary_to_null_coalescing' => true, |
49 | | - 'use_arrow_functions' => true, |
50 | 9 | ]) |
51 | 10 | ->setFinder( |
52 | 11 | PhpCsFixer\Finder::create() |
53 | | - ->in('bundle'), |
| 12 | + ->in('bundle') |
54 | 13 | ) |
55 | 14 | ; |
0 commit comments