Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Commit

Permalink
Update php cs fixer config
Browse files Browse the repository at this point in the history
  • Loading branch information
MianSaleem committed Jul 4, 2020
1 parent c986a56 commit 07bb1df
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 41 deletions.
67 changes: 50 additions & 17 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,56 @@ $finder = Symfony\Component\Finder\Finder::create()

return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => ['sortAlgorithm' => 'alpha'],
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'trailing_comma_in_multiline_array' => true,
'phpdoc_scalar' => true,
'unary_operator_spaces' => true,
'binary_operator_spaces' => true,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try'],
'@PSR2' => true,
'no_useless_else' => true,
'array_indentation' => true,
'no_unused_imports' => true,
'no_useless_return' => true,
'short_scalar_cast' => true,
'switch_case_space' => true,
'trim_array_spaces' => true,
'normalize_index_brace' => true,
'unary_operator_spaces' => true,
'no_leading_import_slash' => true,
'ternary_operator_spaces' => true,
'compact_nullable_typehint' => true,
'single_line_after_imports' => true,
'lowercase_static_reference' => true,
'ternary_to_null_coalescing' => true,
'linebreak_after_opening_tag' => true,
'no_whitespace_in_blank_line' => true,
'single_import_per_statement' => true,
'concat_space' => ['spacing' => 'one'],
'array_syntax' => ['syntax' => 'short'],
'declare_equal_normalize' => ['space' => 'single'],
'switch_case_semicolon_to_colon' => true,
'no_leading_namespace_whitespace' => true,
'whitespace_after_comma_in_array' => true,
'single_trait_insert_per_statement' => true,
'trailing_comma_in_multiline_array' => true,
'no_blank_lines_after_class_opening' => true,
'single_blank_line_before_namespace' => true,
'no_whitespace_before_comma_in_array' => true,
'ordered_imports' => ['sortAlgorithm' => 'length'],
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'],
'visibility_required' => ['elements' => ['property', 'method']],
'single_quote' => ['strings_containing_single_quote_chars' => false],
'single_class_element_per_statement' => ['elements' => ['const', 'property']],
'class_attributes_separation' => ['elements' => ['const', 'method', 'property']],
'no_extra_blank_lines' => [
'break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block',
'return', 'square_brace_block', 'switch', 'throw', 'use', 'useTrait', 'use_trait',
],
'no_extra_consecutive_blank_lines' => [
'break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block',
'return', 'square_brace_block', 'switch', 'throw', 'use', 'useTrait', 'use_trait',
],
'ordered_class_elements' => [
'order' => [
'use_trait', 'constant_public', 'constant_protected', 'constant_private', 'property_public', 'property_protected',
'property_private', 'construct', 'destruct', 'magic', 'phpunit', 'method_protected', 'method_public', 'method_private',
],
'sortAlgorithm' => 'alpha',
],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_var_without_name' => true,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => true,
]
])
->setFinder($finder);
24 changes: 0 additions & 24 deletions psalm.xml

This file was deleted.

0 comments on commit 07bb1df

Please sign in to comment.