Skip to content

Files

Latest commit

 

History

History
19 lines (13 loc) · 837 Bytes

WordPress.Arrays.ArrayDeclarationSpacing.md

File metadata and controls

19 lines (13 loc) · 837 Bytes

Pattern: Inconsistent array spacing

Issue: -

Description

Enforces WordPress array spacing format.

  • Check for no space between array keyword and array opener.
  • Check for no space between the parentheses of an empty array.
  • Checks for one space after the array opener / before the array closer in single-line arrays.
  • Checks that associative arrays are multi-line.
  • Checks that each array item in a multi-line array starts on a new line.
  • Checks that the array closer in a multi-line array is on a new line.

Further Reading