2024-04-10 11:33:24 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
2024-04-10 11:33:24 +09:00
|
|
|
use PhpCsFixer\Finder;
|
|
|
|
|
2024-07-09 12:58:32 +08:00
|
|
|
/** @var ConfigInterface $config */
|
|
|
|
$config = require __DIR__ . '/.php-cs-fixer.dist.php';
|
|
|
|
|
2024-04-10 11:33:24 +09:00
|
|
|
$finder = Finder::create()
|
|
|
|
->files()
|
|
|
|
->in([
|
|
|
|
__DIR__ . '/tests',
|
|
|
|
])
|
|
|
|
->notPath([
|
|
|
|
'_support/View/Cells/multiplier.php',
|
|
|
|
'_support/View/Cells/colors.php',
|
|
|
|
'_support/View/Cells/addition.php',
|
2024-12-27 08:14:06 +01:00
|
|
|
'system/Database/Live/PreparedQueryTest.php',
|
2024-04-10 11:33:24 +09:00
|
|
|
])
|
2024-07-09 12:58:32 +08:00
|
|
|
->notName('#Foobar.php$#');
|
2024-04-10 11:33:24 +09:00
|
|
|
|
|
|
|
$overrides = [
|
|
|
|
'void_return' => true,
|
|
|
|
];
|
|
|
|
|
2024-07-09 12:58:32 +08:00
|
|
|
return $config
|
|
|
|
->setFinder($finder)
|
|
|
|
->setCacheFile('build/.php-cs-fixer.tests.cache')
|
|
|
|
->setRules(array_merge($config->getRules(), $overrides));
|