mirror of
https://github.com/symfony/ai.git
synced 2026-03-23 23:42:18 +01:00
55 lines
1.4 KiB
PHP
55 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/*
|
|
* This file is part of the Symfony package.
|
|
*
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
if (!file_exists(__DIR__.'/src')) {
|
|
exit(0);
|
|
}
|
|
|
|
$fileHeaderParts = [
|
|
<<<'EOF'
|
|
This file is part of the Symfony package.
|
|
|
|
(c) Fabien Potencier <fabien@symfony.com>
|
|
|
|
EOF,
|
|
<<<'EOF'
|
|
|
|
For the full copyright and license information, please view the LICENSE
|
|
file that was distributed with this source code.
|
|
EOF,
|
|
];
|
|
|
|
return (new PhpCsFixer\Config())
|
|
// @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7777
|
|
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
|
|
->setRules([
|
|
'@PHP71Migration' => true,
|
|
'@PHPUnit75Migration:risky' => true,
|
|
'@Symfony' => true,
|
|
'@Symfony:risky' => true,
|
|
'protected_to_private' => false,
|
|
'declare_strict_types' => true,
|
|
'header_comment' => [
|
|
'header' => implode('', $fileHeaderParts),
|
|
],
|
|
])
|
|
->setRiskyAllowed(true)
|
|
->setFinder(
|
|
(new PhpCsFixer\Finder())
|
|
->in(__DIR__.'/src')
|
|
->append([__FILE__])
|
|
->notPath('#/Fixtures/#')
|
|
)
|
|
->setCacheFile('.php-cs-fixer.cache')
|
|
;
|