Skip to content

Commit

Permalink
Fix #4111 - ensure Closure::__invoke doesn’t break things
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Sep 3, 2020
1 parent bd27e8b commit a4d6a84
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Psalm/Internal/Type/Comparator/CallableTypeComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ public static function getCallableFromAtomic(
// do nothing
}
}
} elseif ($input_type_part instanceof TNamedObject
&& $input_type_part->value === 'Closure'
) {
return new TCallable();
} elseif ($input_type_part instanceof TNamedObject
&& $codebase->classExists($input_type_part->value)
) {
Expand Down

0 comments on commit a4d6a84

Please sign in to comment.