From eb6697f0596b500b401c20a7df2c80e100b1a734 Mon Sep 17 00:00:00 2001 From: Freek van Rijt Date: Fri, 20 Dec 2019 14:08:52 +0100 Subject: [PATCH] Update BugsnagService.php Expose the Bugsnag Client through the BugsnagService --- src/services/BugsnagService.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/services/BugsnagService.php b/src/services/BugsnagService.php index 620016f..f54ee97 100644 --- a/src/services/BugsnagService.php +++ b/src/services/BugsnagService.php @@ -84,13 +84,10 @@ public function breadcrumb ($text = '', $type = Breadcrumb::MANUAL_TYPE, $metaDa $this->bugsnag->leaveBreadcrumb($text, $type, $metaData); } - /* - * @return mixed - */ /** * @param $exception * - * @return bool + * @return bool | void */ public function handleException ($exception) { @@ -101,6 +98,14 @@ public function handleException ($exception) $this->bugsnag->notifyException($exception); } + /** + * @return Client + */ + public function getClient () : Client + { + return $this->bugsnag; + } + public function isEnabled () { return $this->settings->enabled && !empty($this->settings->serverApiKey);