Skip to content

Instantly share code, notes, and snippets.

@amacneil
Created November 15, 2012 01:32
Show Gist options
  • Save amacneil/4076069 to your computer and use it in GitHub Desktop.
Save amacneil/4076069 to your computer and use it in GitHub Desktop.
Configure php-cs-fixer to run all fixers except PSR0
<?php
/*
* Place this file in the root directory of your project
* It configures php-cs-fixer to run all style fixers, except the PSR0 file naming fixer
* (which in my case isn't possible to follow due to package requirements)
* For more info see: http://cs.sensiolabs.org/
*/
$fix = new Symfony\CS\Fixer();
$fix->registerBuiltInFixers();
foreach ($fix->getFixers() as $f) {
if ($f->getName() != 'psr0') {
$fixers[] = $f->getName();
}
}
return Symfony\CS\Config\Config::create()->fixers($fixers);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment