diff options
-rw-r--r-- | inc/hook.inc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/hook.inc.php b/inc/hook.inc.php index 05078f72..f74281f1 100644 --- a/inc/hook.inc.php +++ b/inc/hook.inc.php @@ -11,11 +11,12 @@ class Hook * Internally, this scans for "modules/<*>/hooks/$hookName.inc.php" * and optionally checks if the module's dependencies are fulfilled, * then returns a list of all matching modules. + * * @param string $hookName Name of hook to search for. * @param bool $filterBroken if true, modules that have a hook but have missing deps will not be returned * @return \Hook[] list of modules with requested hooks */ - public static function load($hookName, $filterBroken = true) + public static function load(string $hookName, bool $filterBroken = true): array { $retval = array(); foreach (glob('modules/*/hooks/' . $hookName . '.inc.php', GLOB_NOSORT) as $file) { @@ -35,7 +36,7 @@ class Hook * @param bool $filterBroken return false if the module has missing deps * @return Hook|false hook instance, false on error or if module doesn't have given hook */ - public static function loadSingle($moduleName, $hookName, $filterBroken = true) + public static function loadSingle(string $moduleName, string $hookName, bool $filterBroken = true) { if (Module::get($moduleName) === false) // No such module return false; |