mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -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
|
* Initialize debug
|
||||||
*/
|
*/
|
||||||
define('APP_ENV', env('APP_ENV', 'production'));
|
define('APP_ENV', env('APP_ENV', 'production'));
|
||||||
if (APP_ENV === 'local') {
|
if (APP_ENV === 'development') {
|
||||||
define('DBG_USER', true); // forced debug
|
define('DBG_USER', true); // forced debug
|
||||||
} else {
|
} else {
|
||||||
define('DBG_USER', isset($_COOKIE[COOKIE_DBG]));
|
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;
|
$this->whoops = new Run;
|
||||||
|
|
||||||
if (DBG_USER) {
|
if ($this->isDebugEnabled()) {
|
||||||
$this->getWhoopsOnPage();
|
$this->getWhoopsOnPage();
|
||||||
} else {
|
} else {
|
||||||
$this->getWhoopsPlaceholder();
|
$this->getWhoopsPlaceholder();
|
||||||
}
|
}
|
||||||
$this->getWhoopsLogger();
|
$this->getWhoopsLogger();
|
||||||
|
|
||||||
if (APP_ENV !== 'local') {
|
if (!$this->isDevelopmentEnvironment()) {
|
||||||
$this->getTelegramSender();
|
$this->getTelegramSender();
|
||||||
$this->getBugsnag();
|
$this->getBugsnag();
|
||||||
}
|
}
|
||||||
|
@ -416,13 +416,13 @@ class Dev
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if application is in local environment
|
* Check if application is in development environment
|
||||||
*
|
*
|
||||||
* @return bool
|
* @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