diff --git a/src/Service.php b/src/Service.php index 21ded66..a8fb24c 100644 --- a/src/Service.php +++ b/src/Service.php @@ -23,6 +23,8 @@ namespace Box\Mod\Example; +use FOSSBilling\InformationException; + class Service { protected $di; @@ -72,7 +74,7 @@ public function getModulePermissions(): array * * @return bool * - * @throws \Box_Exception + * @throws InformationException */ public function install(): bool { @@ -80,7 +82,7 @@ public function install(): bool $db = $this->di['db']; $db->exec('SELECT NOW()'); - // throw new \Box_Exception("Throw exception to terminate module installation process with a message", array(), 123); + // throw new InformationException("Throw exception to terminate module installation process with a message", array(), 123); return true; } @@ -93,11 +95,11 @@ public function install(): bool * * @return bool * - * @throws \Box_Exception + * @throws InformationException */ public function uninstall(): bool { - // throw new \Box_Exception("Throw exception to terminate module uninstallation process with a message", array(), 124); + // throw new InformationException("Throw exception to terminate module uninstallation process with a message", array(), 124); return true; } @@ -110,11 +112,11 @@ public function uninstall(): bool * * @return bool * - * @throws \Box_Exception + * @throws InformationException */ public function update(array $manifest): bool { - // throw new \Box_Exception("Throw exception to terminate module update process with a message", array(), 125); + // throw new InformationException("Throw exception to terminate module update process with a message", array(), 125); return true; } @@ -173,7 +175,7 @@ public function toApiArray(array $row, string $role = 'guest', bool $deep = true * * @return void * - * @throws \Box_Exception + * @throws InformationException */ public static function onEventClientLoginFailed(\Box_Event $event): void { @@ -223,7 +225,7 @@ public static function onEventClientLoginFailed(\Box_Event $event): void // if client gets funky, we block him if ($meta->meta_value > 30) { - throw new \Box_Exception('You have failed to login too many times. Contact support.'); + throw new InformationException('You have failed to login too many times. Contact support.'); } }