in(__DIR__) // Adjust to the directories you want to scan ->exclude('vendor') // Exclude vendor directory ->name('*.php') ->notName('*.blade.php'); return (new Config()) ->setParallelConfig(ParallelConfigFactory::detect()) ->setFinder($finder) ->setRiskyAllowed(true) // Allow risky rules if needed ->setRules([ '@PSR12' => true, 'array_syntax' => ['syntax' => 'short'], 'binary_operator_spaces' => ['default' => 'align_single_space_minimal'], 'blank_line_after_namespace' => true, 'blank_line_after_opening_tag' => true, 'concat_space' => ['spacing' => 'one'], 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], 'no_unused_imports' => true, 'ordered_imports' => ['sort_algorithm' => 'alpha'], 'single_import_per_statement' => true, 'single_quote' => true, 'trailing_comma_in_multiline' => true, 'simplified_if_return' => true, ]);