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

Merge pull request #8400 from staabm/truthy

added truthy-string alias for non-falsy-string
This commit is contained in:
orklah 2022-08-11 17:35:58 +02:00 committed by GitHub
commit 28f22c7b57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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',
[