mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-08-26 21:30:18 +02:00
removed unnecessary checks in Config
This commit is contained in:
parent
eaccc0dab8
commit
6ecaf41336
@ -170,20 +170,17 @@ class Config
|
||||
{
|
||||
$environment = $this->getEnvironment();
|
||||
|
||||
$configFilePath = getcwd() . '/.mage/config/environment/' . $environment . '.yml';
|
||||
if(!empty($environment))
|
||||
{
|
||||
$configFilePath = getcwd() . '/.mage/config/environment/' . $environment . '.yml';
|
||||
|
||||
$parameters = $this->getParameters();
|
||||
try {
|
||||
$this->environmentConfig = $this->loadEnvironment($configFilePath);
|
||||
} catch (ConfigNotFoundException $e) {
|
||||
throw new RequiredConfigNotFoundException("Not found required config $configFilePath for environment $environment", 0 , $e);
|
||||
}
|
||||
|
||||
if (empty($environment) && (!empty($parameters) || !$this->isRunInSpecialMode($parameters))) {
|
||||
throw new RuntimeException('Environment is not set');
|
||||
}
|
||||
|
||||
try {
|
||||
$this->environmentConfig = $this->loadEnvironment($configFilePath);
|
||||
} catch (ConfigNotFoundException $e) {
|
||||
throw new RequiredConfigNotFoundException("Not found required config $configFilePath for environment $environment", 0 , $e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user