@@ -3,10 +3,8 @@ |
||
3 | 3 | namespace luya\theme; |
4 | 4 | |
5 | 5 | use luya\base\PackageConfig; |
6 | -use luya\helpers\Json; |
|
7 | 6 | use Yii; |
8 | 7 | use luya\Exception; |
9 | -use yii\base\InvalidConfigException; |
|
10 | 8 | |
11 | 9 | /** |
12 | 10 | * Core theme manager for LUYA. |
@@ -104,10 +104,10 @@ discard block |
||
104 | 104 | $dir = Yii::getAlias($themeDefinition); |
105 | 105 | |
106 | 106 | if (!is_dir($dir) || is_readable($dir)) { |
107 | - throw new Exception('Theme directory not exists or readable: ' . $dir); |
|
107 | + throw new Exception('Theme directory not exists or readable: '.$dir); |
|
108 | 108 | } |
109 | 109 | |
110 | - $themeFile = $dir . '/theme.json'; |
|
110 | + $themeFile = $dir.'/theme.json'; |
|
111 | 111 | if (file_exists($themeFile)) { |
112 | 112 | $themeConfig = new ThemeConfig($themeDefinition); |
113 | 113 | $this->_themes[$themeDefinition] = $themeConfig; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $themeDefinitions = []; |
128 | 128 | |
129 | 129 | foreach (scandir(Yii::getAlias('@app/themes')) as $dirPath) { |
130 | - $themeDefinitions = array_merge($themeDefinitions, "@app/themes/" , basename($dirPath)); |
|
130 | + $themeDefinitions = array_merge($themeDefinitions, "@app/themes/", basename($dirPath)); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | foreach (Yii::$app->getPackageInstaller()->getConfigs() as $config) { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | $config = []; |
37 | 37 | |
38 | - $themeFile = Yii::getAlias($basePath . '/theme.json'); |
|
38 | + $themeFile = Yii::getAlias($basePath.'/theme.json'); |
|
39 | 39 | if (file_exists($themeFile)) { |
40 | 40 | $config = Json::decode(file_get_contents($themeFile)) ?: []; |
41 | 41 | } |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | public function getViewPath(): string |
88 | 88 | { |
89 | - return $this->basePath . '/views'; |
|
89 | + return $this->basePath.'/views'; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 |