File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 483
483
<rule ref =" Generic.Files.OneObjectStructurePerFile" />
484
484
485
485
486
+ <!--
487
+ #############################################################################
488
+ Handbook: Object-Oriented Programming - Trait Use Statements.
489
+ Ref: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#trait-use-statements
490
+ #############################################################################
491
+ -->
492
+ <!-- Covers rule: Trait use statements should be at the top of a class ... -->
493
+ <!-- Covered by the PSR12.Traits.UseDeclaration sniff. -->
494
+
495
+ <!-- Rule: ... and should have exactly one blank line before the first use statement,
496
+ and at least one blank line after the last statement.
497
+ The only exception is when the class only contains trait use statements,
498
+ in which case the blank line after may be omitted. -->
499
+ <!-- Blank line after covered by the PSR12.Traits.UseDeclaration sniff. -->
500
+
501
+ <!-- Covers rule: (example based rules: spacing, grouping and indentation). -->
502
+ <rule ref =" PSR12.Traits.UseDeclaration" />
503
+
504
+ <!-- Allow for a blank line between the OO statement and the first trait use statement. -->
505
+ <rule ref =" PSR12.Traits.UseDeclaration.UseAfterBrace" >
506
+ <severity >0</severity >
507
+ </rule >
508
+
509
+ <!-- Prevent duplicate messages - spacing after use is already covered by `Generic.WhiteSpace.LanguageConstructSpacing`. -->
510
+ <rule ref =" PSR12.Traits.UseDeclaration.SpaceAfterUse" >
511
+ <severity >0</severity >
512
+ </rule >
513
+
514
+
486
515
<!--
487
516
#############################################################################
488
517
Handbook: Object-Oriented Programming - Visibility should always be declared.
You can’t perform that action at this time.
0 commit comments