mirror of
https://github.com/yiisoft/app.git
synced 2026-02-19 17:11:21 +01:00
30 lines
629 B
PHP
30 lines
629 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use PhpCsFixer\Config;
|
|
use PhpCsFixer\Finder;
|
|
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
|
|
|
|
ini_set('memory_limit', '512M');
|
|
|
|
$root = __DIR__;
|
|
$finder = (new Finder())
|
|
->in([
|
|
$root . '/config',
|
|
$root . '/src',
|
|
$root . '/tests',
|
|
])
|
|
->append([
|
|
$root . '/public/index.php',
|
|
]);
|
|
|
|
return (new Config())
|
|
->setCacheFile(__DIR__ . '/runtime/cache/.php-cs-fixer.cache')
|
|
->setParallelConfig(ParallelConfigFactory::detect())
|
|
->setRules([
|
|
'@PER-CS2.0' => true,
|
|
'no_unused_imports' => true,
|
|
])
|
|
->setFinder($finder);
|