Skip to content

Instantly share code, notes, and snippets.

@ABM-Dan
Created December 14, 2016 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ABM-Dan/25375022321bbf779ef5e1ccd4eb62c7 to your computer and use it in GitHub Desktop.
Save ABM-Dan/25375022321bbf779ef5e1ccd4eb62c7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env php
<?php
$rules = [
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => true,
'phpdoc_order' => true,
];
$excludedPaths = [
'app/config',
'app/data',
'app/Resources',
'var',
'web/bundles',
'web/css',
'web/fonts',
'web/js',
];
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules($rules)
->setFinder(
PhpCsFixer\Finder::create()
->exclude($excludedPaths)
->notPath('web/config.php')
->in(__DIR__)
)
;
@keradus
Copy link

keradus commented Dec 14, 2016

👎 for splitting the finder into 2 places

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment