Skip to content

use getArg(name, position) over getArgs() when possible on CallLike #9386

@samsonasik

Description

@samsonasik

The CallLike has getArg(name, position) so it can get when it uses named argument match, or by position match.

https://github.com/nikic/PHP-Parser/blob/0da2d6679a3df45d6d720aa2e0d4568f82a32e46/lib/PhpParser/Node/Expr/CallLike.php#L36-L59

see PR

This on specific target argument, can reduce named argument match check, or first class callable, as checked early return null there.

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