File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
tests/Integration/Fixtures Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 4646use PhpCsFixer \Fixer \AttributeNotation \AttributeEmptyParenthesesFixer ;
4747use PhpCsFixer \Fixer \Basic \BracesFixer ;
4848use PhpCsFixer \Fixer \Basic \NoTrailingCommaInSinglelineFixer ;
49+ use PhpCsFixer \Fixer \Basic \OctalNotationFixer ;
4950use PhpCsFixer \Fixer \Basic \PsrAutoloadingFixer ;
5051use PhpCsFixer \Fixer \Basic \SingleLineEmptyBodyFixer ;
5152use PhpCsFixer \Fixer \Casing \ClassReferenceNameCasingFixer ;
244245 SingleLineEmptyBodyFixer::class, // Defined in PER 2.0
245246 // Values separated by a comma on a single line should not have a trailing comma.
246247 NoTrailingCommaInSinglelineFixer::class,
248+ // Literal octal must be in 0o notation.
249+ OctalNotationFixer::class,
247250 // Arrays should be formatted like function/method arguments
248251 TrimArraySpacesFixer::class,
249252 // In array declaration, there MUST be a whitespace after each comma
Original file line number Diff line number Diff line change @@ -43,4 +43,10 @@ class NewPhpFeatures
4343 string $ foo ,
4444 string $ bar ,
4545 ): void {}
46+
47+ public function php81features (): void
48+ {
49+ // OctalNotationFixer
50+ $ numberInOctalNotation = 0o123 ;
51+ }
4652}
Original file line number Diff line number Diff line change @@ -44,4 +44,10 @@ class NewPhpFeatures
4444 #[ParamAttribute] #[AnotherAttribute('foo ' )] string $ foo ,
4545 string $ bar ,
4646 ): void {}
47+
48+ public function php81features (): void
49+ {
50+ // OctalNotationFixer
51+ $ numberInOctalNotation = 0123 ;
52+ }
4753}
You can’t perform that action at this time.
0 commit comments