Skip to content

Instantly share code, notes, and snippets.

@lattespirit
Last active April 1, 2019 04:21
Show Gist options
  • Save lattespirit/1941548b152f544faa224867d029acb6 to your computer and use it in GitHub Desktop.
Save lattespirit/1941548b152f544faa224867d029acb6 to your computer and use it in GitHub Desktop.
PHP Code Style Fixer config file
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('somedir')
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setUsingCache(false)
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'elseif' => true,
'ordered_imports' => ['sortAlgorithm' => 'length'],
'no_trailing_whitespace' => true,
'php_unit_set_up_tear_down_visibility' => true,
'visibility_required' => [],
])
->setFinder($finder)
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment