Skip to content

Files

Latest commit

 

History

History
18 lines (12 loc) · 627 Bytes

WordPress.Arrays.CommaAfterArrayItem.md

File metadata and controls

18 lines (12 loc) · 627 Bytes

Pattern: Malformed , after array item

Issue: -

Description

Enforces a comma after each array item and the spacing around it.

Rules:

  • For multi-line arrays, a comma is needed after each array item.
  • Same for single-line arrays, but no comma is allowed after the last array item.
  • There should be no space between the comma and the end of the array item.
  • There should be exactly one space between the comma and the start of the next array item for single-line items.

Further Reading