diff --git a/.php-cs b/.php-cs index fb8708147..7e6726372 100644 --- a/.php-cs +++ b/.php-cs @@ -3,13 +3,36 @@ * Config for PHP-CS-Fixer ver2 */ $rules = [ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'no_multiline_whitespace_before_semicolons' => true, - 'no_short_echo_tag' => true, - 'no_unused_imports' => true, - 'not_operator_with_successor_space' => true, - 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'psr0' => false, + '@PSR2' => true, + 'blank_line_after_namespace' => true, + 'braces' => true, + 'class_definition' => true, + 'elseif' => true, + 'function_declaration' => true, + 'indentation_type' => true, + 'line_ending' => true, + 'lowercase_constants' => true, + 'lowercase_keywords' => true, + 'method_argument_space' => [ + 'ensure_fully_multiline' => true, ], + 'no_break_comment' => true, + 'no_closing_tag' => true, + 'no_spaces_after_function_name' => true, + 'no_spaces_inside_parenthesis' => true, + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => true, + 'single_blank_line_at_eof' => true, + 'single_class_element_per_statement' => [ + 'elements' => ['property'], + ], + 'single_import_per_statement' => true, + 'single_line_after_imports' => true, + 'switch_case_semicolon_to_colon' => true, + 'switch_case_space' => true, + 'visibility_required' => true, + 'encoding' => true, + 'full_opening_tag' => true, ]; $excludes = [ // add exclude project directory diff --git a/.php-cs.dist b/.php-cs.dist index 73bd2dff2..cb610fd13 100644 --- a/.php-cs.dist +++ b/.php-cs.dist @@ -3,14 +3,36 @@ * Config for PHP-CS-Fixer ver2 */ $rules = [ - '@PSR2' => true, - // addtional rules - 'array_syntax' => ['syntax' => 'short'], - 'no_multiline_whitespace_before_semicolons' => true, - 'no_short_echo_tag' => true, - 'no_unused_imports' => true, - 'not_operator_with_successor_space' => true, - 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'psr0' => false, + '@PSR2' => true, + 'blank_line_after_namespace' => true, + 'braces' => true, + 'class_definition' => true, + 'elseif' => true, + 'function_declaration' => true, + 'indentation_type' => true, + 'line_ending' => true, + 'lowercase_constants' => true, + 'lowercase_keywords' => true, + 'method_argument_space' => [ + 'ensure_fully_multiline' => true, ], + 'no_break_comment' => true, + 'no_closing_tag' => true, + 'no_spaces_after_function_name' => true, + 'no_spaces_inside_parenthesis' => true, + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => true, + 'single_blank_line_at_eof' => true, + 'single_class_element_per_statement' => [ + 'elements' => ['property'], + ], + 'single_import_per_statement' => true, + 'single_line_after_imports' => true, + 'switch_case_semicolon_to_colon' => true, + 'switch_case_space' => true, + 'visibility_required' => true, + 'encoding' => true, + 'full_opening_tag' => true, ]; $excludes = [ // add exclude project directory diff --git a/Changelog b/Changelog index becf89d94..7b7e95529 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2019-02-06 DariusIII + * Chg: Update php-cs-fixer config files * Chg: Update ProfileController * Chg: Fix errors in email sending Jobs * Chg: Update Mail and Jobs to use user directly