Skip to content

Commit 7942293

Browse files
committed
NGSTACK-913 update php-cs-fixer rules
1 parent 23b38b0 commit 7942293

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.php-cs-fixer.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,49 @@
88

99
$config = new PhpCsFixer\Config();
1010
return $config
11+
->setRiskyAllowed(true)
1112
->setRules([
12-
'@PSR12' => true,
13-
'@PSR12:risky' => true,
13+
'@PER' => true,
14+
'@PER:risky' => true,
1415
'@PhpCsFixer' => true,
1516
'@PhpCsFixer:risky' => true,
1617

1718
// Overrides for rules included in PhpCsFixer rule sets
1819
'concat_space' => ['spacing' => 'one'],
20+
'fully_qualified_strict_types' => ['phpdoc_tags' => []],
1921
'method_chaining_indentation' => false,
2022
'multiline_whitespace_before_semicolons' => false,
2123
'native_function_invocation' => ['include' => ['@all']],
2224
'no_superfluous_phpdoc_tags' => false,
2325
'no_unset_on_property' => false,
2426
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
27+
'ordered_types' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'alpha'],
2528
'php_unit_internal_class' => false,
2629
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
2730
'php_unit_test_class_requires_covers' => false,
2831
'phpdoc_align' => false,
32+
'phpdoc_order' => ['order' => ['param', 'throws', 'return']],
2933
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
3034
'single_line_comment_style' => false,
31-
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments']],
35+
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'match', 'parameters']],
3236
'yoda_style' => false,
33-
'php_unit_strict' => false,
34-
'php_unit_test_annotation' => false,
3537

3638
// Additional rules
37-
'return_assignment' => false,
3839
'date_time_immutable' => true,
3940
'declare_strict_types' => true,
4041
'global_namespace_import' => [
4142
'import_classes' => null,
4243
'import_constants' => true,
4344
'import_functions' => true,
4445
],
45-
'list_syntax' => ['syntax' => 'short'],
4646
'heredoc_indentation' => ['indentation' => 'same_as_start'],
4747
'mb_str_functions' => true,
4848
'native_constant_invocation' => true,
4949
'nullable_type_declaration_for_default_null_value' => true,
5050
'static_lambda' => true,
5151
'ternary_to_null_coalescing' => true,
5252
'use_arrow_functions' => true,
53-
])
53+
])
5454
->setRiskyAllowed(true)
5555
->setFinder($finder)
5656
;

0 commit comments

Comments
 (0)