1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-12 01:09:38 +01:00

consistency

This commit is contained in:
orklah 2021-09-17 22:42:17 +02:00
parent ee4dbafca9
commit e0b2cb5028

View File

@ -1719,7 +1719,7 @@ class AssertionFinder
protected static function hasCallableCheck(PhpParser\Node\Expr\FuncCall $stmt): bool
{
return $stmt->name instanceof PhpParser\Node\Name && $stmt->name->parts === ['is_callable'];
return $stmt->name instanceof PhpParser\Node\Name && strtolower($stmt->name->parts[0]) === 'is_callable';
}
/**
@ -1787,7 +1787,7 @@ class AssertionFinder
protected static function hasInArrayCheck(PhpParser\Node\Expr\FuncCall $stmt): bool
{
if ($stmt->name instanceof PhpParser\Node\Name
&& $stmt->name->parts === ['in_array']
&& strtolower($stmt->name->parts[0]) === 'in_array'
&& isset($stmt->args[2])
) {
$second_arg = $stmt->args[2]->value;
@ -1804,12 +1804,12 @@ class AssertionFinder
protected static function hasNonEmptyCountCheck(PhpParser\Node\Expr\FuncCall $stmt): bool
{
return $stmt->name instanceof PhpParser\Node\Name && $stmt->name->parts === ['count'];
return $stmt->name instanceof PhpParser\Node\Name && strtolower($stmt->name->parts[0]) === 'count';
}
protected static function hasArrayKeyExistsCheck(PhpParser\Node\Expr\FuncCall $stmt): bool
{
return $stmt->name instanceof PhpParser\Node\Name && $stmt->name->parts === ['array_key_exists'];
return $stmt->name instanceof PhpParser\Node\Name && strtolower($stmt->name->parts[0]) === 'array_key_exists';
}
/**