Skip to content

Commit

Permalink
Merge pull request #2100 from WordPress/feature/core-add-spreadoperat…
Browse files Browse the repository at this point in the history
…or-rules
  • Loading branch information
GaryJones authored Oct 29, 2022
2 parents 3b7c39c + 6b3fa55 commit 9810968
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions WordPress-Core/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose">
<severity>0</severity>
</rule>
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterVariadic">
<severity>0</severity>
</rule>


<!-- Covers rule: Call a function, like so: my_function( $param1, func_param( $param2 ) ); -->
Expand Down Expand Up @@ -336,6 +339,23 @@
https://github.com/WordPress/WordPress-Coding-Standards/issues/1330 -->


<!--
#############################################################################
Handbook: Formatting - Spread operator.
Ref: https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/#spread-operator
#############################################################################
-->
<!-- Covers rule: When using the spread operator, there should be one space or a new line
with the appropriate indentation before the spread operator. -->
<!-- Covered by a variety of sniffs which deal with function calls, function declarations, array declarations. -->

<!-- Covers rule: There should be no spaces between the spread operator and the variable/function call it applies to. -->
<rule ref="Generic.WhiteSpace.SpreadOperatorSpacingAfter"/>

<!-- Covers rule: When combining the spread operator with the reference operator (&), there should be no spaces between them.. -->
<!-- Covered by the Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterReference error code. -->


<!--
#############################################################################
Handbook: Object-Oriented Programming - Only One Object Structure (Class/Interface/Trait) per File.
Expand Down

0 comments on commit 9810968

Please sign in to comment.