Skip to content

FunctionDeclarations::getProperties(): add new "return_by_reference" index key #688

@jrfnl

Description

@jrfnl

Is your feature request related to a problem?

Seems like a quick win - the FunctionDeclarations::getProperties() method already does quite some token walking in the function signature anyway, so why not also keep track of whether a function is declared to return by reference ?

Describe the solution you'd like

The (bool) return_by_reference index to be added to the array returned by the FunctionDeclarations::getProperties() method.
By default, the value should be false, though for the below three examples, the value should be true.

function &byref( $param) {}
$cl = function &( $param) {};
$arrow = fn &( $param) => null;
  • I intend to create a pull request to implement this feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions