mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
parent
513b263d38
commit
fe036d4db0
@ -125,6 +125,10 @@ class ExpressionScanner
|
||||
}
|
||||
}
|
||||
|
||||
if ($node->isFirstClassCallable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($function_id === 'define') {
|
||||
$first_arg_value = isset($node->getArgs()[0]) ? $node->getArgs()[0]->value : null;
|
||||
$second_arg_value = isset($node->getArgs()[1]) ? $node->getArgs()[1]->value : null;
|
||||
|
@ -729,6 +729,12 @@ class ClosureTest extends TestCase
|
||||
[],
|
||||
'8.1'
|
||||
],
|
||||
'FirstClassCallable:array_map' => [
|
||||
'<?php call_user_func(array_map(...), intval(...), ["1"]);',
|
||||
'assertions' => [],
|
||||
[],
|
||||
'8.1',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@ -1171,9 +1177,8 @@ class ClosureTest extends TestCase
|
||||
'error_message' => 'MixedAssignment',
|
||||
[],
|
||||
false,
|
||||
'8.1'
|
||||
'8.1',
|
||||
],
|
||||
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user