Skip to content

Commit

Permalink
Merge pull request #1802 from WordPress/feature/move-one-object-per-c…
Browse files Browse the repository at this point in the history
…lass-to-core

OneObjectStructurePerFile: move from `Extra` to `Core`
  • Loading branch information
dingo-d authored Apr 12, 2021
2 parents 2483567 + 88c5608 commit 41f5a9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 6 additions & 0 deletions WordPress-Core/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,12 @@
<severity>0</severity>
</rule>

<!-- Encourage having only one class/interface/trait per file.
Moved from Extra to Core after discussion on Slack. -->
<rule ref="Generic.Files.OneObjectStructurePerFile">
<message>Best practices: Declare only one class/interface/trait in a file.</message>
</rule>

<!--
#############################################################################
Not in the coding standard handbook: WP specific sniffs.
Expand Down
6 changes: 0 additions & 6 deletions WordPress-Extra/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@
<!-- https://github.com/WordPress/WordPress-Coding-Standards/pull/382#discussion_r29981655 -->
<!--<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>-->

<!-- Encourage having only one class/interface/trait per file. -->
<rule ref="Generic.Files.OneObjectStructurePerFile">
<type>warning</type>
<message>Best practice suggestion: Declare only one class/interface/trait in a file.</message>
</rule>

<!-- Verify modifier keywords for declared methods and properties in classes.
https://github.com/WordPress/WordPress-Coding-Standards/issues/1101 -->
<rule ref="Squiz.Scope.MethodScope"/>
Expand Down

0 comments on commit 41f5a9c

Please sign in to comment.