refactor: Changed local environment name to development

This commit is contained in:
Roman Kelesidis 2025-06-21 10:13:31 +03:00
commit acec12b96d
No known key found for this signature in database
GPG key ID: D8157C4D4C4C6DB4
2 changed files with 6 additions and 6 deletions

View file

@ -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]));

View file

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