We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1548055 commit c71bcd8Copy full SHA for c71bcd8
1 file changed
src/Generator/TypeDescriber.php
@@ -373,6 +373,10 @@ public function getImportsFromFile(string $phpFile): array
373
if (is_array($token) && $token[0] === T_USE) {
374
$import = null;
375
$i += 2;
376
+ // if `use (...)` with anonumous function
377
+ if (!is_array($tokens[$i]) && $tokens[$i] === '(') {
378
+ continue;
379
+ }
380
while (is_array($tokens[$i]) && in_array($tokens[$i][0], $allowed_tokens)) {
381
if ($tokens[$i][0] !== T_WHITESPACE) {
382
$import .= defined('T_NAME_FULLY_QUALIFIED') && $tokens[$i][0] === T_NAME_FULLY_QUALIFIED
0 commit comments