1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 12:24:49 +01:00

Remove use of PHP 7.2 function

This commit is contained in:
Matt Brown 2020-11-04 11:02:34 -05:00 committed by Daniil Gentili
parent fe587f61a8
commit 0f022c711d
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
3 changed files with 4 additions and 7 deletions

View File

@ -35,7 +35,7 @@ return [
'ldap_exop_whoami' => ['string', 'link'=>'resource'],
'ldap_parse_exop' => ['bool', 'link'=>'resource', 'result'=>'resource', 'retdata='=>'string', 'retoid='=>'string'],
'mb_chr' => ['string', 'cp'=>'int', 'encoding='=>'string'],
'mb_ord' => ['int', 'str'=>'string', 'enc='=>'string'],
'mb_ord' => ['int|false', 'str'=>'string', 'enc='=>'string'],
'mb_scrub' => ['string', 'str'=>'string', 'enc='=>'string'],
'oci_register_taf_callback' => ['bool', 'connection'=>'resource', 'callback='=>'callable'],
'oci_unregister_taf_callback' => ['bool', 'connection'=>'resource'],

View File

@ -137,11 +137,7 @@ class ArgumentAnalyzer
$gt_count = 0;
foreach ($values as $value) {
/**
* @var int
* @psalm-suppress UnnecessaryVarAnnotation
*/
$ord = \mb_ord($value);
$ord = ord($value);
if ($ord > $prev_ord) {
$gt_count++;

View File

@ -6,6 +6,7 @@ use function explode;
use function implode;
use Psalm\Codebase;
use Psalm\Internal\Analyzer\StatementsAnalyzer;
use Psalm\Internal\Codebase\InternalCallMapHandler;
use Psalm\Internal\Provider\FileStorageProvider;
use Psalm\Internal\Provider\FunctionExistenceProvider;
use Psalm\Internal\Provider\FunctionParamsProvider;
@ -419,7 +420,7 @@ class Functions
}
}
$function_callable = \Psalm\Internal\Codebase\InternalCallMapHandler::getCallableFromCallMapById(
$function_callable = InternalCallMapHandler::getCallableFromCallMapById(
$codebase,
$function_id,
$args ?: [],