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

Bug #19953 PSR2 - Spaces before interface name for abstract class
Submitted: 2013-05-21 20:40 UTC
From: brian978 Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.4.5)
PHP Version: 5.4.4 OS: Debian
Roadmaps: (Not assigned)    
Subscription  


 [2013-05-21 20:40 UTC] brian978 (Andrei Dincescu)
Description: ------------ When scanning a file containing an abstract or final class that has an implement list on multiple lines, the code sniffer reports an invalid number of spaces. If the class isn't declared as abstract or final the code passes. The issue occurs when using the PSR2 standard. Test script: --------------- namespace Test; abstract class Test implements TestInterface1, TestInterface2 { } Expected result: ---------------- The code should pass without errors. Actual result: -------------- The code fails with the following output: ------------------------------------------------------------------------ -------- FOUND 2 ERROR(S) AFFECTING 2 LINE(S) ------------------------------------------------------------------------ -------- 13 | ERROR | Expected 5 spaces before interface name; 4 found 14 | ERROR | Expected 5 spaces before interface name; 4 found ------------------------------------------------------------------------ --------

Comments

 [2013-05-21 21:01 UTC] brian978 (Andrei Dincescu)
-Summary: PSR2 - Interface spaces for abstract class +Summary: PSR2 - Spaces before interface name for abstract class
 [2013-06-03 05:29 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fix committed to github repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/69d6b341c8c1ee0e0b742d8d4 daef7c9cbf96b73