diff --git a/lib/Skeleton/Error/Handler.php b/lib/Skeleton/Error/Handler.php index 69590e8..da4fd4e 100644 --- a/lib/Skeleton/Error/Handler.php +++ b/lib/Skeleton/Error/Handler.php @@ -194,28 +194,25 @@ public function handle_shutdown() { } /** - * Check if a given path has been silenced + * Check if we have detected a Whoops installation * - * @param string $path * @return bool */ - private function is_silenced($path) { - foreach ($this->silenced_paths as $silenced_path) { - if (preg_match($silenced_path, $path)) { - return true; - } + public function detected_whoops() { + if (class_exists('Whoops\Run')) { + return true; } return false; } /** - * Check if we have detected a Whoops installation + * Check if we have detected a sentry/sentry package * * @return bool */ - private function detected_whoops() { - if (class_exists('Whoops\Run')) { + public function detected_sentry_raven() { + if (class_exists('Raven_Client')) { return true; } @@ -223,12 +220,12 @@ private function detected_whoops() { } /** - * Check if we have detected a sentry/sentry package + * Check if we have detected a sentry/sdk package * * @return bool */ - private function detected_sentry_raven() { - if (class_exists('Raven_Client')) { + public function detected_sentry_sdk() { + if (class_exists('\Sentry\SentrySdk')) { return true; } @@ -236,15 +233,19 @@ private function detected_sentry_raven() { } /** - * Check if we have detected a sentry/sdk package + * Check if a given path has been silenced * + * @param string $path * @return bool */ - private function detected_sentry_sdk() { - if (class_exists('\Sentry\SentrySdk')) { - return true; + private function is_silenced($path) { + foreach ($this->silenced_paths as $silenced_path) { + if (preg_match($silenced_path, $path)) { + return true; + } } return false; } + }