Skip to content

Instantly share code, notes, and snippets.

@Yousha
Last active January 4, 2026 16:44
Show Gist options
  • Select an option

  • Save Yousha/d5e9945f2383ad0324a9cc30256a0bc0 to your computer and use it in GitHub Desktop.

Select an option

Save Yousha/d5e9945f2383ad0324a9cc30256a0bc0 to your computer and use it in GitHub Desktop.
Simple .php-cs-fixer.php config file.
<?php
declare(strict_types=1);
use PhpCsFixer\Finder;
use PhpCsFixer\Config;
static $rules = [
'@PSR1' => true,
'@PSR2' => true,
'@PSR12' => true,
'@PER-CS' => true,
'@PHP7x4Migration' => true
];
static $excludeFolders = [
'.git/',
'.github/',
'resources/',
'vendor/'
];
$finder = Finder::create()
->in(__DIR__)
->exclude($excludeFolders)
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new Config())
->setRules($rules)
->setFinder($finder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment