FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=17682&edit=1

ID: 17682
Updated by: gsherwood@squiz.net
Reported By: pear at sebastianmendel dot de
Summary: Generic Sniff VersionControl does not support
mime-type
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: PHP_CodeSniffer
Operating System: n/a
Package Version: 1.2.2
PHP Version: 5.3.3
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-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.


Previous Comments:
------------------------------------------------------------------------

[2010-08-10 07:58:02] cybot

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"

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 20, '10 at 5:27a
activeAug 20, '10 at 5:27a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase