Skip to content

Commit 65ff783

Browse files
authored
Add non-zero-int type
1 parent 3179c15 commit 65ff783

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PhpDoc/TypeNodeResolver.php

+6
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ private function resolveIdentifierTypeNode(IdentifierTypeNode $typeNode, NameSco
196196
case 'non-negative-int':
197197
return IntegerRangeType::fromInterval(0, null);
198198

199+
case 'non-zero-int':
200+
return new UnionType([
201+
IntegerRangeType::fromInterval(null, -1),
202+
IntegerRangeType::fromInterval(1, null),
203+
]);
204+
199205
case 'string':
200206
case 'lowercase-string':
201207
return new StringType();

0 commit comments

Comments
 (0)