-
-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs for WordPress.Arrays.MultipleStatementAlignment
- Loading branch information
1 parent
00c0cea
commit af0ce75
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
WordPress/Docs/Arrays/MultipleStatementAlignmentStandard.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<documentation title="Multiple Statement Alignment"> | ||
<standard> | ||
<![CDATA[ | ||
There should be one space on either side of a double arrow operator used to assign a value to a key. In the case of a block of related assignments, more space may be inserted to promote readability. | ||
]]> | ||
</standard> | ||
<code_comparison> | ||
<code title="Valid: Double arrow operators aligned"> | ||
<![CDATA[ | ||
$args = array( | ||
'cat' <em>=></em> 22, | ||
'year' <em>=></em> $current_year, | ||
'monthnum' <em>=></em> $current_month, | ||
'order' <em>=></em> 'ASC', | ||
); | ||
]]> | ||
</code> | ||
<code title="Invalid: Not aligned; harder to read"> | ||
<![CDATA[ | ||
$args = array( | ||
'cat' <em>=></em> 22, | ||
'year' <em>=></em> $current_year, | ||
'monthnum' <em>=></em> $current_month, | ||
'order' <em>=></em> 'ASC', | ||
); | ||
]]> | ||
</code> | ||
</code_comparison> | ||
</documentation> |