Skip to content

Commit

Permalink
coding style updates
Browse files Browse the repository at this point in the history
Signed-off-by: Demin Yin <deminy@deminy.net>
  • Loading branch information
deminy committed Oct 6, 2021
1 parent e17f3cf commit 3aeab59
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

declare(strict_types=1);

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'@PSR2' => true,
'@Symfony' => true,
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
'binary_operator_spaces' => ['operators' => ['=' => 'align', '=>' => 'align', ]],
'blank_line_after_namespace' => true,
'blank_line_before_statement' => ['statements' => ['declare']],
'class_attributes_separation' => true,
Expand All @@ -19,7 +20,7 @@
'combine_consecutive_unsets' => true,
'declare_strict_types' => true,
'general_phpdoc_annotation_remove' => ['annotations' => ['author']],
'header_comment' => ['commentType' => 'PHPDoc', 'header' => '', 'separate' => 'bottom', 'location' => 'after_open'],
'header_comment' => ['comment_type' => 'PHPDoc', 'header' => '', 'separate' => 'bottom', 'location' => 'after_open'],
'increment_style' => ['style' => 'post'],
'lambda_not_used_import' => false,
'linebreak_after_opening_tag' => true,
Expand All @@ -29,11 +30,13 @@
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'not_operator_with_space' => false,
'not_operator_with_successor_space' => false,
'php_unit_strict' => false,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_no_empty_return' => true,
'phpdoc_no_empty_return' => false,
'phpdoc_types_order' => ['sort_algorithm' => 'none', 'null_adjustment' => 'always_last'],
'phpdoc_separation' => false,
'phpdoc_summary' => false,
'ordered_class_elements' => true,
Expand All @@ -45,4 +48,4 @@
'yoda_style' => ['always_move_variable' => false, 'equal' => false, 'identical' => false],
])
->setFinder(PhpCsFixer\Finder::create()->in(__DIR__ . '/examples'))
->setUsingCache(false);
->setUsingCache(false);

0 comments on commit 3aeab59

Please sign in to comment.