You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use keyword must be declared in the outermost scope of a file (the global scope) or inside namespace declarations. This is because the importing is done at compile time and not runtime, so it cannot be block scoped. The following example will show an illegal use of the use keyword
doesn't this mean, that we can stop traversing the statements in UseImportsTraverser as soon as we hit a function or class?
(or maybe at leaset it means we need only a linear scan of the top level and no deep traversal).
leaving it here for discussion
The text was updated successfully, but these errors were encountered:
looking at a codeigniter profile, I can see
UseImportsTraverser
to use a considerable amount of timeIn the
UseImportsTraverser
I can see it is usingSimpleCallableNodeTraverser
to deep travers statements.looking at the php-src docs I noted..
doesn't this mean, that we can stop traversing the statements in
UseImportsTraverser
as soon as we hit a function or class?(or maybe at leaset it means we need only a linear scan of the top level and no deep traversal).
leaving it here for discussion
The text was updated successfully, but these errors were encountered: