1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00
Files
archived-web-php/.php-cs-fixer.php
Andreas Möller f127de5db9 Enhancement: Enable strict_param fixer
We set strict param to false to ensure current behavior,
except for two cases where it is safe to go with true.

Closes GH-658.
2022-07-15 14:48:44 +02:00

36 lines
952 B
PHP

<?php
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
$config = new PhpCsFixer\Config();
$finder = $config->getFinder()
->ignoreDotFiles(false)
->in(__DIR__)
->exclude('manual/en/')
->name('*.inc')
->name(__FILE__)
->notPath('include/last_updated.inc')
->notPath('include/pregen-confs.inc')
->notPath('include/pregen-news.inc')
->notPath('tests/run-tests.php');
$config
->setRiskyAllowed(true)
->setRules([
'array_indentation' => true,
'constant_case' => true,
'indentation_type' => true,
'line_ending' => true,
'no_extra_blank_lines' => true,
'no_trailing_whitespace' => true,
'ordered_class_elements' => true,
'single_space_after_construct' => true,
'strict_param' => true,
'trim_array_spaces' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
]);
return $config;