From 3e2988676ecf42b5d84d18e46fecc6fce12069e0 Mon Sep 17 00:00:00 2001 From: Daniel Badura Date: Thu, 17 Sep 2020 14:31:31 +0200 Subject: [PATCH] add random_int as stub, returns positive-int if min is positive-int (#4199) --- src/Psalm/Internal/Stubs/CoreGenericFunctions.phpstub | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Psalm/Internal/Stubs/CoreGenericFunctions.phpstub b/src/Psalm/Internal/Stubs/CoreGenericFunctions.phpstub index ebb7c88b870..6381c7cef7d 100644 --- a/src/Psalm/Internal/Stubs/CoreGenericFunctions.phpstub +++ b/src/Psalm/Internal/Stubs/CoreGenericFunctions.phpstub @@ -731,3 +731,8 @@ function strval ($var): string {} function str_getcsv(string $input, string $delimiter = ',', string $enclosure = '"', string $escape = '\\\\') { } + +/** + * @return ($min is positive-int ? positive-int : int) + */ +function random_int(int $min, int $max): int {}