Skip to content

Files

Latest commit

 

History

History
13 lines (7 loc) · 520 Bytes

WordPress.CodeAnalysis.AssignmentInCondition.md

File metadata and controls

13 lines (7 loc) · 520 Bytes

Pattern: Use of assignment in condition

Issue: -

Description

Detects variable assignments being made within conditions. This is a typical code smell and more often than not a comparison was intended.

Note: this rule does not detect variable assignments in ternaries without parentheses!

Further Reading