mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Allow pure-Callable type to be annotated
This commit is contained in:
parent
63b74276c6
commit
1825e30752
@ -745,7 +745,10 @@ class ParseTreeCreator
|
||||
break;
|
||||
|
||||
case '(':
|
||||
if (in_array(strtolower($type_token[0]), ['closure', 'callable', '\closure', 'pure-callable'], true)) {
|
||||
if (in_array(
|
||||
$type_token[0],
|
||||
['callable', 'pure-callable', 'Closure', '\Closure', 'pure-Closure'], true
|
||||
)) {
|
||||
$new_leaf = new ParseTree\CallableTree(
|
||||
$type_token[0],
|
||||
$new_parent
|
||||
|
@ -42,6 +42,7 @@ class TypeTokenizer
|
||||
'callable-string' => true,
|
||||
'callable-array' => true,
|
||||
'pure-callable' => true,
|
||||
'pure-Closure' => true,
|
||||
'trait-string' => true,
|
||||
'mysql-escaped-string' => true,
|
||||
'html-escaped-string' => true,
|
||||
|
Loading…
Reference in New Issue
Block a user