Skip to content

Commit

Permalink
[TASK] Update php-cs-fixer to version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
flossels committed Jun 18, 2021
1 parent 577d596 commit 6faf8b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
/Tests/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/php-cs-fixer.php export-ignore
/.travis.yml export-ignore
14 changes: 7 additions & 7 deletions .php_cs → php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
Florian Wessels <[email protected]>, Leuchtfeuer Digital Marketing
COMMENT;


$finder = PhpCsFixer\Finder::create()
$finder = (new PhpCsFixer\Finder())
->name('*.php')
->in(__DIR__)
->exclude('Libraries')
->exclude('Resources')
->notName('ext_emconf.php')
->notName('ext_localconf.php');
->notName('ext_localconf.php')
->notName('php-cs-fixer.php');

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
Expand All @@ -38,7 +38,6 @@
'declare_equal_normalize' => ['space' => 'none'],
'dir_constant' => true,
'function_typehint_space' => true,
'hash_to_slash_comment' => true,
'header_comment' => [
'header' => $headerComment,
'comment_type' => 'comment',
Expand All @@ -54,7 +53,7 @@
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'no_extra_consecutive_blank_lines' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_null_property_initialization' => true,
Expand All @@ -67,7 +66,7 @@
'no_useless_else' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'php_unit_construct' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame'],
'php_unit_construct' => ['assertions' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame']],
'php_unit_mock_short_will_return' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'phpdoc_no_access' => true,
Expand All @@ -79,6 +78,7 @@
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'return_type_declaration' => ['space_before' => 'none'],
'single_quote' => true,
'single_line_comment_style' => ['comment_types' => ['hash']],
'single_trait_insert_per_statement' => true,
'whitespace_after_comma_in_array' => true,
])
Expand Down

0 comments on commit 6faf8b6

Please sign in to comment.