Skip to content

Instantly share code, notes, and snippets.

@PHLAK
Last active May 16, 2017 03:14
Show Gist options
  • Save PHLAK/b2b56309e6f7e75735316da8a2c4730c to your computer and use it in GitHub Desktop.
Save PHLAK/b2b56309e6f7e75735316da8a2c4730c to your computer and use it in GitHub Desktop.
Custom .php_cs.dist file for php-cs-fixer
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__);
return PhpCsFixer\Config::create()
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'@Symfony' => true,
'array_syntax' => [
'syntax' => 'short'
],
'concat_space' => [
'spacing' => 'one'
],
'linebreak_after_opening_tag' => true,
'new_with_braces' => false,
'no_multiline_whitespace_before_semicolons' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'not_operator_with_successor_space' => true,
'ordered_imports' => [
'sortAlgorithm' => 'alpha'
],
'phpdoc_order' => true,
'semicolon_after_instruction' => true
])->setFinder($finder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment