Skip to content

Commit

Permalink
replace unpacking with array_merge as it's not working with string ke…
Browse files Browse the repository at this point in the history
…ys on PHP 7.4
  • Loading branch information
aivchen committed May 1, 2024
1 parent d3a3540 commit d4c2831
Showing 1 changed file with 28 additions and 26 deletions.
54 changes: 28 additions & 26 deletions src/PhpCsFixerCodingStandard.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,34 @@ public static function applyTo(ConfigInterface $config, array $customRules = [])
{
$config
->setRiskyAllowed(true)
->setRules([
'@PHP82Migration' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'function_declaration' => ['closure_fn_spacing' => 'none'],
'concat_space' => ['spacing' => 'one'],
'cast_spaces' => ['space' => 'none'],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
'always_move_variable' => false,
->setRules(array_merge(
[
'@PHP82Migration' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'function_declaration' => ['closure_fn_spacing' => 'none'],
'concat_space' => ['spacing' => 'one'],
'cast_spaces' => ['space' => 'none'],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
'always_move_variable' => false,
],
'phpdoc_to_comment' => false,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'phpdoc_types_order' => ['sort_algorithm' => 'none', 'null_adjustment' => 'always_last'],
'increment_style' => ['style' => 'post'],
'native_function_invocation' => false,
'php_unit_internal_class' => false,
'no_alternative_syntax' => ['fix_non_monolithic_code' => false],
'echo_tag_syntax' => ['format' => 'short', 'shorten_simple_statements_only' => true],
'semicolon_after_instruction' => false,
'date_time_immutable' => true,
'ordered_types' => false,
'fully_qualified_strict_types' => true,
],
'phpdoc_to_comment' => false,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'phpdoc_types_order' => ['sort_algorithm' => 'none', 'null_adjustment' => 'always_last'],
'increment_style' => ['style' => 'post'],
'native_function_invocation' => false,
'php_unit_internal_class' => false,
'no_alternative_syntax' => ['fix_non_monolithic_code' => false],
'echo_tag_syntax' => ['format' => 'short', 'shorten_simple_statements_only' => true],
'semicolon_after_instruction' => false,
'date_time_immutable' => true,
'ordered_types' => false,
'fully_qualified_strict_types' => true,
...$customRules
]);
$customRules
));
}
}

0 comments on commit d4c2831

Please sign in to comment.