Skip to content

FirstClassCallableRector should also change simple function names #8670

@flack

Description

@flack

Feature Request

Currently, FirstClassCallableRector will transform this code:

-$result = array_map([$this, 'removeWhitespace'], $input);
+$result = array_map($this->removeWhitespace(...), $input);

It would be great if it could also transform this:

-$result = array_map('trim', $input);
+$result = array_map(trim(...), $input);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions