Skip to content

Commit

Permalink
Updated php-cs-fixer config.
Browse files Browse the repository at this point in the history
  • Loading branch information
thisismeonmounteverest committed Jun 9, 2021
1 parent 98336d3 commit ba7d6fa
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
<?php
$finder = new PhpCsFixer\Finder();
$finder
->exclude('src/Mike42')
->notName('*.twig')
->notName('*.yml')
->in('src');

return PhpCsFixer\Config::create()
$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules(array(
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => array('syntax' => 'short'),
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
// one should use PHPUnit methods to set up expected exception instead of annotations
'general_phpdoc_annotation_remove' => array('expectedException', 'expectedExceptionMessage', 'expectedExceptionMessageRegExp'),
'general_phpdoc_annotation_remove' => [
'expectedException',
'expectedExceptionMessage',
'expectedExceptionMessageRegExp'
],
'heredoc_to_nowdoc' => true,
'no_extra_consecutive_blank_lines' => array('break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block'),
'no_extra_consecutive_blank_lines' => [
'break',
'continue',
'extra',
'return',
'throw',
'use',
'parenthesis_brace_block',
'square_brace_block',
'curly_brace_block'
],
'no_short_echo_tag' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
Expand All @@ -24,12 +45,8 @@
'strict_comparison' => true,
'strict_param' => true,
'concat_space' => ['spacing' => 'one'],
))
->setFinder(
PhpCsFixer\Finder::create()
->exclude('src/Mike42')
->notName('*.twig')
->notName('*.yml')
->in('src')
)
])
->setFinder($finder)
;

return $config;

0 comments on commit ba7d6fa

Please sign in to comment.