Created
October 21, 2019 22:48
-
-
Save dasl-/26a33adee63ab8af6ce3dfdb01476309 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- from_file | |
+++ untitled 1 | |
@@ -341,6 +341,7 @@ | |
public static function loadMethodPlugins(CodeBase $code_base) : void | |
{ | |
$plugin_set = ConfigPluginSet::instance(); | |
+ $codebase_method_set = $code_base->getMethodSet(); | |
foreach ($plugin_set->getReturnTypeOverrides($code_base) as $fqsen_string => $closure) { | |
try { | |
if (\stripos($fqsen_string, '::') !== false) { | |
@@ -353,6 +354,11 @@ | |
if ($code_base->hasMethodWithFQSEN($fqsen)) { | |
$method = $code_base->getMethodByFQSEN($fqsen); | |
$method->setDependentReturnTypeClosure($closure); | |
+ foreach ($codebase_method_set as $codebase_method) { | |
+ if ($codebase_method->getDefiningFQSEN()->__toString() === $fqsen_string) { | |
+ $codebase_method->setDependentReturnTypeClosure($closure); | |
+ } | |
+ } | |
} | |
} | |
} else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment