Skip to content

Instantly share code, notes, and snippets.

@Yousha
Created April 2, 2025 18:05
Show Gist options
  • Save Yousha/d5e9945f2383ad0324a9cc30256a0bc0 to your computer and use it in GitHub Desktop.
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,
];
static $excludeFolders = [
'vendor/',
'storage/',
];
$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