Skip to content

Commit

Permalink
Update Application.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 25, 2019
1 parent 3bbd2ef commit 92102ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Illuminate/Foundation/Application.php
Expand Up @@ -132,11 +132,11 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
protected $environmentFile = '.env';

/**
* If the application is running in the console.
* Indicates if the application is running in the console.
*
* @var bool|null
*/
protected $runningInConsole;
protected $isRunningInConsole;

/**
* The application namespace.
Expand Down Expand Up @@ -558,11 +558,11 @@ public function detectEnvironment(Closure $callback)
*/
public function runningInConsole()
{
if ($this->runningInConsole === null) {
$this->runningInConsole = Env::get('APP_RUNNING_IN_CONSOLE') ?? (\PHP_SAPI === 'cli' || \PHP_SAPI === 'phpdbg');
if ($this->isRunningInConsole === null) {
$this->isRunningInConsole = Env::get('APP_RUNNING_IN_CONSOLE') ?? (\PHP_SAPI === 'cli' || \PHP_SAPI === 'phpdbg');
}

return $this->runningInConsole;
return $this->isRunningInConsole;
}

/**
Expand Down

0 comments on commit 92102ac

Please sign in to comment.