From fd9a48861cfbed80fa8a3531752bd40c92fc091c Mon Sep 17 00:00:00 2001 From: mind-bending-forks <34678740+mind-bending-forks@users.noreply.github.com> Date: Fri, 14 May 2021 11:09:09 +0100 Subject: [PATCH 1/2] functionMap: Be strict about possible fgetcsv return types --- resources/functionMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functionMap.php b/resources/functionMap.php index 0505955d66..aa5848b91c 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -2937,7 +2937,7 @@ 'ffmpeg_movie::hasAudio' => ['bool'], 'ffmpeg_movie::hasVideo' => ['bool'], 'fgetc' => ['string|false', 'fp'=>'resource'], -'fgetcsv' => ['(?array)|(?false)', 'fp'=>'resource', 'length='=>'int', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'], +'fgetcsv' => ['non-empty-array|array{null}|false|null', 'fp'=>'resource', 'length='=>'int', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'], 'fgets' => ['string|false', 'fp'=>'resource', 'length='=>'int'], 'fgetss' => ['string|false', 'fp'=>'resource', 'length='=>'int', 'allowable_tags='=>'string'], 'file' => ['array|false', 'filename'=>'string', 'flags='=>'int', 'context='=>'resource'], From 7e0a6a8499b98846cf551184107705574214497b Mon Sep 17 00:00:00 2001 From: mind-bending-forks <34678740+mind-bending-forks@users.noreply.github.com> Date: Fri, 14 May 2021 11:09:27 +0100 Subject: [PATCH 2/2] functionMap: Be strict about possible str_getcsv return types --- resources/functionMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functionMap.php b/resources/functionMap.php index aa5848b91c..df49869a76 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -11689,7 +11689,7 @@ 'stomp_version' => ['string'], 'StompException::getDetails' => ['string'], 'StompFrame::__construct' => ['void', 'command='=>'string', 'headers='=>'array', 'body='=>'string'], -'str_getcsv' => ['array', 'input'=>'string', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'], +'str_getcsv' => ['non-empty-array|array{null}', 'input'=>'string', 'delimiter='=>'string', 'enclosure='=>'string', 'escape='=>'string'], 'str_ireplace' => ['string|string[]', 'search'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', '&w_replace_count='=>'int'], 'str_pad' => ['string', 'input'=>'string', 'pad_length'=>'int', 'pad_string='=>'string', 'pad_type='=>'int'], 'str_repeat' => ['string', 'input'=>'string', 'multiplier'=>'int'],