diff options
Diffstat (limited to 'lib/private/legacy/OC_Hook.php')
-rw-r--r-- | lib/private/legacy/OC_Hook.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php index b98424711dd..fe08266fe5b 100644 --- a/lib/private/legacy/OC_Hook.php +++ b/lib/private/legacy/OC_Hook.php @@ -54,12 +54,12 @@ class OC_Hook { static public function connect($signalClass, $signalName, $slotClass, $slotName) { // If we're trying to connect to an emitting class that isn't // yet registered, register it - if(!array_key_exists($signalClass, self::$registered)) { + if (!array_key_exists($signalClass, self::$registered)) { self::$registered[$signalClass] = []; } // If we're trying to connect to an emitting method that isn't // yet registered, register it with the emitting class - if(!array_key_exists($signalName, self::$registered[$signalClass])) { + if (!array_key_exists($signalName, self::$registered[$signalClass])) { self::$registered[$signalClass][$signalName] = []; } @@ -95,27 +95,27 @@ class OC_Hook { // Return false if no hook handlers are listening to this // emitting class - if(!array_key_exists($signalClass, self::$registered)) { + if (!array_key_exists($signalClass, self::$registered)) { return false; } // Return false if no hook handlers are listening to this // emitting method - if(!array_key_exists($signalName, self::$registered[$signalClass])) { + if (!array_key_exists($signalName, self::$registered[$signalClass])) { return false; } // Call all slots - foreach(self::$registered[$signalClass][$signalName] as $i) { + foreach (self::$registered[$signalClass][$signalName] as $i) { try { call_user_func([ $i["class"], $i["name"] ], $params); - } catch (Exception $e){ + } catch (Exception $e) { self::$thrownExceptions[] = $e; \OC::$server->getLogger()->logException($e); - if($e instanceof \OC\HintException) { + if ($e instanceof \OC\HintException) { throw $e; } - if($e instanceof \OC\ServerNotAvailableException) { + if ($e instanceof \OC\ServerNotAvailableException) { throw $e; } } @@ -133,10 +133,10 @@ class OC_Hook { if ($signalClass) { if ($signalName) { self::$registered[$signalClass][$signalName]=[]; - }else{ + } else { self::$registered[$signalClass]=[]; } - }else{ + } else { self::$registered=[]; } } |