for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Lanin\Laravel\SetupWizard\Support\Bootstrap;
use Dotenv;
use Illuminate\Contracts\Foundation\Application;
use InvalidArgumentException;
class DetectEnvironment
{
/**
* Bootstrap the given application.
*
* @param \Illuminate\Contracts\Foundation\Application $app
* @return void
*/
public function bootstrap(Application $app)
try
Dotenv::makeMutable();
Dotenv::load($app->environmentPath(), $app->environmentFile());
environmentPath()
Illuminate\Contracts\Foundation\Application
environment()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
environmentFile()
Dotenv::makeImmutable();
} catch (InvalidArgumentException $e)
//
}
$app->detectEnvironment(
detectEnvironment()
function ()
return env('APP_ENV', 'production');
);
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.