<?php

$projectRoot = dirname(__DIR__, 2);

$finder = PhpCsFixer\Finder::create()
    ->in([
        $projectRoot . '/config',
        $projectRoot . '/core',
        $projectRoot . '/pages',
        $projectRoot . '/tests',
    ])
    ->name('*.php');

return (new PhpCsFixer\Config())
    ->setRiskyAllowed(false)
    ->setRules([
        '@PSR12' => true,
        'ordered_imports' => ['sort_algorithm' => 'alpha'],
        'no_unused_imports' => true,
    ])
    ->setFinder($finder);
