Closed treestonemedia closed 5 years ago
Hello @treestonemedia. Thanks for pointing that out. Looks like CodeSniffer is not a good choice for this particular rule because it cannot analyse class dependencies. We will consider options for removing this rule in future Unified Magento Coding Standard releases and using another more appropriate tool for this check.
Closing this issue because this repo now contains sniffs for Magento 1.x code only. Please refer to magento/magento-coding-standard for Magento 2.x coding standard.
This rule was removed in magento/magento-coding-standard in order to eliminate false-positive findings.
Here is my
di.xml
And here is my method
public function afterGetAvailableMethods($subject, $result)
The
$subject
variable is getting passed in by Magento'sMethodList
When I run the code sniffer, I get a warning
The method parameter $subject is never used
I know, I can just assign a dummy usage to that method to pass the test - but i'd rather if the sniffer can pick these up on it's own. Looking on SO, there are plenty of people reporting the same issue but none provide a solution that actually works.