2022-03-03 15:58:41 +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;
|
2022-03-03 15:58:41 +09:00
|
|
|
use PhpCsFixer\Finder;
|
|
|
|
|
2024-07-09 12:58:32 +08:00
|
|
|
/** @var ConfigInterface $config */
|
|
|
|
$config = require __DIR__ . '/.php-cs-fixer.dist.php';
|
|
|
|
|
2022-03-03 15:58:41 +09:00
|
|
|
$finder = Finder::create()
|
|
|
|
->files()
|
|
|
|
->in([
|
|
|
|
__DIR__ . '/user_guide_src/source',
|
|
|
|
])
|
|
|
|
->notPath([
|
|
|
|
'ci3sample/',
|
2022-03-11 18:00:21 +01:00
|
|
|
'database/query_builder/075.php',
|
2023-07-21 17:58:53 +08:00
|
|
|
'libraries/sessions/016.php',
|
|
|
|
'outgoing/response/031.php',
|
|
|
|
'outgoing/response/032.php',
|
2022-03-03 15:58:41 +09:00
|
|
|
]);
|
|
|
|
|
|
|
|
$overrides = [
|
2024-01-06 09:50:24 +09:00
|
|
|
'echo_tag_syntax' => false,
|
2024-07-09 12:58:32 +08:00
|
|
|
'header_comment' => false,
|
2024-01-06 09:50:24 +09:00
|
|
|
'php_unit_internal_class' => false,
|
|
|
|
'no_unused_imports' => false,
|
|
|
|
'class_attributes_separation' => false,
|
|
|
|
'fully_qualified_strict_types' => [
|
|
|
|
'import_symbols' => false,
|
|
|
|
'leading_backslash_in_global_namespace' => true,
|
|
|
|
],
|
2022-03-03 15:58:41 +09:00
|
|
|
];
|
|
|
|
|
2024-07-09 12:58:32 +08:00
|
|
|
return $config
|
|
|
|
->setFinder($finder)
|
|
|
|
->setCacheFile('build/.php-cs-fixer.user-guide.cache')
|
|
|
|
->setRules(array_merge($config->getRules(), $overrides));
|