Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Request #20129 Sniff to check omission of braces for single line blocks
Submitted: 2013-11-17 08:25 UTC
From: shadyvb Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.4.7)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2013-11-17 08:25 UTC] shadyvb (Shady Sharaf)
Description: ------------ Adopt a generic sniff to check omission of braces for single line blocks. Sniff exists as part of WordPressCodingStandards at https://github.com/WordPress-Coding-Standards/WordPress- Coding- Standards/commit/86ef40429dcdf6b28c51755c42fe8a96f989a396

Comments

 [2013-11-19 02:59 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Feedback -Assigned To: +Assigned To: squiz
See if this sniff already does what you want: https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Ge neric/Sniffs/ControlStructures/InlineControlStructureSniff.php
 [2013-11-19 03:10 UTC] shadyvb (Shady Sharaf)
-Status: Feedback +Status: Closed
(facepalm) Actually yes, it does work as expected! Thanks for pointing it out.