Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit d1caaa3

Browse files
committed
update PHP-CS-Fixer config
1 parent de829e4 commit d1caaa3

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

php_cs_fixer.dist.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
->setRules([
2525
'@PSR12' => true,
2626
'@PHP84Migration' => true,
27-
'@PHPUnit100Migration:risky' => true,
27+
'@PHPUnit110Migration:risky' => true,
2828
'@Symfony' => true,
2929
'@Symfony:risky' => true,
3030
'combine_nested_dirname' => true,
@@ -35,14 +35,26 @@
3535
'native_function_invocation' => false,
3636
'no_short_bool_cast' => true,
3737
'no_unreachable_default_argument_value' => false,
38+
'no_useless_else' => true,
39+
'no_useless_return' => true,
3840
'nullable_type_declaration_for_default_null_value' => true,
3941
'phpdoc_align' => ['align' => 'left'],
4042
'phpdoc_to_param_type' => true,
4143
'phpdoc_to_return_type' => true,
44+
'php_unit_attributes' => true,
4245
'php_unit_test_annotation' => false, // breaks "@depends App\Something::testFooBar()"
43-
'protected_to_private' => false,
46+
'protected_to_private' => true,
47+
'random_api_migration' => [
48+
'replacements' => [
49+
'mt_getrandmax' => 'getrandmax',
50+
'mt_rand' => 'random_int',
51+
'mt_srand' => 'srand',
52+
'rand' => 'random_int',
53+
],
54+
],
4455
'simplified_null_return' => true,
4556
'single_line_throw' => false,
57+
'static_lambda' => true,
4658
])
4759
->setRiskyAllowed(true)
4860
->setFinder(

0 commit comments

Comments
 (0)