First part of a large code cleanup commit.

This commit is contained in:
James Cole
2019-02-12 21:49:28 +01:00
parent b273af341c
commit e0d87aa11e
70 changed files with 336 additions and 354 deletions

View File

@@ -51,10 +51,7 @@ trait GetConfigurationData
E_ALL & ~E_NOTICE & ~E_STRICT => 'E_ALL & ~E_NOTICE & ~E_STRICT',
E_COMPILE_ERROR | E_RECOVERABLE_ERROR | E_ERROR | E_CORE_ERROR => 'E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR',
];
$result = (string)$value;
if (isset($array[$value])) {
$result = $array[$value];
}
$result = $array[$value] ?? (string)$value;
return $result;
}
@@ -188,7 +185,7 @@ trait GetConfigurationData
$routeKey = '';
// user is on page with specific instructions:
if (\strlen($specificPage) > 0) {
if ('' !== $specificPage) {
$routeKey = str_replace('.', '_', $route);
$elements = config(sprintf('intro.%s', $routeKey . '_' . $specificPage));
if (\is_array($elements) && \count($elements) > 0) {