Last active
September 1, 2020 12:43
-
-
Save iggyster/68cd981065340853a219546c26ea6901 to your computer and use it in GitHub Desktop.
PHP CS Fixer config for Symfony 4 projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$projectPath = __DIR__ . '/src'; | |
if (!file_exists($projectPath)) { | |
echo 'Source directory is missed or project path is invalid.'; | |
die(1); | |
} | |
return PhpCsFixer\Config::create() | |
->setRules([ | |
'@PhpCsFixer' => true, | |
'array_syntax' => ['syntax' => 'short'], | |
]) | |
->setFinder( | |
PhpCsFixer\Finder::create() | |
->in($projectPath) | |
->exclude([ | |
'Migrations', | |
]) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment