2022-10-19 16:51:16 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of PHP CS Fixer.
|
|
|
|
*
|
|
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
|
|
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
|
|
|
*
|
|
|
|
* This source file is subject to the MIT license that is bundled
|
|
|
|
* with this source code in the file LICENSE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
|
|
->ignoreDotFiles(false)
|
|
|
|
->ignoreVCSIgnored(true)
|
2023-10-14 19:40:58 +00:00
|
|
|
->in(__DIR__.'/lib')
|
2022-10-19 16:51:16 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
$config = new PhpCsFixer\Config();
|
|
|
|
$config
|
2023-10-14 19:40:58 +00:00
|
|
|
->setUsingCache(true)
|
2022-10-19 16:51:16 +00:00
|
|
|
->setRiskyAllowed(true)
|
|
|
|
->setRules([
|
|
|
|
'@PhpCsFixer' => true,
|
|
|
|
'@PhpCsFixer:risky' => true,
|
2023-10-15 01:59:00 +00:00
|
|
|
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'parameters', 'arguments']],
|
2022-10-19 16:51:16 +00:00
|
|
|
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead
|
|
|
|
'modernize_strpos' => false, // needs PHP 8+ or polyfill
|
2023-10-14 08:25:50 +00:00
|
|
|
'phpdoc_to_comment' => ['ignored_tags' => ['psalm-suppress', 'template-implements']],
|
2022-10-19 16:51:16 +00:00
|
|
|
])
|
|
|
|
->setFinder($finder)
|
|
|
|
;
|
|
|
|
|
2023-10-14 19:40:58 +00:00
|
|
|
return $config;
|