exclude('vendor') ->exclude('tests') ->in(__DIR__) ; $config = new PhpCsFixer\Config(); return $config->setRules([ 'align_multiline_comment' => [ 'comment_type' => 'phpdocs_only' ], 'array_indentation' => true, 'array_syntax' => [ 'syntax' => 'short' ], 'binary_operator_spaces' => [ 'default' => 'single_space' ], 'blank_line_before_statement' => [ 'statements' => [ 'if','return','while','for','foreach','do' ] ], 'blank_line_after_opening_tag' => true, 'blank_line_after_namespace' => true, 'elseif' => false, 'explicit_string_variable' => false, 'full_opening_tag' => true, 'fully_qualified_strict_types' => true, 'line_ending' => true, 'linebreak_after_opening_tag' => true, 'lowercase_cast' => true, 'lowercase_keywords' => true, 'lowercase_static_reference' => true, 'no_alternative_syntax' => true, 'no_blank_lines_after_class_opening' => true, 'no_blank_lines_after_phpdoc' => true, 'no_blank_lines_before_namespace' => true, 'no_closing_tag' => true, 'no_empty_comment' => true, 'no_empty_phpdoc' => true, 'no_empty_statement' => true, 'no_multiline_whitespace_around_double_arrow' => true, 'no_spaces_after_function_name' => true, 'no_spaces_inside_parenthesis' => true, 'no_unused_imports' => true, 'single_import_per_statement' => true, 'single_blank_line_at_eof' => true, 'no_whitespace_in_blank_line' => true, 'not_operator_with_space' => false, 'ordered_imports' => [ 'sort_algorithm' => 'alpha' ], 'ordered_class_elements' => [ 'sort_algorithm' => 'alpha', 'order' => [ 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected', 'property_private', 'construct', 'method_public', 'method_private' ] ], 'no_mixed_echo_print' => [ 'use' => 'echo' ], 'constant_case' => [ 'case' => 'lower' ], 'increment_style' => [ 'style' => 'post' ], 'concat_space' => [ 'spacing' => 'none' ], 'single_space_around_construct' => true, 'control_structure_braces' => true, 'control_structure_continuation_position' => [ 'position' => 'same_line' ], 'declare_parentheses' => true, 'no_multiple_statements_per_line' => true, 'braces_position' => [ 'functions_opening_brace' => 'same_line', 'classes_opening_brace' => 'same_line', 'anonymous_classes_opening_brace' => 'same_line', 'allow_single_line_empty_anonymous_classes' => false, 'allow_single_line_anonymous_functions' => false ], 'statement_indentation' => true, 'no_extra_blank_lines' => [ 'tokens' => ['extra'] ], 'class_definition' => [ 'single_line' => true ] ]) ->setFinder($finder) ;