mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-25 09:46:27 +00:00
Do not add : void for test methods
This commit is contained in:
@@ -19,6 +19,26 @@ return (new Config())
|
||||
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
|
||||
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
|
||||
])
|
||||
->setRuleCustomisationPolicy(new class implements PhpCsFixer\Config\RuleCustomisationPolicyInterface {
|
||||
public function getPolicyVersionForCache(): string
|
||||
{
|
||||
return hash_file('xxh128', __FILE__);
|
||||
}
|
||||
|
||||
public function getRuleCustomisers(): array
|
||||
{
|
||||
return [
|
||||
'void_return' => static function (SplFileInfo $file) {
|
||||
// temporary hack due to bug: https://github.com/symfony/symfony/issues/62734
|
||||
if (!$file instanceof Symfony\Component\Finder\SplFileInfo) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !str_contains($file->getRelativePathname(), '/Tests/');
|
||||
},
|
||||
];
|
||||
}
|
||||
})
|
||||
->setRiskyAllowed(true)
|
||||
->setParallelConfig(ParallelConfigFactory::detect())
|
||||
->setFinder((new Finder())->in(__DIR__))
|
||||
|
||||
Reference in New Issue
Block a user