Skip to content

Files

Latest commit

 

History

History
13 lines (7 loc) · 497 Bytes

Universal.Operators.DisallowShortTernary.md

File metadata and controls

13 lines (7 loc) · 497 Bytes

Pattern: Use of short ternary

Issue: -

Description

Disallows the use of short ternaries ?:.

While short ternaries are useful when used correctly, the principle of them is often misunderstood and they are more often than not used incorrectly, leading to hard to debug issues and/or PHP warnings/notices.

Further Reading