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

Merge pull request #6323 from boesing/bugfix/atomic-non-empty-mixed

bugfix: add missing `TNonEmptyMixed` to `Atomic#create`
This commit is contained in:
Bruce Weirdan 2021-08-17 12:26:52 +03:00 committed by GitHub
commit 285fa13d3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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-') {