@@ -57,7 +57,7 @@ |
||
57 | 57 | { |
58 | 58 | if (StringHelper::startsWith($value, '//')) { |
59 | 59 | // its an absolute url |
60 | - $value = StringHelper::replaceFirst('//', Url::base(true) . '/', $value); |
|
60 | + $value = StringHelper::replaceFirst('//', Url::base(true).'/', $value); |
|
61 | 61 | $external = false; |
62 | 62 | } elseif (StringHelper::startsWith($value, '/')) { |
63 | 63 | // its a relative url, keep it like this |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | if ($throwException) { |
51 | - throw new Exception("The given object must be an instance of: " . implode(",", $haystack)); |
|
51 | + throw new Exception("The given object must be an instance of: ".implode(",", $haystack)); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return false; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | }; |
220 | 220 | |
221 | - $staticPath = $module::staticBasePath() . DIRECTORY_SEPARATOR . 'controllers'; |
|
221 | + $staticPath = $module::staticBasePath().DIRECTORY_SEPARATOR.'controllers'; |
|
222 | 222 | if (is_dir($staticPath)) { |
223 | 223 | foreach (FileHelper::findFiles($staticPath) as $file) { |
224 | 224 | $files[self::fileToName($staticPath, $file)] = $file; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | { |
217 | 217 | $this->theme = Yii::$app->themeManager->getActiveTheme(); |
218 | 218 | |
219 | - if ($this->theme){ |
|
219 | + if ($this->theme) { |
|
220 | 220 | $this->layout = $this->theme->layout; |
221 | 221 | |
222 | 222 | if ($this->useAppLayoutPath) { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | */ |
330 | 330 | public function getControllerPath() |
331 | 331 | { |
332 | - return Yii::getAlias('@' . str_replace('\\', '/', $this->controllerNamespace), false); |
|
332 | + return Yii::getAlias('@'.str_replace('\\', '/', $this->controllerNamespace), false); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | // STATIC METHODS |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | if (!is_dir($dir)) { |
100 | 100 | if (!mkdir($dir, 0777, true)) { |
101 | - throw new Exception('Themes directory not exists: ' . $dir); |
|
101 | + throw new Exception('Themes directory not exists: '.$dir); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | chmod($dir, 0766); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | foreach (scandir($dir) as $entry) { |
108 | 108 | if ($entry != "." && $entry != "..") { |
109 | 109 | |
110 | - $themeFile = $dir . '/' . $entry . '/theme.json'; |
|
110 | + $themeFile = $dir.'/'.$entry.'/theme.json'; |
|
111 | 111 | if (file_exists($themeFile)) { |
112 | 112 | $data = Json::decode(file_get_contents($themeFile)); |
113 | 113 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | protected function getThemesDir() |
135 | 135 | { |
136 | - return Yii::$app->basePath . '/themes'; |
|
136 | + return Yii::$app->basePath.'/themes'; |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $config = []; |
31 | 31 | |
32 | 32 | // @todo do not load the json every time |
33 | - $themeFile = Yii::getAlias($basePath . '/theme.json'); |
|
33 | + $themeFile = Yii::getAlias($basePath.'/theme.json'); |
|
34 | 34 | if (file_exists($themeFile)) { |
35 | 35 | $config = Json::decode(file_get_contents($themeFile)) ?: []; |
36 | 36 | } |
@@ -100,6 +100,6 @@ discard block |
||
100 | 100 | |
101 | 101 | public function getViewPath(): string |
102 | 102 | { |
103 | - return $this->basePath . '/views'; |
|
103 | + return $this->basePath.'/views'; |
|
104 | 104 | } |
105 | 105 | } |
106 | 106 | \ No newline at end of file |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | $viewPath = $this->getViewPath(); |
53 | 53 | $pos = strpos($viewPath, '/'); |
54 | - $rootPath = $pos === false ? $viewPath : (substr($viewPath, 0, $pos) . '/views'); |
|
54 | + $rootPath = $pos === false ? $viewPath : (substr($viewPath, 0, $pos).'/views'); |
|
55 | 55 | $this->pathMap[$rootPath] = $pathMap; |
56 | 56 | |
57 | 57 | $this->pathMap[$viewPath] = $pathMap; |
@@ -72,17 +72,17 @@ discard block |
||
72 | 72 | |
73 | 73 | public function getLayoutPath(): string |
74 | 74 | { |
75 | - return $this->viewPath . '/layouts'; |
|
75 | + return $this->viewPath.'/layouts'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | public function getLayoutFile() |
79 | 79 | { |
80 | - return $this->layoutPath . '/' . $this->layout . '.php'; |
|
80 | + return $this->layoutPath.'/'.$this->layout.'.php'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | public function getResourcePath() |
84 | 84 | { |
85 | - return $this->basePath . '/resources'; |
|
85 | + return $this->basePath.'/resources'; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | public function getInfo() |