Skip to content

Commit

Permalink
Update string compare return values
Browse files Browse the repository at this point in the history
  • Loading branch information
bytestream committed Jun 13, 2022
1 parent bca6372 commit 80440b5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
16 changes: 8 additions & 8 deletions resources/functionMap.php
Expand Up @@ -11693,10 +11693,10 @@
'str_shuffle' => ['string', 'str'=>'string'],
'str_split' => ['non-empty-array<int,string>|false', 'str'=>'string', 'split_length='=>'positive-int'],
'str_word_count' => ['array<int,string>|int|false', 'string'=>'string', 'format='=>'int', 'charlist='=>'string'],
'strcasecmp' => ['int', 'str1'=>'string', 'str2'=>'string'],
'strcasecmp' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string'],
'strchr' => ['string|false', 'haystack'=>'string', 'needle'=>'string', 'before_needle='=>'bool'],
'strcmp' => ['int', 'str1'=>'string', 'str2'=>'string'],
'strcoll' => ['int', 'str1'=>'string', 'str2'=>'string'],
'strcmp' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string'],
'strcoll' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string'],
'strcspn' => ['int', 'str'=>'string', 'mask'=>'string', 'start='=>'int', 'length='=>'int'],
'stream_bucket_append' => ['void', 'brigade'=>'resource', 'bucket'=>'object'],
'stream_bucket_make_writeable' => ['stdClass|null', 'brigade'=>'resource'],
Expand Down Expand Up @@ -11777,10 +11777,10 @@
'stripslashes' => ['string', 'str'=>'string'],
'stristr' => ['string|false', 'haystack'=>'string', 'needle'=>'mixed', 'before_needle='=>'bool'],
'strlen' => ['0|positive-int', 'string'=>'string'],
'strnatcasecmp' => ['int', 's1'=>'string', 's2'=>'string'],
'strnatcmp' => ['int', 's1'=>'string', 's2'=>'string'],
'strncasecmp' => ['int', 'str1'=>'string', 'str2'=>'string', 'len'=>'int'],
'strncmp' => ['int', 'str1'=>'string', 'str2'=>'string', 'len'=>'int'],
'strnatcasecmp' => ['int<-1, 1>', 's1'=>'string', 's2'=>'string'],
'strnatcmp' => ['int<-1, 1>', 's1'=>'string', 's2'=>'string'],
'strncasecmp' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string', 'len'=>'int'],
'strncmp' => ['int<-1, 1>', 'str1'=>'string', 'str2'=>'string', 'len'=>'int'],
'strpbrk' => ['string|false', 'haystack'=>'string', 'char_list'=>'string'],
'strpos' => ['positive-int|0|false', 'haystack'=>'string', 'needle'=>'string|int', 'offset='=>'int'],
'strptime' => ['array|false', 'datestr'=>'string', 'format'=>'string'],
Expand All @@ -11799,7 +11799,7 @@
'strtr\'1' => ['string', 'str'=>'string', 'replace_pairs'=>'array'],
'strval' => ['string', 'var'=>'mixed'],
'substr' => ['__benevolent<string|false>', 'string'=>'string', 'start'=>'int', 'length='=>'int'],
'substr_compare' => ['int|false', 'main_str'=>'string', 'str'=>'string', 'offset'=>'int', 'length='=>'int', 'case_sensitivity='=>'bool'],
'substr_compare' => ['int<-1, 1>|false', 'main_str'=>'string', 'str'=>'string', 'offset'=>'int', 'length='=>'int', 'case_sensitivity='=>'bool'],
'substr_count' => ['0|positive-int', 'haystack'=>'string', 'needle'=>'string', 'offset='=>'int', 'length='=>'int'],
'substr_replace' => ['string|array', 'str'=>'string|array', 'repl'=>'mixed', 'start'=>'mixed', 'length='=>'mixed'],
'suhosin_encrypt_cookie' => ['string', 'name'=>'string', 'value'=>'string'],
Expand Down
5 changes: 5 additions & 0 deletions tests/PHPStan/Rules/Functions/data/array_udiff.php
Expand Up @@ -32,3 +32,8 @@ static function(int $a, int $b): int {
},
);

array_udiff(
["25","26"],
["26","27"],
'strcasecmp',
);

0 comments on commit 80440b5

Please sign in to comment.