Completed
Pull Request — master (#1936)
by
unknown
01:57
created
core/theme/ThemeManager.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,10 +3,8 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
core/theme/ThemeConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     
Please login to merge, or discard this patch.