You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The array closing bracket and indentation should line up with the start of the content on the line containing the array opener.
5
+
]]>
6
+
</standard>
7
+
<code_comparison>
8
+
<codetitle="Valid: Closing bracket lined up correctly">
9
+
<![CDATA[
10
+
$args = array(
11
+
'post_id' => 22,
12
+
<em>);</em>
13
+
]]>
14
+
</code>
15
+
<codetitle="Invalid: Closing bracket lined up incorrectly">
16
+
<![CDATA[
17
+
$args = array(
18
+
'post_id' => 22,
19
+
<em>);</em>
20
+
]]>
21
+
</code>
22
+
</code_comparison>
23
+
<standard>
24
+
<![CDATA[
25
+
Keys in each array and nested array should be indented by a 4-space tab for each level of nested array, so that the array visually matches its structure.
26
+
]]>
27
+
</standard>
28
+
<code_comparison>
29
+
<codetitle="Valid: Correctly indented array">
30
+
<![CDATA[
31
+
$args = array(
32
+
'post_id' => 22,
33
+
'comment_count' => array(
34
+
<em>'value' => 25,
35
+
'compare' => '>=',</em>
36
+
),
37
+
);
38
+
]]>
39
+
</code>
40
+
<codetitle="Invalid: Indented incorrectly; harder to read.">
0 commit comments