Skip to content

Instantly share code, notes, and snippets.

@stillfinder
Last active June 10, 2019 16:40
Show Gist options
  • Save stillfinder/b1db4c4c8320b132ecc67e52f24477f6 to your computer and use it in GitHub Desktop.
Save stillfinder/b1db4c4c8320b132ecc67e52f24477f6 to your computer and use it in GitHub Desktop.
PHP CS Fixer Laravel configuration
<?php
$finder = PhpCsFixer\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
;
return PhpCsFixer\Config::create()
->setRules(array(
'@Symfony' => true,
'binary_operator_spaces' => ['align_double_arrow' => false],
'array_syntax' => ['syntax' => 'short'],
'linebreak_after_opening_tag' => true,
'not_operator_with_successor_space' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'concat_space' => ['spacing' => 'one'],
))
->setFinder($finder)
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment