diff --git a/src/Psalm/Type/Atomic.php b/src/Psalm/Type/Atomic.php index b0d456b65dd..ff0868a23b5 100644 --- a/src/Psalm/Type/Atomic.php +++ b/src/Psalm/Type/Atomic.php @@ -229,6 +229,15 @@ public static function create( case 'positive-int': return new TPositiveInt(); + + case 'non-positive-int': + return new TIntRange(null, 0); + + case 'negative-int': + return new TIntRange(null, -1); + + case 'non-negative-int': + return new TIntRange(0, null); case 'numeric': return $php_version !== null ? new TNamedObject($value) : new TNumeric();