Skip to content

Instantly share code, notes, and snippets.

@xcaptain
Created October 14, 2017 10:47
Show Gist options
  • Save xcaptain/63043e6b5455f3c55862f2d1271d1cc9 to your computer and use it in GitHub Desktop.
Save xcaptain/63043e6b5455f3c55862f2d1271d1cc9 to your computer and use it in GitHub Desktop.
php-cs-fixer config
<?php
$excluded_folders = [
'node_modules',
'storage',
'vendor',
'bootstrap/cache',
];
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude($excluded_folders)
->notName('*.xml')
->notName('*.md')
->notName('*.yml');
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => [
'syntax' => 'short',
],
'braces' => [
'allow_single_line_closure' => true,
],
'heredoc_to_nowdoc' => false,
'phpdoc_summary' => false,
'pre_increment' => false,
'yoda_style' => false,
])
->setFinder($finder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment