Completed
Pull Request — master (#1936)
by
unknown
02:15
created
core/theme/ThemeManager.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
         if (strpos($basePath, '@') === 0) {
50 50
             $dir = Yii::getAlias($basePath);
51 51
         } elseif (strpos($basePath, '/') !== 0) {
52
-            $dir = $basePath = Yii::$app->basePath . DIRECTORY_SEPARATOR . $basePath;
52
+            $dir = $basePath = Yii::$app->basePath.DIRECTORY_SEPARATOR.$basePath;
53 53
         }
54 54
         
55 55
         if (!is_dir($dir) || !is_readable($dir)) {
56
-            throw new Exception('Theme directory not exists or readable: ' . $dir);
56
+            throw new Exception('Theme directory not exists or readable: '.$dir);
57 57
         }
58 58
         
59
-        $themeFile = $dir . '/theme.json';
59
+        $themeFile = $dir.'/theme.json';
60 60
         if (file_exists($themeFile)) {
61 61
             $config = Json::decode(file_get_contents($themeFile)) ?: [];
62 62
         } else {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         
153 153
         if (file_exists(Yii::getAlias('@app/themes'))) {
154 154
             foreach (scandir(Yii::getAlias('@app/themes')) as $dirPath) {
155
-                $themeDefinitions[] = "@app/themes/" . basename($dirPath);
155
+                $themeDefinitions[] = "@app/themes/".basename($dirPath);
156 156
             }
157 157
         }
158 158
         
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         
191 191
         $this->_themes[$themeConfig->getBasePath()] = $themeConfig;
192 192
         
193
-        Yii::setAlias('@' . basename($themeConfig->getBasePath()) . 'Theme', $themeConfig->getBasePath());
193
+        Yii::setAlias('@'.basename($themeConfig->getBasePath()).'Theme', $themeConfig->getBasePath());
194 194
     }
195 195
     
196 196
     /**
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
     }
166 166
     
167 167
     /**
168
-     * @param $basePath
168
+     * @param string $basePath
169 169
      *
170 170
      * @return ThemeConfig
171 171
      * @throws Exception
Please login to merge, or discard this patch.
core/theme/ThemeConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,6 +97,6 @@
 block discarded – undo
97 97
     
98 98
     public function getViewPath()
99 99
     {
100
-        return $this->getBasePath() . '/views';
100
+        return $this->getBasePath().'/views';
101 101
     }
102 102
 }
103 103
\ No newline at end of file
Please login to merge, or discard this patch.
core/theme/Theme.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         }
65 65
     
66 66
         $pos = strpos($viewPath, '/');
67
-        $rootPath = $pos === false ? $viewPath : (substr($viewPath, 0, $pos) . '/views');
67
+        $rootPath = $pos === false ? $viewPath : (substr($viewPath, 0, $pos).'/views');
68 68
         $this->pathMap[$rootPath] = $pathMap;
69 69
     
70 70
         $this->pathMap['@app/views'] = $pathMap;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     
85 85
     public function getLayoutPath()
86 86
     {
87
-        return $this->viewPath . '/' . self::LAYOUTS_PATH;
87
+        return $this->viewPath.'/'.self::LAYOUTS_PATH;
88 88
     }
89 89
     
90 90
     /**
Please login to merge, or discard this patch.