Skip to content

Commit

Permalink
Fix vimeo#4111 - ensure Closure::__invoke doesn’t break things
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug authored and danog committed Jan 29, 2021
1 parent e3d7d03 commit 5ad69e4
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 5ad69e4

Please sign in to comment.