Skip to content

Commit ecaaec3

Browse files
committed
[TASK] Sync php-cs-fixer rules with the latest TYPO3 Core version
Sync with this change: 93621: [TASK] Harmonize native function call style https://review.typo3.org/c/Packages/TYPO3.CMS/+/93621 Also autoformat the rules list to improve readability.
1 parent 998ad28 commit ecaaec3

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

src/CsFixerConfig.php

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,33 @@ class CsFixerConfig extends Config implements CsFixerConfigInterface
5555
'function_declaration' => [
5656
'closure_fn_spacing' => 'none',
5757
],
58-
'function_to_constant' => ['functions' => ['get_called_class', 'get_class', 'get_class_this', 'php_sapi_name', 'phpversion', 'pi']],
58+
'function_to_constant' => [
59+
'functions' => [
60+
'get_called_class',
61+
'get_class',
62+
'get_class_this',
63+
'php_sapi_name',
64+
'phpversion',
65+
'pi',
66+
],
67+
],
5968
'type_declaration_spaces' => true,
60-
'global_namespace_import' => ['import_classes' => false, 'import_constants' => false, 'import_functions' => false],
69+
'global_namespace_import' => [
70+
'import_classes' => false,
71+
'import_constants' => false,
72+
'import_functions' => false,
73+
],
6174
'list_syntax' => ['syntax' => 'short'],
6275
// @todo: Can be dropped once we enable @PER-CS2x0
6376
'method_argument_space' => true,
6477
'modernize_strpos' => true,
6578
'modernize_types_casting' => true,
6679
'native_function_casing' => true,
80+
'native_function_invocation' => [
81+
'include' => [],
82+
'scope' => 'all',
83+
'strict' => true,
84+
],
6785
'no_alias_functions' => true,
6886
'no_blank_lines_after_phpdoc' => true,
6987
'no_empty_phpdoc' => true,
@@ -87,7 +105,8 @@ class CsFixerConfig extends Config implements CsFixerConfigInterface
87105
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
88106
'php_unit_construct' => ['assertions' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame']],
89107
'php_unit_mock_short_will_return' => true,
90-
'php_unit_test_case_static_method_calls' => ['call_type' => 'self',
108+
'php_unit_test_case_static_method_calls' => [
109+
'call_type' => 'self',
91110
'methods' => [
92111
'any' => 'this',
93112
'atLeast' => 'this',

0 commit comments

Comments
 (0)