From 4d3ecd79cbff89fc7978dc3520d0eca560d45503 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 28 Mar 2023 13:11:10 +0100 Subject: [PATCH] Improve types for range() --- dictionaries/CallMap.php | 2 +- dictionaries/CallMap_historical.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 5ce9b2076..0394260fb 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -9625,7 +9625,7 @@ return [ 'rand\'1' => ['int'], 'random_bytes' => ['non-empty-string', 'length'=>'positive-int'], 'random_int' => ['int', 'min'=>'int', 'max'=>'int'], -'range' => ['array', 'start'=>'mixed', 'end'=>'mixed', 'step='=>'int|float'], +'range' => ['non-empty-array', 'start'=>'string|int|float', 'end'=>'string|int|float', 'step='=>'int<1, max>|float'], 'RangeException::__clone' => ['void'], 'RangeException::__construct' => ['void', 'message='=>'string', 'code='=>'int', 'previous='=>'?Throwable'], 'RangeException::__toString' => ['string'], diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index 075c0a161..3061ab4e6 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -13731,7 +13731,7 @@ return [ 'rand\'1' => ['int'], 'random_bytes' => ['non-empty-string', 'length'=>'positive-int'], 'random_int' => ['int', 'min'=>'int', 'max'=>'int'], - 'range' => ['array', 'start'=>'mixed', 'end'=>'mixed', 'step='=>'int|float'], + 'range' => ['non-empty-array', 'start'=>'string|int|float', 'end'=>'string|int|float', 'step='=>'int<1, max>|float'], 'rar_allow_broken_set' => ['bool', 'rarfile'=>'RarArchive', 'allow_broken'=>'bool'], 'rar_broken_is' => ['bool', 'rarfile'=>'rararchive'], 'rar_close' => ['bool', 'rarfile'=>'rararchive'],