src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ClassConstFetchAnalyzer.php 1 location
|
@@ 356-367 (lines=12) @@
|
| 353 |
|
$has_mixed_or_object = false; |
| 354 |
|
|
| 355 |
|
if ($lhs_type) { |
| 356 |
|
foreach ($lhs_type->getAtomicTypes() as $lhs_atomic_type) { |
| 357 |
|
if ($lhs_atomic_type instanceof Type\Atomic\TNamedObject) { |
| 358 |
|
$class_string_types[] = new Type\Atomic\TClassString( |
| 359 |
|
$lhs_atomic_type->value, |
| 360 |
|
clone $lhs_atomic_type |
| 361 |
|
); |
| 362 |
|
} elseif ($lhs_atomic_type instanceof Type\Atomic\TObject |
| 363 |
|
|| $lhs_atomic_type instanceof Type\Atomic\TMixed |
| 364 |
|
) { |
| 365 |
|
$has_mixed_or_object = true; |
| 366 |
|
} |
| 367 |
|
} |
| 368 |
|
} |
| 369 |
|
|
| 370 |
|
if ($has_mixed_or_object) { |
src/Psalm/Internal/Type/TypeCombination.php 1 location
|
@@ 529-535 (lines=7) @@
|
| 526 |
|
$codebase |
| 527 |
|
); |
| 528 |
|
|
| 529 |
|
foreach ($object_type->getAtomicTypes() as $object_atomic_type) { |
| 530 |
|
if ($object_atomic_type instanceof TNamedObject) { |
| 531 |
|
$new_types[] = new TClassString($object_atomic_type->value, $object_atomic_type); |
| 532 |
|
} elseif ($object_atomic_type instanceof TObject) { |
| 533 |
|
$new_types[] = new TClassString(); |
| 534 |
|
} |
| 535 |
|
} |
| 536 |
|
} |
| 537 |
|
} |
| 538 |
|
|