2021-07-19 21:21:30 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2021-07-19 21:32:33 +08:00
|
|
|
/**
|
|
|
|
* This file is part of CodeIgniter 4 framework.
|
|
|
|
*
|
|
|
|
* (c) CodeIgniter Foundation <admin@codeigniter.com>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view
|
|
|
|
* the LICENSE file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2024-07-09 12:58:32 +08:00
|
|
|
use PhpCsFixer\ConfigInterface;
|
2021-07-19 21:21:30 +08:00
|
|
|
use PhpCsFixer\Finder;
|
|
|
|
|
2024-07-09 12:58:32 +08:00
|
|
|
/** @var ConfigInterface $config */
|
|
|
|
$config = require __DIR__ . '/.php-cs-fixer.dist.php';
|
|
|
|
|
2021-07-19 21:21:30 +08:00
|
|
|
$finder = Finder::create()
|
|
|
|
->files()
|
|
|
|
->in([
|
|
|
|
__DIR__ . '/admin',
|
|
|
|
__DIR__ . '/app',
|
|
|
|
__DIR__ . '/public',
|
2021-09-02 12:32:07 +08:00
|
|
|
])
|
2022-08-21 14:20:28 +08:00
|
|
|
->exclude(['Views/errors/html'])
|
2021-10-29 18:23:05 +08:00
|
|
|
->append([
|
|
|
|
__DIR__ . '/admin/starter/builds',
|
|
|
|
]);
|
2021-07-19 21:21:30 +08:00
|
|
|
|
2024-07-09 12:58:32 +08:00
|
|
|
$overrides = [
|
|
|
|
'header_comment' => false,
|
2024-04-10 23:35:22 +08:00
|
|
|
];
|
2023-07-18 17:25:10 +08:00
|
|
|
|
2024-07-09 12:58:32 +08:00
|
|
|
return $config
|
|
|
|
->setFinder($finder)
|
|
|
|
->setCacheFile('build/.php-cs-fixer.no-header.cache')
|
|
|
|
->setRules(array_merge($config->getRules(), $overrides));
|