Skip to content

Commit

Permalink
Merge pull request #1770 from WordPress/feature/add-disallow-short-ar…
Browse files Browse the repository at this point in the history
…rays-to-core

Core: Add upstream Generic.Arrays.DisallowShortArraySyntax sniff
  • Loading branch information
dingo-d authored Jul 21, 2019
2 parents 13a8bc1 + fd0a1a2 commit 80e82a2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions WordPress-Core/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@
<rule ref="Generic.ControlStructures.InlineControlStructure"/>


<!--
#############################################################################
Handbook: PHP - Declaring Arrays.
Ref: https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#declaring-arrays
#############################################################################
-->
<!-- Covers rule: Arrays must be declared using long array syntax. -->
<rule ref="Generic.Arrays.DisallowShortArraySyntax"/>


<!--
#############################################################################
Handbook: PHP - Use elseif, not else if.
Expand Down

0 comments on commit 80e82a2

Please sign in to comment.