From 786d926d780427ea760ed16084660e21300c7b78 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Tue, 17 Aug 2021 11:03:54 +0200 Subject: [PATCH 1/3] str split return non empty --- dictionaries/CallMap.php | 4 ++-- dictionaries/CallMap_74_delta.php | 4 ++-- dictionaries/CallMap_80_delta.php | 4 ++-- dictionaries/CallMap_historical.php | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index 3b24486c9..e96fa520f 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -7283,7 +7283,7 @@ return [ 'mb_scrub' => ['string', 'string'=>'string', 'encoding='=>'string|null'], 'mb_send_mail' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string|array', 'additional_params='=>'string|null'], 'mb_split' => ['list', 'pattern'=>'string', 'string'=>'string', 'limit='=>'int'], -'mb_str_split' => ['list', 'string'=>'string', 'length='=>'int', 'encoding='=>'string|null'], +'mb_str_split' => ['non-empty-list', 'string'=>'string', 'length='=>'int', 'encoding='=>'string|null'], 'mb_strcut' => ['string', 'string'=>'string', 'start'=>'int', 'length='=>'?int', 'encoding='=>'string|null'], 'mb_strimwidth' => ['string', 'string'=>'string', 'start'=>'int', 'width'=>'int', 'trim_marker='=>'string', 'encoding='=>'string|null'], 'mb_stripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'encoding='=>'string|null'], @@ -13734,7 +13734,7 @@ return [ 'str_replace' => ['string|string[]', 'search'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', '&w_count='=>'int'], 'str_rot13' => ['string', 'string'=>'string'], 'str_shuffle' => ['string', 'string'=>'string'], -'str_split' => ['list|false', 'string'=>'string', 'length='=>'int'], +'str_split' => ['non-empty-list|false', 'string'=>'string', 'length='=>'int'], 'str_starts_with' => ['bool', 'haystack'=>'string', 'needle'=>'string'], 'str_word_count' => ['array|int', 'string'=>'string', 'format='=>'int', 'characters='=>'string'], 'strcasecmp' => ['int', 'string1'=>'string', 'string2'=>'string'], diff --git a/dictionaries/CallMap_74_delta.php b/dictionaries/CallMap_74_delta.php index 31614800c..4eea8b8a1 100644 --- a/dictionaries/CallMap_74_delta.php +++ b/dictionaries/CallMap_74_delta.php @@ -7,7 +7,7 @@ * The 'added' section contains function/method names from FunctionSignatureMap (And alternates, if applicable) that do not exist in php 7.3 * The 'removed' section contains the signatures that were removed in php 7.4. * The 'changed' section contains functions for which the signature has changed for php 7.4. - * Each function in the 'changed' section has an 'old' and a 'new' section, + * Each function in the 'changed' section has an 'old' and a 'new' section, * representing the function as it was in PHP 7.3 and in PHP 7.4, respectively * * @see CallMap.php @@ -17,7 +17,7 @@ return [ 'added' => [ 'ReflectionProperty::getType' => ['?ReflectionType'], - 'mb_str_split' => ['list|false', 'string'=>'string', 'length='=>'int', 'encoding='=>'string'], + 'mb_str_split' => ['non-empty-list|false', 'string'=>'string', 'length='=>'int', 'encoding='=>'string'], ], 'changed' => [ 'gzread' => [ diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index 6f91b2f55..395070e05 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -818,8 +818,8 @@ return [ 'new' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string|array', 'additional_params='=>'string|null'], ], 'mb_str_split' => [ - 'old' => ['list|false', 'string'=>'string', 'length='=>'int', 'encoding='=>'string'], - 'new' => ['list', 'string'=>'string', 'length='=>'int', 'encoding='=>'string|null'], + 'old' => ['non-empty-list|false', 'string'=>'string', 'length='=>'int', 'encoding='=>'string'], + 'new' => ['non-empty-list', 'string'=>'string', 'length='=>'int', 'encoding='=>'string|null'], ], 'mb_strcut' => [ 'old' => ['string', 'string'=>'string', 'start'=>'int', 'length='=>'?int', 'encoding='=>'string'], diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index 6fc491d35..7ea7f7cd6 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -15111,7 +15111,7 @@ return [ 'str_replace' => ['string|string[]', 'search'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', '&w_count='=>'int'], 'str_rot13' => ['string', 'string'=>'string'], 'str_shuffle' => ['string', 'string'=>'string'], - 'str_split' => ['list|false', 'string'=>'string', 'length='=>'int'], + 'str_split' => ['non-empty-list|false', 'string'=>'string', 'length='=>'int'], 'str_word_count' => ['array|int', 'string'=>'string', 'format='=>'int', 'characters='=>'string'], 'strcasecmp' => ['int', 'string1'=>'string', 'string2'=>'string'], 'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string|int', 'before_needle='=>'bool'], From 1cdad8363081075404dcb078ed70f3923129bb89 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Tue, 17 Aug 2021 11:33:37 +0200 Subject: [PATCH 2/3] Remove false if length is positive int --- dictionaries/CallMap.php | 4 ++-- dictionaries/CallMap_74_delta.php | 2 +- dictionaries/CallMap_80_delta.php | 4 ++-- dictionaries/CallMap_historical.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dictionaries/CallMap.php b/dictionaries/CallMap.php index e96fa520f..a4fb3d98d 100644 --- a/dictionaries/CallMap.php +++ b/dictionaries/CallMap.php @@ -7283,7 +7283,7 @@ return [ 'mb_scrub' => ['string', 'string'=>'string', 'encoding='=>'string|null'], 'mb_send_mail' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string|array', 'additional_params='=>'string|null'], 'mb_split' => ['list', 'pattern'=>'string', 'string'=>'string', 'limit='=>'int'], -'mb_str_split' => ['non-empty-list', 'string'=>'string', 'length='=>'int', 'encoding='=>'string|null'], +'mb_str_split' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string|null'], 'mb_strcut' => ['string', 'string'=>'string', 'start'=>'int', 'length='=>'?int', 'encoding='=>'string|null'], 'mb_strimwidth' => ['string', 'string'=>'string', 'start'=>'int', 'width'=>'int', 'trim_marker='=>'string', 'encoding='=>'string|null'], 'mb_stripos' => ['int|false', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'encoding='=>'string|null'], @@ -13734,7 +13734,7 @@ return [ 'str_replace' => ['string|string[]', 'search'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', '&w_count='=>'int'], 'str_rot13' => ['string', 'string'=>'string'], 'str_shuffle' => ['string', 'string'=>'string'], -'str_split' => ['non-empty-list|false', 'string'=>'string', 'length='=>'int'], +'str_split' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int'], 'str_starts_with' => ['bool', 'haystack'=>'string', 'needle'=>'string'], 'str_word_count' => ['array|int', 'string'=>'string', 'format='=>'int', 'characters='=>'string'], 'strcasecmp' => ['int', 'string1'=>'string', 'string2'=>'string'], diff --git a/dictionaries/CallMap_74_delta.php b/dictionaries/CallMap_74_delta.php index 4eea8b8a1..969e84a01 100644 --- a/dictionaries/CallMap_74_delta.php +++ b/dictionaries/CallMap_74_delta.php @@ -17,7 +17,7 @@ return [ 'added' => [ 'ReflectionProperty::getType' => ['?ReflectionType'], - 'mb_str_split' => ['non-empty-list|false', 'string'=>'string', 'length='=>'int', 'encoding='=>'string'], + 'mb_str_split' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'], ], 'changed' => [ 'gzread' => [ diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index 395070e05..dc7938cc7 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -818,8 +818,8 @@ return [ 'new' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string|array', 'additional_params='=>'string|null'], ], 'mb_str_split' => [ - 'old' => ['non-empty-list|false', 'string'=>'string', 'length='=>'int', 'encoding='=>'string'], - 'new' => ['non-empty-list', 'string'=>'string', 'length='=>'int', 'encoding='=>'string|null'], + 'old' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'], + 'new' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string|null'], ], 'mb_strcut' => [ 'old' => ['string', 'string'=>'string', 'start'=>'int', 'length='=>'?int', 'encoding='=>'string'], diff --git a/dictionaries/CallMap_historical.php b/dictionaries/CallMap_historical.php index 7ea7f7cd6..373f8e3c5 100644 --- a/dictionaries/CallMap_historical.php +++ b/dictionaries/CallMap_historical.php @@ -15111,7 +15111,7 @@ return [ 'str_replace' => ['string|string[]', 'search'=>'string|array', 'replace'=>'string|array', 'subject'=>'string|array', '&w_count='=>'int'], 'str_rot13' => ['string', 'string'=>'string'], 'str_shuffle' => ['string', 'string'=>'string'], - 'str_split' => ['non-empty-list|false', 'string'=>'string', 'length='=>'int'], + 'str_split' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int'], 'str_word_count' => ['array|int', 'string'=>'string', 'format='=>'int', 'characters='=>'string'], 'strcasecmp' => ['int', 'string1'=>'string', 'string2'=>'string'], 'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string|int', 'before_needle='=>'bool'], From 4b84793b2f8a0d877084cead5cd8537c0e108f38 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Tue, 17 Aug 2021 18:45:02 +0200 Subject: [PATCH 3/3] Add false back for mb_str_split --- dictionaries/CallMap_74_delta.php | 2 +- dictionaries/CallMap_80_delta.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dictionaries/CallMap_74_delta.php b/dictionaries/CallMap_74_delta.php index 969e84a01..74d78b25e 100644 --- a/dictionaries/CallMap_74_delta.php +++ b/dictionaries/CallMap_74_delta.php @@ -17,7 +17,7 @@ return [ 'added' => [ 'ReflectionProperty::getType' => ['?ReflectionType'], - 'mb_str_split' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'], + 'mb_str_split' => ['non-empty-list|false', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'], ], 'changed' => [ 'gzread' => [ diff --git a/dictionaries/CallMap_80_delta.php b/dictionaries/CallMap_80_delta.php index dc7938cc7..b28e61252 100644 --- a/dictionaries/CallMap_80_delta.php +++ b/dictionaries/CallMap_80_delta.php @@ -818,7 +818,7 @@ return [ 'new' => ['bool', 'to'=>'string', 'subject'=>'string', 'message'=>'string', 'additional_headers='=>'string|array', 'additional_params='=>'string|null'], ], 'mb_str_split' => [ - 'old' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'], + 'old' => ['non-empty-list|false', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'], 'new' => ['non-empty-list', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string|null'], ], 'mb_strcut' => [