mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
refactor: Changed local
environment name to development
This commit is contained in:
parent
3ca03db184
commit
acec12b96d
2 changed files with 6 additions and 6 deletions
|
@ -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]));
|
||||
|
|
10
src/Dev.php
10
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';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue