1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Allow callable-array type in docblocks

This commit is contained in:
Matthew Brown 2019-10-20 15:33:57 -04:00
parent 4aeb28aceb
commit 1d6ca9bd7d
2 changed files with 4 additions and 0 deletions

View File

@ -85,6 +85,7 @@ abstract class Type
'numeric-string' => true,
'class-string' => true,
'callable-string' => true,
'callable-array' => true,
'trait-string' => true,
'mysql-escaped-string' => true,
'html-escaped-string' => true,

View File

@ -163,6 +163,9 @@ abstract class Atomic
case 'non-empty-array':
return new TNonEmptyArray([new Union([new TMixed]), new Union([new TMixed])]);
case 'callable-array':
return new Type\Atomic\TCallableArray([new Union([new TArrayKey]), new Union([new TMixed])]);
case 'list':
return new TList(Type::getMixed());