Skip to content

Commit

Permalink
update grumphp to v2, PER-CS@2
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyraul committed Dec 12, 2024
1 parent 6f33817 commit bfd07e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"friendsofphp/php-cs-fixer": "^3.8.0",
"phpmd/phpmd": "^2.12.0",
"php-parallel-lint/php-parallel-lint": "^1.0.0",
"phpro/grumphp": "^1.5.1",
"phpro/grumphp": "^2.9.0",
"phpstan/phpstan": "^1.9",
"magento/magento-coding-standard": "31"
},
Expand Down
20 changes: 2 additions & 18 deletions config/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,52 +53,39 @@ public function setFinder($finder): ConfigInterface
public function getRules(): array
{
$rules = [
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'@PER-CS2.0' => true,
'include' => true,
'new_with_braces' => true,
'no_empty_statement' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'multiline_whitespace_before_semicolons' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'ordered_imports' => true,
'standardize_not_equals' => true,
'ternary_operator_spaces' => true,
// mygento
'phpdoc_order' => true,
'phpdoc_types' => true,
'phpdoc_add_missing_param_annotation' => true,
'single_quote' => true,
'standardize_not_equals' => true,
'ternary_to_null_coalescing' => true,
'lowercase_cast' => true,
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'return_type_declaration' => true,
'no_useless_return' => true,
'align_multiline_comment' => true,
'array_indentation' => true,
'binary_operator_spaces' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => ['statements' => ['return', 'throw', 'try']],
'cast_spaces' => true,
'class_attributes_separation' => ['elements' => ['const' => 'none', 'method' => 'one', 'property' => 'none', 'trait_import' => 'none']],
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'function_typehint_space' => true,
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'method_chaining_indentation' => true,
'multiline_comment_opening_closing' => true,
'native_function_casing' => true,
'no_blank_lines_after_class_opening' => true,
'no_blank_lines_after_phpdoc' => true,
'no_extra_blank_lines' => [
'tokens' => ['break', 'continue', 'curly_brace_block', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'throw', 'use'],
Expand All @@ -123,13 +110,10 @@ public function getRules(): array
'phpdoc_types_order' => [
'null_adjustment' => 'always_last',
],
//'phpdoc_var_without_name' => false,
'return_assignment' => true,
//'single_line_comment_style' => false,
'trailing_comma_in_multiline' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
'type_declaration_spaces' => true,
];

if (null !== $this->header) {
Expand Down

0 comments on commit bfd07e6

Please sign in to comment.