From 6a5857ea5f1de73d042e389ae0f1a827ec414e6a Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 29 Mar 2023 21:31:25 +0200 Subject: Simplify extension method (#5234) One parameter was not used Furthermore, that unused parameter was preventing simpler calls (i.e. without a dedicated extension class). Now it is possible to register a call back with a lamda: ```php Minz_ExtensionManager::addHook('feed_before_actualize', function () { // Hello }); ``` --- lib/Minz/Extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Minz/Extension.php') diff --git a/lib/Minz/Extension.php b/lib/Minz/Extension.php index a280676c1..d1dabe8d5 100644 --- a/lib/Minz/Extension.php +++ b/lib/Minz/Extension.php @@ -195,7 +195,7 @@ abstract class Minz_Extension { * @param callable-string|array $hook_function the function name to call (must be callable). */ public function registerHook($hook_name, $hook_function) { - Minz_ExtensionManager::addHook($hook_name, $hook_function, $this); + Minz_ExtensionManager::addHook($hook_name, $hook_function); } /** -- cgit v1.2.3