Skip to content

ContextFactory wrongly detect use statement #191

Closed
@maMykola

Description

@maMykola

The ContextFactory::createForNamespace() wrongly detect use statements for class, f.e. if I have closure with use statement it's detected as a use statement for trait, but shouldn't:

trait MyTrait
{
    protected function check(array $data): void
    {
        $key = 'test';

        array_walk($data, function (&$item) use ($key) {
            // modify $item
        });
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions