Skip to content

[Code Quality] Resolver inner closure parameter shadows outer variable named args #366

@s2x

Description

@s2x

Location

src/Resolver.php:22

Problem

An inner closure declares a parameter named $args while the outer scope destructures [$app, $args] already. The inner $args shadows the outer one, making the code easy to misread — a reader has to mentally track which $args is in scope on every line.

What to change

  • Rename either the outer or the inner $args to something distinct (e.g. $runtimeArgs for the outer or $invokeArgs for the inner).
  • No logic change.

Acceptance criteria

  • The two $args symbols no longer share a name in overlapping scopes.
  • Existing tests pass (vendor/bin/phpunit).
  • No behavioural change observable to users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-qualityCode quality improvementsminorMinor priority - code quality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions