Skip to content

Commit

Permalink
deps: Update php-cs-fixer version
Browse files Browse the repository at this point in the history
  • Loading branch information
AxiosLeo committed Apr 1, 2024
1 parent af5e65e commit dfa613b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 24 deletions.
58 changes: 35 additions & 23 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@
* you can change this configuration by importing this file.
*/

return PhpCsFixer\Config::create()
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude([
'vendor',
'runtime',
])
->notPath([
'dump.php',
'src/exception_file.php',
])
;

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setIndent(' ')
->setRules([
Expand All @@ -16,15 +28,15 @@
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'combine_consecutive_unsets' => true,
'method_separation' => true,
// 'method_separation' => true,
'single_quote' => true,
'declare_equal_normalize' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
// 'hash_to_slash_comment' => true,
'include' => true,
'lowercase_cast' => true,
'native_function_invocation' => [],
'no_multiline_whitespace_before_semicolons' => true,
// 'no_multiline_whitespace_before_semicolons' => true,
'no_leading_import_slash' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_spaces_around_offset' => true,
Expand All @@ -33,33 +45,33 @@
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'single_blank_line_before_namespace' => true,
// 'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => true,
'space_after_semicolon' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
// 'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
'no_extra_consecutive_blank_lines' => [
'curly_brace_block',
'extra',
'parenthesis_brace_block',
'square_brace_block',
'throw',
'use',
],
'binary_operator_spaces' => [
'align_double_arrow' => true,
'align_equals' => true,
// 'no_extra_consecutive_blank_lines' => [
// 'curly_brace_block',
// 'extra',
// 'parenthesis_brace_block',
// 'square_brace_block',
// 'throw',
// 'use',
// ],
'binary_operator_spaces' => [
'default' => 'align_single_space_by_scope',
'operators' => [
'=>' => 'align_single_space_by_scope',
'=' => 'align_single_space_by_scope',
],
],
'braces' => [
'braces' => [
'allow_single_line_closure' => true,
],
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
);
->setFinder($finder)
;
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"require-dev": {
"symfony/var-dumper": "*",
"phpunit/phpunit": "^9.5",
"friendsofphp/php-cs-fixer": "^2.19"
"friendsofphp/php-cs-fixer": "^3.52.1"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit dfa613b

Please sign in to comment.