Skip to content

Instantly share code, notes, and snippets.

@iggyster
Last active September 1, 2020 12:43
Show Gist options
  • Save iggyster/68cd981065340853a219546c26ea6901 to your computer and use it in GitHub Desktop.
Save iggyster/68cd981065340853a219546c26ea6901 to your computer and use it in GitHub Desktop.
PHP CS Fixer config for Symfony 4 projects
<?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