diff --git a/common.php b/common.php index 7874fd589..de0a8cab4 100644 --- a/common.php +++ b/common.php @@ -158,7 +158,7 @@ function _e(string $key, mixed $default = null): void * Initialize debug */ define('APP_ENV', env('APP_ENV', 'production')); -if (APP_ENV === 'local') { +if (APP_ENV === 'development') { define('DBG_USER', true); // forced debug } else { define('DBG_USER', isset($_COOKIE[COOKIE_DBG])); diff --git a/src/Dev.php b/src/Dev.php index 40b96cbca..8348c52f6 100644 --- a/src/Dev.php +++ b/src/Dev.php @@ -49,14 +49,14 @@ class Dev { $this->whoops = new Run; - if (DBG_USER) { + if ($this->isDebugEnabled()) { $this->getWhoopsOnPage(); } else { $this->getWhoopsPlaceholder(); } $this->getWhoopsLogger(); - if (APP_ENV !== 'local') { + if (!$this->isDevelopmentEnvironment()) { $this->getTelegramSender(); $this->getBugsnag(); } @@ -416,13 +416,13 @@ class Dev } /** - * Check if application is in local environment + * Check if application is in development environment * * @return bool */ - public function isLocalEnvironment(): bool + public function isDevelopmentEnvironment(): bool { - return APP_ENV === 'local'; + return APP_ENV === 'development'; } /**