Skip validating user defined functions which has similar name as file system function#65
Skip validating user defined functions which has similar name as file system function#65mgalang wants to merge 1 commit intoFloeDesignTechnologies:masterfrom
Conversation
|
I think that this is a valid way of diminishing false positives. But why just limit it to filesystem functions? I can see this one giving false positive too: I'm just assuming you're fixing this one because Side note on php tokens; We should compare using "T_FUNCTION" on |
|
@jmarcil FYI: PHPCSUtils will have an abstract sniff for function call sniffing which takes this and much more (aliased functions in It might be worth considering adding that as a dependency. I expect that abstract will be pulled within the next few weeks. |
Description
The Filesystem function sniff is also detecting and validating user defined functions even if the function is not a PHP native filesystem function.
Proposed fixed: Check if previous token is "function" to check if the function is user defined.
Steps to reproduce:
function delete($myvalue) {}Filesystem function delete() detected with dynamic parameter