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