|
1 | 1 | <?php |
2 | 2 |
|
3 | | -return (new PhpCsFixer\Config()) |
4 | | - ->setRiskyAllowed(true) |
5 | | - ->setRules([ |
6 | | - '@PER' => true, |
7 | | - '@PER:risky' => true, |
8 | | - '@PhpCsFixer' => true, |
9 | | - '@PhpCsFixer:risky' => true, |
| 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'; |
10 | 5 |
|
11 | | - // Overrides for rules included in PhpCsFixer rule sets |
12 | | - 'concat_space' => ['spacing' => 'one'], |
13 | | - 'method_chaining_indentation' => false, |
14 | | - 'multiline_whitespace_before_semicolons' => false, |
15 | | - 'native_function_invocation' => ['include' => ['@all']], |
16 | | - 'no_superfluous_phpdoc_tags' => false, |
17 | | - 'no_unset_on_property' => false, |
18 | | - 'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'], |
19 | | - 'ordered_types' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'alpha'], |
20 | | - 'php_unit_internal_class' => false, |
21 | | - 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], |
22 | | - 'php_unit_test_class_requires_covers' => false, |
23 | | - 'phpdoc_align' => false, |
24 | | - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], |
25 | | - 'single_line_comment_style' => false, |
26 | | - 'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'match', 'parameters']], |
27 | | - 'yoda_style' => false, |
28 | | - |
29 | | - // Additional rules |
30 | | - 'date_time_immutable' => true, |
31 | | - 'declare_strict_types' => true, |
32 | | - 'global_namespace_import' => [ |
33 | | - 'import_classes' => null, |
34 | | - 'import_constants' => true, |
35 | | - 'import_functions' => true, |
36 | | - ], |
37 | | - 'list_syntax' => ['syntax' => 'short'], |
38 | | - 'heredoc_indentation' => ['indentation' => 'same_as_start'], |
39 | | - 'mb_str_functions' => true, |
40 | | - 'native_constant_invocation' => true, |
41 | | - 'nullable_type_declaration_for_default_null_value' => true, |
42 | | - 'static_lambda' => true, |
43 | | - 'ternary_to_null_coalescing' => true, |
44 | | - 'use_arrow_functions' => true, |
45 | | - ]) |
| 6 | +return new Netgen\CodingStandard\PhpCsFixer\Config() |
46 | 7 | ->setFinder( |
47 | 8 | PhpCsFixer\Finder::create() |
48 | 9 | ->in('src') |
|
0 commit comments