Skip to content

sitePassByRefFunctions Doesn't support functions with namespaces #349

Closed
@mikeybinns

Description

@mikeybinns

Currently the sniff customisation property for sitePassByRefFunctions only supports standard functions, not namespaced functions.

It will work if the namespace is omitted, but if two namespaces contain the same function name, it will apply to both.

This works:

<property name="sitePassByRefFunctions" value="function_name:1"/>

but applies to all of these:

\Some\Namespace\function_name($test);
function_name($test);
\Some\Other\Namespace\function_name($test);

This doesn't work:

<property name="sitePassByRefFunctions" value="\Some\Namespace\function_name:1"/>

It would be great if namespaces were supported so we could be more specific about the functions :)

function_name($test); // Undefined var $test
\Some\Other\Namespace\function_name($test); // Undefined var $test
\Some\Namespace\function_name($test); // No error
function_name($test); // No error (defined in `\Some\Namespace\function_name()`)
\Some\Other\Namespace\function_name($test); // No error (defined in `\Some\Namespace\function_name()`)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions