2026-04-03

This commit is contained in:
gcch 2026-04-03 08:49:14 +02:00
commit 5f835ca4e6
45 changed files with 819 additions and 626 deletions

View file

@ -12,7 +12,7 @@ $finder = new Finder()->in(__DIR__)->exclude([
'web/wp',
'web/app/languages',
'web/app/plugins',
'web/app/mu-plugins'
'web/app/mu-plugins',
]);
return new Config()
@ -29,7 +29,7 @@ return new Config()
'const' => 'none',
'method' => 'one',
'property' => 'one',
'trait_import' => 'none'
'trait_import' => 'none',
]],
'class_reference_name_casing' => true,
'clean_namespace' => true,
@ -103,7 +103,7 @@ return new Config()
'return',
'switch_case',
'yield',
'yield_from'
'yield_from',
]],
'no_unneeded_final_method' => true,
'no_unneeded_import_alias' => true,
@ -138,7 +138,7 @@ return new Config()
'random_api_migration' => ['replacements' => [
'getrandmax' => 'mt_getrandmax',
'rand' => 'mt_rand',
'srand' => 'mt_srand'
'srand' => 'mt_srand',
]],
'return_assignment' => true,
'self_accessor' => true,
@ -177,7 +177,7 @@ return new Config()
'no_superfluous_phpdoc_tags' => [
'allow_hidden_params' => false,
'allow_mixed' => false,
'allow_unused_params' => false
'allow_unused_params' => false,
],
// PHPDoc should contain @param for all params.
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
@ -223,7 +223,7 @@ return new Config()
'never-returns',
'no-return',
'real',
'str'
'str',
]],
// Annotations in PHPDoc should be grouped together so that annotations of the same type immediately follow each other. Annotations of a different type are separated by a single blank line.
'phpdoc_separation' => [
@ -232,9 +232,9 @@ return new Config()
['author', 'copyright', 'license'],
['category', 'package', 'subpackage'],
['property', 'property-read', 'property-write'],
['deprecated', 'link', 'see', 'since']
['deprecated', 'link', 'see', 'since'],
],
'skip_unlisted_annotations' => false
'skip_unlisted_annotations' => false,
],
// Single line @var PHPDoc should have proper spacing.
'phpdoc_single_line_var_spacing' => true,
@ -253,7 +253,7 @@ return new Config()
// @var and @type annotations must have type and name in the correct order.
'phpdoc_var_annotation_correct_order' => true,
// @var and @type annotations of classy properties should not contain the name.
'phpdoc_var_without_name' => true
'phpdoc_var_without_name' => true,
])
->setFinder($finder)
->setParallelConfig(Runner\Parallel\ParallelConfigFactory::detect());