Skip to content
Permalink
Browse files

Fix use of $method_id

  • Loading branch information...
muglug committed Aug 16, 2019
1 parent 4304183 commit d236c2d5f1eef715a19c374459a30d40b6a889f4
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Psalm/Internal/Type/AssertionReconciler.php
@@ -816,11 +816,11 @@ private static function reconcileHasMethod(
foreach ($existing_var_atomic_types as $type) {
if ($type instanceof TNamedObject
&& $codebase->classOrInterfaceExists($type->value)
&& $codebase->methodExists($type->value . '::__toString')
&& $codebase->methodExists($type->value . '::' . $method_id)
) {
$object_types[] = $type;
} elseif ($type instanceof TObject || $type instanceof TMixed) {
$object_types[] = new Atomic\TObjectWithProperties([], ['__toString' => true]);
$object_types[] = new Atomic\TObjectWithProperties([], [$method_id => true]);
$did_remove_type = true;
} elseif ($type instanceof TTemplateParam) {
$object_types[] = $type;

0 comments on commit d236c2d

Please sign in to comment.
You can’t perform that action at this time.