@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use luya\base\PackageConfig; |
6 | 6 | use luya\Exception; |
7 | -use luya\helpers\FileHelper; |
|
8 | 7 | use luya\helpers\Json; |
9 | 8 | use Yii; |
10 | 9 | use yii\base\InvalidArgumentException; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if (strpos($basePath, '@') === 0) { |
54 | 54 | $dir = Yii::getAlias($basePath); |
55 | 55 | } elseif (strpos($basePath, '/') !== 0) { |
56 | - $dir = $basePath = Yii::$app->basePath . DIRECTORY_SEPARATOR . $basePath; |
|
56 | + $dir = $basePath = Yii::$app->basePath.DIRECTORY_SEPARATOR.$basePath; |
|
57 | 57 | } else { |
58 | 58 | $dir = $basePath; |
59 | 59 | } |
@@ -66,12 +66,12 @@ discard block |
||
66 | 66 | } else { |
67 | 67 | |
68 | 68 | if (!is_dir($dir) || !is_readable($dir)) { |
69 | - throw new Exception('Theme directory not exists or readable: ' . $dir); |
|
69 | + throw new Exception('Theme directory not exists or readable: '.$dir); |
|
70 | 70 | } |
71 | 71 | |
72 | - $themeFile = $dir . DIRECTORY_SEPARATOR . 'theme.json'; |
|
72 | + $themeFile = $dir.DIRECTORY_SEPARATOR.'theme.json'; |
|
73 | 73 | if (!file_exists($themeFile)) { |
74 | - throw new InvalidConfigException('Theme config file missing at: ' . $themeFile); |
|
74 | + throw new InvalidConfigException('Theme config file missing at: '.$themeFile); |
|
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | |
174 | 174 | if (file_exists(Yii::getAlias('@app/themes'))) { |
175 | 175 | foreach (glob(Yii::getAlias('@app/themes/*')) as $dirPath) { |
176 | - $themeDefinitions[] = "@app/themes/" . basename($dirPath); |
|
176 | + $themeDefinitions[] = "@app/themes/".basename($dirPath); |
|
177 | 177 | } |
178 | 178 | } |
179 | 179 | |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | |
220 | 220 | $this->_themes[$basePath] = $themeConfig; |
221 | 221 | |
222 | - Yii::setAlias('@' . basename($basePath) . 'Theme', $basePath); |
|
222 | + Yii::setAlias('@'.basename($basePath).'Theme', $basePath); |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |