File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
tests/Integration/Fixtures Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 8989use PhpCsFixer \Fixer \Import \OrderedImportsFixer ;
9090use PhpCsFixer \Fixer \LanguageConstruct \DeclareEqualNormalizeFixer ;
9191use PhpCsFixer \Fixer \LanguageConstruct \IsNullFixer ;
92+ use PhpCsFixer \Fixer \LanguageConstruct \NullableTypeDeclarationFixer ;
9293use PhpCsFixer \Fixer \LanguageConstruct \SingleSpaceAroundConstructFixer ;
9394use PhpCsFixer \Fixer \ListNotation \ListSyntaxFixer ;
9495use PhpCsFixer \Fixer \NamespaceNotation \BlankLinesBeforeNamespaceFixer ;
311312 DeclareEqualNormalizeFixer::class,
312313 // Replaces `is_null($var)` expression with `null === $var`
313314 IsNullFixer::class,
315+ // Nullable single type declaration should be standardised using question mark syntax.
316+ NullableTypeDeclarationFixer::class,
314317 // Ensures a single space around language constructs.
315318 SingleSpaceAroundConstructFixer::class,
316319 // Namespace must not contain spacing, comments or PHPDoc.
Original file line number Diff line number Diff line change @@ -170,4 +170,7 @@ class Basic extends AbstractBasic implements InterfaceFromThisNamespace // Fully
170170 2 ,
171171 );
172172 }
173+
174+ // NullableTypeDeclarationFixer
175+ public function withParameters (?string $ nullableValue ): void {}
173176}
Original file line number Diff line number Diff line change @@ -167,4 +167,8 @@ but should be heredoc instead';
167167 2
168168 );
169169 }
170+
171+ // NullableTypeDeclarationFixer
172+ public function withParameters (null |string $ nullableValue ): void
173+ {}
170174}
You can’t perform that action at this time.
0 commit comments