- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
The following does not work:
<rule ref="path/to/my/Custom/Sniff.php"> <properties> <property name="foo" value="bar" /> </properties> </rule>
PHP_CodeSniffer/CodeSniffer.php
Line 1182 in 738a277
$this->ruleset[$code]['properties'][$name] = $values; |
$this->ruleset[$code]['properties']
with $code
being path/to/my/Custom/Sniff.php
, while on actually pushing the properties into the sniffer instance in PHP_CodeSniffer/CodeSniffer.php
Line 1344 in 738a277
if (isset($this->ruleset[$code]['properties']) === true) { |
$code
contains the "short" name Custom.Sniff
, which obviously doesn't match the array structure $this->ruleset
.