1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 18:48:03 +01:00

bugfix: add missing TNonEmptyMixed to Atomic#create

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
Maximilian Bösing 2021-08-17 10:46:45 +02:00
parent b343ae5b5a
commit cb244d5c1e
No known key found for this signature in database
GPG Key ID: 9A8988C93CEC81A3

View File

@ -34,6 +34,7 @@ use Psalm\Type\Atomic\TNamedObject;
use Psalm\Type\Atomic\TNever;
use Psalm\Type\Atomic\TNonEmptyArray;
use Psalm\Type\Atomic\TNonEmptyList;
use Psalm\Type\Atomic\TNonEmptyMixed;
use Psalm\Type\Atomic\TNonEmptyScalar;
use Psalm\Type\Atomic\TNull;
use Psalm\Type\Atomic\TNumeric;
@ -283,6 +284,9 @@ abstract class Atomic implements TypeNode
case 'empty-scalar':
return new TEmptyScalar;
case 'non-empty-mixed':
return new TNonEmptyMixed();
}
if (strpos($value, '-') && substr($value, 0, 4) !== 'OCI-') {