|
29 | 29 | ]); |
30 | 30 |
|
31 | 31 | $overrides = [ |
32 | | - 'echo_tag_syntax' => false, |
33 | | - 'php_unit_internal_class' => false, |
34 | | - 'no_unused_imports' => false, |
35 | | - 'class_attributes_separation' => false, |
| 32 | + 'echo_tag_syntax' => false, |
| 33 | + 'php_unit_internal_class' => false, |
| 34 | + 'no_unused_imports' => false, |
| 35 | + 'class_attributes_separation' => false, |
| 36 | + 'php_unit_data_provider_return_type' => true, |
36 | 37 | ]; |
37 | 38 |
|
38 | 39 | $options = [ |
39 | | - 'cacheFile' => 'build/.php-cs-fixer.user-guide.cache', |
40 | | - 'finder' => $finder, |
41 | | - 'customFixers' => FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer'), |
42 | | - 'customRules' => [ |
43 | | - NoCodeSeparatorCommentFixer::name() => true, |
44 | | - ], |
| 40 | + 'cacheFile' => 'build/.php-cs-fixer.no-header.cache', |
| 41 | + 'finder' => $finder, |
45 | 42 | ]; |
46 | 43 |
|
47 | | -return Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects(); |
| 44 | +$config = Factory::create(new CodeIgniter4(), $overrides, $options)->forProjects(); |
| 45 | + |
| 46 | +// @TODO: remove this check when support for PHP 7.4 is dropped |
| 47 | +if (PHP_VERSION_ID >= 80000) { |
| 48 | + $config |
| 49 | + ->registerCustomFixers(FixerGenerator::create('vendor/nexusphp/cs-config/src/Fixer', 'Nexus\\CsConfig\\Fixer')) |
| 50 | + ->setRules(array_merge($config->getRules(), [ |
| 51 | + NoCodeSeparatorCommentFixer::name() => true, |
| 52 | + ])); |
| 53 | +} |
| 54 | + |
| 55 | +return $config; |
0 commit comments