Skip to content

Commit 6f91a66

Browse files
committed
Apply changes suggested during code review
1 parent 0f44513 commit 6f91a66

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

WordPress/Docs/CodeAnalysis/AssignmentInTernaryConditionStandard.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<?xml version="1.0"?>
22
<documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
3+
xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
44
title="Assignment In Ternary Condition"
55
>
66
<standard>
77
<![CDATA[
8-
Variables should not be assigned in conditional statement of ternary.
9-
Condition must be in parentheses to be checked; ternaries lacking parentheses around condition are skipped.
8+
Variables should not be assigned in the condition of a ternary expression.
9+
The condition must be in parentheses to be checked; ternaries lacking parentheses around the condition are skipped.
1010
]]>
1111
</standard>
1212
<code_comparison>
1313
<code title="Valid: Conditional statement in parentheses and does not include variable assignment.">
1414
<![CDATA[
15-
$mode = ( $a <em>==</em> 'a' ) ? 'b' : 'c';
15+
$mode = ( $a <em>===</em> 'a' ) ? 'b' : 'c';
1616
]]>
1717
</code>
1818
<code title="Invalid: Conditional statement in parentheses but includes variable assignment instead of comparison.">
1919
<![CDATA[
20-
$mode = ( $a <em>=</em> 'a' ) ? 'b' : 'c';
20+
$mode = ( $a <em>=</em> 'a' ) ? 'b' : 'c';
2121
]]>
2222
</code>
2323
</code_comparison>

0 commit comments

Comments
 (0)