You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
932 B
PHP
45 lines
932 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* This file is part of CodeIgniter Shield.
|
|
*
|
|
* (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.
|
|
*/
|
|
|
|
use CodeIgniter\CodingStandard\CodeIgniter4;
|
|
use Nexus\CsConfig\Factory;
|
|
use PhpCsFixer\Finder;
|
|
|
|
$finder = Finder::create()
|
|
->files()
|
|
->in([
|
|
__DIR__ . '/src/',
|
|
__DIR__ . '/tests/',
|
|
])
|
|
->exclude('build')
|
|
->append([
|
|
__FILE__,
|
|
__DIR__ . '/rector.php',
|
|
]);
|
|
|
|
$overrides = [
|
|
'declare_strict_types' => true,
|
|
'void_return' => true,
|
|
];
|
|
|
|
$options = [
|
|
'finder' => $finder,
|
|
'cacheFile' => 'build/.php-cs-fixer.cache',
|
|
];
|
|
|
|
return Factory::create(new CodeIgniter4(), $overrides, $options)->forLibrary(
|
|
'CodeIgniter Shield',
|
|
'CodeIgniter Foundation',
|
|
'admin@codeigniter.com'
|
|
);
|