Inspectopedia
 
2024.3

Single-statement body with braces

Info
New
Last modified: 03 December 2024

Reports the control structures (such as loops or conditionals) whose bodies are enclosed in braces but only contain a single child statement. Using braces in such cases is not necessary.

See Control structures (php.net) for details.