1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Support pure-Closure annotation

This commit is contained in:
Matt Brown 2020-11-06 00:38:57 -05:00
parent 1c66646e72
commit debedf2c96

View File

@ -826,7 +826,7 @@ class TypeParser
);
$pure = strpos($parse_tree->value, 'pure-') === 0 ? true : null;
if (in_array(strtolower($parse_tree->value), ['closure', '\closure'], true)) {
if (in_array(strtolower($parse_tree->value), ['closure', '\closure', 'pure-closure'], true)) {
return new TClosure('Closure', $params, null, $pure);
}