@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $route = $parsedRequest[0]; |
72 | 72 | |
73 | 73 | |
74 | - if (substr($route, 0, $length+1) == $composition.'/') { |
|
74 | + if (substr($route, 0, $length + 1) == $composition.'/') { |
|
75 | 75 | $parsedRequest[0] = substr($parsedRequest[0], $length); |
76 | 76 | } |
77 | 77 | |
@@ -267,10 +267,10 @@ discard block |
||
267 | 267 | $params = (array) $params; |
268 | 268 | $url = $this->internalCreateUrl($params); |
269 | 269 | if (strpos($url, '://') === false) { |
270 | - $url = $this->getHostInfo() . $url; |
|
270 | + $url = $this->getHostInfo().$url; |
|
271 | 271 | } |
272 | 272 | if (is_string($scheme) && ($pos = strpos($url, '://')) !== false) { |
273 | - $url = $scheme . substr($url, $pos); |
|
273 | + $url = $scheme.substr($url, $pos); |
|
274 | 274 | } |
275 | 275 | return $url; |
276 | 276 | } |
@@ -164,18 +164,18 @@ |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | foreach ($this->getLog() as $section => $value) { |
167 | - $this->outputInfo(PHP_EOL . $section . ":"); |
|
167 | + $this->outputInfo(PHP_EOL.$section.":"); |
|
168 | 168 | foreach ($value as $k => $v) { |
169 | 169 | if (is_array($v)) { |
170 | 170 | foreach ($v as $kk => $kv) { |
171 | 171 | if (is_array($kv)) { |
172 | - $this->output(" - {$kk}: " . print_r($kv, true)); |
|
172 | + $this->output(" - {$kk}: ".print_r($kv, true)); |
|
173 | 173 | } else { |
174 | 174 | $this->output(" - {$kk}: {$kv}"); |
175 | 175 | } |
176 | 176 | } |
177 | 177 | } else { |
178 | - $this->output(" - " . $v); |
|
178 | + $this->output(" - ".$v); |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 | } |
@@ -100,22 +100,22 @@ discard block |
||
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | - $appModulesFolder = Yii::$app->basePath . DIRECTORY_SEPARATOR . 'modules'; |
|
104 | - $moduleFolder = $appModulesFolder . DIRECTORY_SEPARATOR . $moduleName; |
|
103 | + $appModulesFolder = Yii::$app->basePath.DIRECTORY_SEPARATOR.'modules'; |
|
104 | + $moduleFolder = $appModulesFolder.DIRECTORY_SEPARATOR.$moduleName; |
|
105 | 105 | |
106 | 106 | if (file_exists($moduleFolder)) { |
107 | - return $this->outputError("The folder " . $moduleFolder . " exists already."); |
|
107 | + return $this->outputError("The folder ".$moduleFolder." exists already."); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | $folders = [ |
111 | 111 | 'basePath' => $moduleFolder, |
112 | - 'adminPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin', |
|
113 | - 'adminAwsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'aws', |
|
114 | - 'frontendPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend', |
|
115 | - 'frontendBlocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'blocks', |
|
116 | - 'frontendControllersPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'controllers', |
|
117 | - 'frontendViewsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'views', |
|
118 | - 'modelsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'models', |
|
112 | + 'adminPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin', |
|
113 | + 'adminAwsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'aws', |
|
114 | + 'frontendPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend', |
|
115 | + 'frontendBlocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'blocks', |
|
116 | + 'frontendControllersPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'controllers', |
|
117 | + 'frontendViewsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'views', |
|
118 | + 'modelsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'models', |
|
119 | 119 | ]; |
120 | 120 | |
121 | 121 | $ns = 'app\\modules\\'.$moduleName; |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | $contents = [ |
128 | - $moduleFolder. DIRECTORY_SEPARATOR . 'README.md' => $this->renderReadme($folders, $moduleName, $ns), |
|
129 | - $moduleFolder. DIRECTORY_SEPARATOR . 'admin/Module.php' => $this->renderAdmin($folders, $moduleName, $ns), |
|
130 | - $moduleFolder. DIRECTORY_SEPARATOR . 'frontend/Module.php' => $this->renderFrontend($folders, $moduleName, $ns), |
|
128 | + $moduleFolder.DIRECTORY_SEPARATOR.'README.md' => $this->renderReadme($folders, $moduleName, $ns), |
|
129 | + $moduleFolder.DIRECTORY_SEPARATOR.'admin/Module.php' => $this->renderAdmin($folders, $moduleName, $ns), |
|
130 | + $moduleFolder.DIRECTORY_SEPARATOR.'frontend/Module.php' => $this->renderFrontend($folders, $moduleName, $ns), |
|
131 | 131 | ]; |
132 | 132 | |
133 | 133 | foreach ($contents as $fileName => $content) { |