1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Remove false if length is positive int

This commit is contained in:
Vincent Langlet 2021-08-17 11:33:37 +02:00
parent 786d926d78
commit 1cdad83630
4 changed files with 6 additions and 6 deletions

View File

@ -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<string>', 'pattern'=>'string', 'string'=>'string', 'limit='=>'int'],
'mb_str_split' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'int', 'encoding='=>'string|null'],
'mb_str_split' => ['non-empty-list<string>', '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<string>|false', 'string'=>'string', 'length='=>'int'],
'str_split' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'positive-int'],
'str_starts_with' => ['bool', 'haystack'=>'string', 'needle'=>'string'],
'str_word_count' => ['array<int, string>|int', 'string'=>'string', 'format='=>'int', 'characters='=>'string'],
'strcasecmp' => ['int', 'string1'=>'string', 'string2'=>'string'],

View File

@ -17,7 +17,7 @@
return [
'added' => [
'ReflectionProperty::getType' => ['?ReflectionType'],
'mb_str_split' => ['non-empty-list<string>|false', 'string'=>'string', 'length='=>'int', 'encoding='=>'string'],
'mb_str_split' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'],
],
'changed' => [
'gzread' => [

View File

@ -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<string>|false', 'string'=>'string', 'length='=>'int', 'encoding='=>'string'],
'new' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'int', 'encoding='=>'string|null'],
'old' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string'],
'new' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'positive-int', 'encoding='=>'string|null'],
],
'mb_strcut' => [
'old' => ['string', 'string'=>'string', 'start'=>'int', 'length='=>'?int', 'encoding='=>'string'],

View File

@ -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<string>|false', 'string'=>'string', 'length='=>'int'],
'str_split' => ['non-empty-list<string>', 'string'=>'string', 'length='=>'positive-int'],
'str_word_count' => ['array<int, string>|int', 'string'=>'string', 'format='=>'int', 'characters='=>'string'],
'strcasecmp' => ['int', 'string1'=>'string', 'string2'=>'string'],
'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string|int', 'before_needle='=>'bool'],