1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

added truthy-string alias for non-falsy-string

This commit is contained in:
Markus Staab 2022-08-11 16:48:29 +02:00
parent aae539560b
commit 8f6e16add6
2 changed files with 8 additions and 0 deletions

View File

@ -210,6 +210,7 @@ abstract class Atomic implements TypeNode
case 'non-empty-string':
return new TNonEmptyString();
case 'truthy-string':
case 'non-falsy-string':
return new TNonFalsyString();

View File

@ -717,6 +717,13 @@ class TypeCombinationTest extends TestCase
'non-empty-string'
]
],
'combineTruthyStringAndNonEmptyString' => [
'non-empty-string',
[
'truthy-string',
'non-empty-string'
]
],
'combineNonFalsyNonEmptyString' => [
'non-empty-string',
[