File tree Expand file tree Collapse file tree 6 files changed +31
-4
lines changed
src/Configuration/Defaults
nativeFunctionTypeDeclarations Expand file tree Collapse file tree 6 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 2424use PhpCsFixer \Fixer \Casing \MagicConstantCasingFixer ;
2525use PhpCsFixer \Fixer \Casing \MagicMethodCasingFixer ;
2626use PhpCsFixer \Fixer \Casing \NativeFunctionCasingFixer ;
27+ use PhpCsFixer \Fixer \Casing \NativeTypeDeclarationCasingFixer ;
2728use PhpCsFixer \Fixer \CastNotation \CastSpacesFixer ;
2829use PhpCsFixer \Fixer \CastNotation \LowercaseCastFixer ;
2930use PhpCsFixer \Fixer \CastNotation \ShortScalarCastFixer ;
@@ -368,6 +369,7 @@ class CommonRules extends Rules
368369 NoMultilineWhitespaceAroundDoubleArrowFixer::class => true ,
369370 CompactEmptyArrayFixer::class => true ,
370371 ClassKeywordFixer::class => true ,
372+ NativeTypeDeclarationCasingFixer::class => true ,
371373 NamedArgumentFixer::class => true ,
372374 NoBlankLinesAfterPhpdocFixer::class => true ,
373375 ConstantCaseFixer::class => true ,
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ public static function providePhp81Fixtures(): array
4848 return [
4949 ["enums " ],
5050 ["readonlies " ],
51+ ["nativeFunctionTypeDeclarations " ],
5152 ];
5253 }
5354
Original file line number Diff line number Diff line change 22
33enum Status: string
44{
5- case ACTIVE = "active " ;
6- case INACTIVE = "inactive " ;
5+ case Active = "active " ;
6+ case Inactive = "inactive " ;
77}
Original file line number Diff line number Diff line change 44
55enum Status: string
66{
7- case ACTIVE = "active " ;
8- case INACTIVE = "inactive " ;
7+ case Active = "active " ;
8+ case Inactive = "inactive " ;
99}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ enum Status: String
6+ {
7+ case Active = "active " ;
8+ }
9+ enum Priority: Int
10+ {
11+ case High = 1 ;
12+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ enum Status: string
6+ {
7+ case Active = "active " ;
8+ }
9+ enum Priority: int
10+ {
11+ case High = 1 ;
12+ }
You can’t perform that action at this time.
0 commit comments