Skip to content

Instantly share code, notes, and snippets.

@lamberttraccard
Created April 11, 2018 18:49
Show Gist options
  • Save lamberttraccard/99fba5cc4dac6d5155d8f0b1d6324ee9 to your computer and use it in GitHub Desktop.
Save lamberttraccard/99fba5cc4dac6d5155d8f0b1d6324ee9 to your computer and use it in GitHub Desktop.
<?php
$rules = [
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['align_double_arrow' => true],
'no_multiline_whitespace_before_semicolons' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_short_echo_tag' => true,
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'phpdoc_order' => true,
'ordered_imports' => true,
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true,
'whitespace_after_comma_in_array' => true,
'method_chaining_indentation' => true,
];
$excludes = [
'vendor',
'node_modules',
];
return PhpCsFixer\Config::create()
->setRules($rules)
->setFinder(
PhpCsFixer\Finder::create()
->exclude($excludes)
->notName('README.md')
->notName('*.xml')
->notName('*.yml')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment