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

Request #19843 Add parameter to Squiz.WhiteSpace.FunctionSpacing sniff
Submitted: 2013-03-06 22:58 UTC
From: aik099 Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.4.4)
PHP Version: 5.4.6 OS: Linux
Roadmaps: (Not assigned)    
Comments Add Comment Add patch

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 8 + 26 = ?

 [2013-03-06 22:58 UTC] aik099 (Alexander Obuhovich)
Description: ------------ Right now "Squiz.WhiteSpace.FunctionSpacing" sniff expects 2 blank lines between 2 functions. This might be good on it's own, but in our project we need 1 line spacing. I'm proposing to add "functionSpacing" parameter to a sniff (2 by default for backwards compatibility).


 [2013-03-26 04:21 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
I've committed a new setting to the github repo: 704f6ca5d787d525 You can include the sniff in your ruleset, and override the spacing setting, like this: <rule ref="Squiz.WhiteSpace.FunctionSpacing"> <properties> <property name="spacing" value="1"/> </properties> </rule> Let me know if you have any problems.