Skip to content

Commit

Permalink
Make detected methods public
Browse files Browse the repository at this point in the history
  • Loading branch information
David Vandemaele committed Oct 20, 2020
1 parent 7477e70 commit a5ec01f
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions lib/Skeleton/Error/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,57 +194,58 @@ 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;
}

return false;
}

/**
* 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;
}

return false;
}

/**
* 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;
}

}

0 comments on commit a5ec01f

Please sign in to comment.