Skip to content
Snippets Groups Projects

Issue #3365770: Single invoke should merge results if multiple implementations for same module

Open Issue #3365770: Single invoke should merge results if multiple implementations for same module
4 files
+ 107
1
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 9
1
@@ -71,7 +71,15 @@ final class HuxModuleHandler implements ModuleHandlerInterface {
$callback = static function (callable $hookInvoker, string $calledModule) use ($module, $args, &$return): void {
if ($module === $calledModule) {
$return = $hookInvoker(...$args);
$result = $hookInvoker(...$args);
if ($result !== NULL) {
if (is_array($return) && is_array($result)) {
$return = NestedArray::mergeDeep($return, $result);
}
else {
$return = $result;
}
}
}
};
$this->invokeHux($hook, $callback);
Loading