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

Request #17682 Generic Sniff VersionControl does not support mime-type
Submitted: 2010-08-10 11:58 UTC
From: cybot Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.2)
PHP Version: 5.3.3 OS: n/a
Roadmaps: (Not assigned)    
Subscription  


 [2010-08-10 11:58 UTC] cybot (Sebastian Mendel)
Description: ------------ i cannot ignore svn properties the generic sniff VersionControl does not support svn:mime-type or similar properties which can have different values on different files i can only add properties which must exists with the exact value or i do not the properties so it fails with "unexpected" please handle the case protected $properties = array( 'svn:mime-type' => true, ); so sniffer will only check for existence but does not compare the value i know that i have to extend the generic sniff class to handle my cases, but the case with mime-type or similar properties that should only checked for existence and not by value should be added to the generic sniff class ------- } + if ($this->properties[$key] === true) { + continue; + } + if ($properties[$key] !== $this->properties[$key]) { ------- Test script: --------------- phpcs example.php Expected result: ---------------- [no sniff errors] Actual result: -------------- Unexpected Subversion property "svn:mime-type" = "text/plain"

Comments

 [2010-08-20 09:27 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. I have implemented this feature, but I have used the value NULL to indicate a value is not required, instead of TRUE. It just fits a bit better with the default values used throughout PHPCS.