@@ -54,18 +54,18 @@ discard block |
||
| 54 | 54 | $dir = Yii::getAlias($basePath); |
| 55 | 55 | } elseif (strpos($basePath, '/') !== 0) { |
| 56 | 56 | // todo: keep basepath as relative path |
| 57 | - $dir = $basePath = Yii::$app->basePath . DIRECTORY_SEPARATOR . $basePath; |
|
| 57 | + $dir = $basePath = Yii::$app->basePath.DIRECTORY_SEPARATOR.$basePath; |
|
| 58 | 58 | } else { |
| 59 | 59 | $dir = $basePath; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (!is_dir($dir) || !is_readable($dir)) { |
| 63 | - throw new Exception('Theme directory not exists or readable: ' . $dir); |
|
| 63 | + throw new Exception('Theme directory not exists or readable: '.$dir); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $themeFile = $dir . '/theme.json'; |
|
| 66 | + $themeFile = $dir.'/theme.json'; |
|
| 67 | 67 | if (!file_exists($themeFile)) { |
| 68 | - throw new InvalidConfigException('Theme config file missing at: ' . $themeFile); |
|
| 68 | + throw new InvalidConfigException('Theme config file missing at: '.$themeFile); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $config = Json::decode(file_get_contents($themeFile)) ?: []; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | if (file_exists(Yii::getAlias('@app/themes'))) { |
| 169 | 169 | foreach (glob(Yii::getAlias('@app/themes/*')) as $dirPath) { |
| 170 | - $themeDefinitions[] = "@app/themes/" . basename($dirPath); |
|
| 170 | + $themeDefinitions[] = "@app/themes/".basename($dirPath); |
|
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | $this->_themes[$basePath] = $themeConfig; |
| 215 | 215 | |
| 216 | - Yii::setAlias('@' . basename($basePath) . 'Theme', $basePath); |
|
| 216 | + Yii::setAlias('@'.basename($basePath).'Theme', $basePath); |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | /** |