Skip to content

Commit

Permalink
Merge pull request #322 from ergebnis/feature/synchronize
Browse files Browse the repository at this point in the history
Enhancement: Synchronize rule set for PhpUnit with phpunit/phpunit
  • Loading branch information
ergebnis-bot committed Dec 27, 2020
2 parents cb5395a + 417d306 commit 6f40fd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 106 deletions.
54 changes: 1 addition & 53 deletions src/RuleSet/PhpUnit.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ final class PhpUnit extends AbstractRuleSet
],
],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => false,
'blank_line_before_statement' => [
'statements' => [
'break',
Expand Down Expand Up @@ -71,55 +70,38 @@ final class PhpUnit extends AbstractRuleSet
],
],
'class_definition' => true,
'class_keyword_remove' => false,
'clean_namespace' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'combine_nested_dirname' => true,
'comment_to_phpdoc' => false,
'compact_nullable_typehint' => true,
'concat_space' => [
'spacing' => 'one',
],
'constant_case' => true,
'date_time_immutable' => false,
'declare_equal_normalize' => [
'space' => 'none',
],
'declare_strict_types' => true,
'dir_constant' => true,
'doctrine_annotation_array_assignment' => false,
'doctrine_annotation_braces' => false,
'doctrine_annotation_indentation' => false,
'doctrine_annotation_spaces' => false,
'echo_tag_syntax' => true,
'elseif' => true,
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => false,
'escape_implicit_backslashes' => false,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'final_class' => false,
'final_internal_class' => false,
'final_public_method_for_abstract_class' => false,
'fopen_flag_order' => true,
'fopen_flags' => false,
'full_opening_tag' => true,
'fully_qualified_strict_types' => true,
'function_declaration' => true,
'function_to_constant' => true,
'function_typehint_space' => true,
'general_phpdoc_annotation_remove' => false,
'general_phpdoc_tag_rename' => false,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'group_import' => false,
'header_comment' => false,
'heredoc_indentation' => false,
'heredoc_to_nowdoc' => true,
'implode_call' => true,
'include' => true,
Expand All @@ -130,7 +112,6 @@ final class PhpUnit extends AbstractRuleSet
'is_null' => true,
'lambda_not_used_import' => true,
'line_ending' => true,
'linebreak_after_opening_tag' => false,
'list_syntax' => [
'syntax' => 'short',
],
Expand All @@ -140,11 +121,9 @@ final class PhpUnit extends AbstractRuleSet
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'magic_method_casing' => true,
'mb_str_functions' => false,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
],
'method_chaining_indentation' => false,
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => true,
Expand Down Expand Up @@ -203,9 +182,6 @@ final class PhpUnit extends AbstractRuleSet
'no_whitespace_in_blank_line' => true,
'non_printable_character' => true,
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'nullable_type_declaration_for_default_null_value' => false,
'object_operator_without_whitespace' => true,
'operator_linebreak' => [
'only_booleans' => true,
Expand Down Expand Up @@ -247,31 +223,15 @@ final class PhpUnit extends AbstractRuleSet
'order' => 'alpha',
],
'ordered_traits' => true,
'php_unit_construct' => false,
'php_unit_dedicate_assert' => false,
'php_unit_dedicate_assert_internal_type' => false,
'php_unit_expectation' => false,
'php_unit_fqcn_annotation' => false,
'php_unit_internal_class' => false,
'php_unit_method_casing' => false,
'php_unit_mock' => false,
'php_unit_mock_short_will_return' => false,
'php_unit_namespaced' => false,
'php_unit_no_expectation_annotation' => false,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_size_class' => false,
'php_unit_strict' => false,
'php_unit_test_annotation' => false,
'php_unit_test_case_static_method_calls' => [
'call_type' => 'this',
],
'php_unit_test_class_requires_covers' => false,
'phpdoc_add_missing_param_annotation' => false,
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => true,
'phpdoc_line_span' => false,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => true,
'phpdoc_no_empty_return' => true,
Expand All @@ -294,24 +254,19 @@ final class PhpUnit extends AbstractRuleSet
'phpdoc_tag_casing' => true,
'phpdoc_tag_type' => true,
'phpdoc_to_comment' => true,
'phpdoc_to_param_type' => false,
'phpdoc_to_return_type' => false,
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types' => [
'groups' => [
'simple',
'meta',
'simple',
],
],
'phpdoc_types_order' => true,
'phpdoc_var_annotation_correct_order' => true,
'phpdoc_var_without_name' => true,
'pow_to_exponentiation' => true,
'protected_to_private' => true,
'psr_autoloading' => false,
'random_api_migration' => false,
'regular_callable_call' => false,
'return_assignment' => true,
'return_type_declaration' => [
'space_before' => 'none',
Expand All @@ -322,23 +277,18 @@ final class PhpUnit extends AbstractRuleSet
'set_type_to_cast' => true,
'short_scalar_cast' => true,
'simple_to_complex_string_variable' => true,
'simplified_if_return' => false,
'simplified_null_return' => false,
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => false,
'single_class_element_per_statement' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'single_line_comment_style' => false,
'single_line_throw' => false,
'single_quote' => true,
'single_space_after_construct' => true,
'single_trait_insert_per_statement' => true,
'space_after_semicolon' => true,
'standardize_increment' => true,
'standardize_not_equals' => true,
'static_lambda' => true,
'strict_comparison' => false,
'strict_param' => true,
'string_line_ending' => true,
'switch_case_semicolon_to_colon' => true,
Expand All @@ -350,7 +300,6 @@ final class PhpUnit extends AbstractRuleSet
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'use_arrow_functions' => false,
'visibility_required' => [
'elements' => [
'const',
Expand All @@ -360,7 +309,6 @@ final class PhpUnit extends AbstractRuleSet
],
'void_return' => true,
'whitespace_after_comma_in_array' => true,
'yoda_style' => false,
];

protected $targetPhpVersion = 70400;
Expand Down
54 changes: 1 addition & 53 deletions test/Unit/RuleSet/PhpUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
],
],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => false,
'blank_line_before_statement' => [
'statements' => [
'break',
Expand Down Expand Up @@ -74,55 +73,38 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
],
],
'class_definition' => true,
'class_keyword_remove' => false,
'clean_namespace' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'combine_nested_dirname' => true,
'comment_to_phpdoc' => false,
'compact_nullable_typehint' => true,
'concat_space' => [
'spacing' => 'one',
],
'constant_case' => true,
'date_time_immutable' => false,
'declare_equal_normalize' => [
'space' => 'none',
],
'declare_strict_types' => true,
'dir_constant' => true,
'doctrine_annotation_array_assignment' => false,
'doctrine_annotation_braces' => false,
'doctrine_annotation_indentation' => false,
'doctrine_annotation_spaces' => false,
'echo_tag_syntax' => true,
'elseif' => true,
'encoding' => true,
'ereg_to_preg' => true,
'error_suppression' => false,
'escape_implicit_backslashes' => false,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'final_class' => false,
'final_internal_class' => false,
'final_public_method_for_abstract_class' => false,
'fopen_flag_order' => true,
'fopen_flags' => false,
'full_opening_tag' => true,
'fully_qualified_strict_types' => true,
'function_declaration' => true,
'function_to_constant' => true,
'function_typehint_space' => true,
'general_phpdoc_annotation_remove' => false,
'general_phpdoc_tag_rename' => false,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'group_import' => false,
'header_comment' => false,
'heredoc_indentation' => false,
'heredoc_to_nowdoc' => true,
'implode_call' => true,
'include' => true,
Expand All @@ -133,7 +115,6 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
'is_null' => true,
'lambda_not_used_import' => true,
'line_ending' => true,
'linebreak_after_opening_tag' => false,
'list_syntax' => [
'syntax' => 'short',
],
Expand All @@ -143,11 +124,9 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'magic_method_casing' => true,
'mb_str_functions' => false,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
],
'method_chaining_indentation' => false,
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => true,
Expand Down Expand Up @@ -206,9 +185,6 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
'no_whitespace_in_blank_line' => true,
'non_printable_character' => true,
'normalize_index_brace' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'nullable_type_declaration_for_default_null_value' => false,
'object_operator_without_whitespace' => true,
'operator_linebreak' => [
'only_booleans' => true,
Expand Down Expand Up @@ -250,31 +226,15 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
'order' => 'alpha',
],
'ordered_traits' => true,
'php_unit_construct' => false,
'php_unit_dedicate_assert' => false,
'php_unit_dedicate_assert_internal_type' => false,
'php_unit_expectation' => false,
'php_unit_fqcn_annotation' => false,
'php_unit_internal_class' => false,
'php_unit_method_casing' => false,
'php_unit_mock' => false,
'php_unit_mock_short_will_return' => false,
'php_unit_namespaced' => false,
'php_unit_no_expectation_annotation' => false,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_size_class' => false,
'php_unit_strict' => false,
'php_unit_test_annotation' => false,
'php_unit_test_case_static_method_calls' => [
'call_type' => 'this',
],
'php_unit_test_class_requires_covers' => false,
'phpdoc_add_missing_param_annotation' => false,
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => true,
'phpdoc_line_span' => false,
'phpdoc_no_access' => true,
'phpdoc_no_alias_tag' => true,
'phpdoc_no_empty_return' => true,
Expand All @@ -297,24 +257,19 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
'phpdoc_tag_casing' => true,
'phpdoc_tag_type' => true,
'phpdoc_to_comment' => true,
'phpdoc_to_param_type' => false,
'phpdoc_to_return_type' => false,
'phpdoc_trim' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_types' => [
'groups' => [
'simple',
'meta',
'simple',
],
],
'phpdoc_types_order' => true,
'phpdoc_var_annotation_correct_order' => true,
'phpdoc_var_without_name' => true,
'pow_to_exponentiation' => true,
'protected_to_private' => true,
'psr_autoloading' => false,
'random_api_migration' => false,
'regular_callable_call' => false,
'return_assignment' => true,
'return_type_declaration' => [
'space_before' => 'none',
Expand All @@ -325,23 +280,18 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
'set_type_to_cast' => true,
'short_scalar_cast' => true,
'simple_to_complex_string_variable' => true,
'simplified_if_return' => false,
'simplified_null_return' => false,
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => false,
'single_class_element_per_statement' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
'single_line_comment_style' => false,
'single_line_throw' => false,
'single_quote' => true,
'single_space_after_construct' => true,
'single_trait_insert_per_statement' => true,
'space_after_semicolon' => true,
'standardize_increment' => true,
'standardize_not_equals' => true,
'static_lambda' => true,
'strict_comparison' => false,
'strict_param' => true,
'string_line_ending' => true,
'switch_case_semicolon_to_colon' => true,
Expand All @@ -353,7 +303,6 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'use_arrow_functions' => false,
'visibility_required' => [
'elements' => [
'const',
Expand All @@ -363,7 +312,6 @@ final class PhpUnitTest extends AbstractRuleSetTestCase
],
'void_return' => true,
'whitespace_after_comma_in_array' => true,
'yoda_style' => false,
];

protected $targetPhpVersion = 70400;
Expand Down

0 comments on commit 6f40fd9

Please sign in to comment.