remove usage of getenv from codebase (#1861)

This commit is contained in:
Kevin Papst
2020-08-02 01:02:04 +02:00
committed by GitHub
parent 6f8c0e3cb6
commit 476e6ca150
14 changed files with 122 additions and 123 deletions

View File

@@ -29,6 +29,17 @@ use Symfony\Component\Console\Style\SymfonyStyle;
*/
class ResetCommand extends Command
{
/**
* @var string
*/
private $environment;
public function __construct(string $kernelEnvironment)
{
$this->environment = $kernelEnvironment;
parent::__construct();
}
/**
* {@inheritdoc}
*/
@@ -55,7 +66,7 @@ EOT
*/
public function isEnabled()
{
return getenv('APP_ENV') !== 'prod';
return $this->environment !== 'prod';
}
/**