@@ -49,14 +49,14 @@ discard block |
||
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 |
||
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 |
||
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 | /** |
@@ -165,7 +165,7 @@ |
||
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * @param $basePath |
|
168 | + * @param string $basePath |
|
169 | 169 | * |
170 | 170 | * @return ThemeConfig |
171 | 171 | * @throws Exception |
@@ -97,6 +97,6 @@ |
||
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 |
@@ -64,7 +64,7 @@ discard block |
||
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 |
||
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 | /** |