1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Add more coverage for scalar types

This commit is contained in:
Matthew Brown 2016-08-31 13:25:29 -04:00
parent f28485ddad
commit bad1271744
2 changed files with 3 additions and 2 deletions

View File

@ -617,7 +617,7 @@ abstract class FunctionLikeChecker implements StatementsSource
$scalar_type_match_found = true;
}
}
if ($input_type_part->isScalarType()) {
if ($input_type_part->isScalarType() || $input_type_part->isScalar()) {
if ($param_type_part->isScalarType()) {
$scalar_type_match_found = true;
}

View File

@ -488,7 +488,8 @@ abstract class Type
$this->value === 'string' ||
$this->value === 'float' ||
$this->value === 'bool' ||
$this->value === 'false';
$this->value === 'false' ||
$this->value === 'numeric';
}
return false;