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

Bug #19691 SubversionPropertiesSniff fails to find missing properties
Submitted: 2012-11-05 22:14 UTC
From: kwinahradsky Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.4.1)
PHP Version: 5.3.10 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 : 49 - 3 = ?

 [2012-11-05 22:14 UTC] kwinahradsky (Kevin Winahradsky)
Description: ------------ The "$properties += $this->properties;" line in the process function of the Generic_Sniffs_VersionControl_SubversionPropertiesSniff class causes properties you are looking for to be added to the properties that exist. This causes the test for missing properties to fail as the code now thinks the file has all the properties you are looking for it to have when it really doesn't.


 [2012-11-06 09:46 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Feedback -Assigned To: +Assigned To: squiz
I didn't write this one, so I really have no idea why that line is in there. But it doesn't make any sense to me either. I've removed it and pushed a commit: 45846253e9b56f6 If you remove that line, does the sniff work for you?
 [2012-11-06 13:28 UTC] kwinahradsky (Kevin Winahradsky)
Changing it to something like "$allProperties = $properties + $this->properties;" and then iterating over $allProperties in the foreach loop is what seems to be working for me.
 [2012-11-07 02:12 UTC] squiz (Greg Sherwood)
Thanks Kevin. I didn't read the code properly. I committed a new fix: 09d10827982da0
 [2012-12-04 05:02 UTC] squiz (Greg Sherwood)
-Status: Feedback +Status: Closed