mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix minor boop
This commit is contained in:
parent
fa2209719b
commit
f2ce83c8e5
@ -806,14 +806,16 @@ class ExpressionChecker
|
||||
) {
|
||||
if ($left_type && !$left_type->isMixed()) {
|
||||
if ($left_type->hasNumericType()) {
|
||||
if ($left_type->isInt() && $right_type->isInt()) {
|
||||
$result_type = Type::getInt();
|
||||
return;
|
||||
}
|
||||
if ($right_type) {
|
||||
if ($left_type->isInt() && $right_type->isInt()) {
|
||||
$result_type = Type::getInt();
|
||||
return;
|
||||
}
|
||||
|
||||
if ($left_type->hasNumericType() && $right_type->hasNumericType()) {
|
||||
$result_type = Type::getFloat();
|
||||
return;
|
||||
if ($left_type->hasNumericType() && $right_type->hasNumericType()) {
|
||||
$result_type = Type::getFloat();
|
||||
return;
|
||||
}
|
||||
}
|
||||
} elseif ($left_type->hasArray()) {
|
||||
if (!$right_type || $right_type->isMixed()) {
|
||||
|
@ -38,7 +38,8 @@ class Atomic extends Type
|
||||
public function toNamespacedString(array $aliased_classes, $this_class)
|
||||
{
|
||||
if ($this->value === $this_class) {
|
||||
return $this_class;
|
||||
$class_parts = explode('\\', $this_class);
|
||||
return array_pop($class_parts);
|
||||
}
|
||||
|
||||
if (isset($aliased_classes[$this->value])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user