@@ -75,7 +75,7 @@ |
||
75 | 75 | $name = substr($name, 0, -(strlen($suffix))); |
76 | 76 | } |
77 | 77 | |
78 | - return $name . $suffix; |
|
78 | + return $name.$suffix; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -25,21 +25,21 @@ |
||
25 | 25 | |
26 | 26 | if (count($fileList) !== 0) { |
27 | 27 | $success = true; |
28 | - if ($this->confirm("Do you want to delete " . count($fileList) . " files which are not referenced in the database any more?")) { |
|
28 | + if ($this->confirm("Do you want to delete ".count($fileList)." files which are not referenced in the database any more?")) { |
|
29 | 29 | foreach ($fileList as $file) { |
30 | 30 | if (is_file($file) && @unlink($file)) { |
31 | - $this->outputSuccess($file . " successful deleted."); |
|
31 | + $this->outputSuccess($file." successful deleted."); |
|
32 | 32 | } elseif (is_file($file)) { |
33 | - $this->outputError($file . " could not be deleted!"); |
|
33 | + $this->outputError($file." could not be deleted!"); |
|
34 | 34 | $success = false; |
35 | 35 | } else { |
36 | - $this->outputError($file . " could not be found!"); |
|
36 | + $this->outputError($file." could not be found!"); |
|
37 | 37 | $success = false; |
38 | 38 | } |
39 | 39 | } |
40 | 40 | } |
41 | 41 | if ($success) { |
42 | - return $this->outputSuccess(count($fileList) . " files successful deleted."); |
|
42 | + return $this->outputSuccess(count($fileList)." files successful deleted."); |
|
43 | 43 | } |
44 | 44 | return $this->outputError("Cleanup could not be completed. Please look into error above."); |
45 | 45 | } |
@@ -31,13 +31,13 @@ |
||
31 | 31 | |
32 | 32 | $module = Yii::$app->getModule($moduleId); |
33 | 33 | |
34 | - $folder = $module->basePath . DIRECTORY_SEPARATOR . 'aws'; |
|
34 | + $folder = $module->basePath.DIRECTORY_SEPARATOR.'aws'; |
|
35 | 35 | |
36 | - $file = $folder . DIRECTORY_SEPARATOR . $className . '.php'; |
|
36 | + $file = $folder.DIRECTORY_SEPARATOR.$className.'.php'; |
|
37 | 37 | |
38 | 38 | $content = $this->view->render('@luya/console/commands/views/aw/create.php', [ |
39 | 39 | 'className' => $className, |
40 | - 'namespace' => $module->getNamespace() . '\\aws', |
|
40 | + 'namespace' => $module->getNamespace().'\\aws', |
|
41 | 41 | 'luya' => $this->getLuyaVersion(), |
42 | 42 | 'moduleId' => $moduleId, |
43 | 43 | 'alias' => Inflector::humanize(Inflector::camel2words($className)), |
@@ -11,6 +11,6 @@ |
||
11 | 11 | { |
12 | 12 | $class = new ReflectionClass($this); |
13 | 13 | |
14 | - return '@app/views/widgets/' . Inflector::camel2id($class->getShortName()); |
|
14 | + return '@app/views/widgets/'.Inflector::camel2id($class->getShortName()); |
|
15 | 15 | } |
16 | 16 | } |
@@ -94,7 +94,7 @@ |
||
94 | 94 | if (method_exists($module, 'registerComponents')) { |
95 | 95 | foreach ($module->registerComponents() as $componentId => $definition) { |
96 | 96 | if (!$app->has($componentId)) { |
97 | - Yii::trace('Register component ' . $componentId, __METHOD__); |
|
97 | + Yii::trace('Register component '.$componentId, __METHOD__); |
|
98 | 98 | $app->set($componentId, $definition); |
99 | 99 | } |
100 | 100 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | |
98 | 98 | return [ |
99 | 99 | 'module' => $this->module->id, |
100 | - 'route' => $this->module->id . '/' . $request['route'], |
|
100 | + 'route' => $this->module->id.'/'.$request['route'], |
|
101 | 101 | 'params' => $request['args'], |
102 | 102 | ]; |
103 | 103 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | throw new InvalidConfigException(sprintf("Unable to create controller '%s' for module '%s'.", $requestRoute['route'], $this->module->id)); |
118 | 118 | } |
119 | 119 | |
120 | - Yii::info('LUYA module run module "'.$this->module->id.'" route ' . $requestRoute['route'], __METHOD__); |
|
120 | + Yii::info('LUYA module run module "'.$this->module->id.'" route '.$requestRoute['route'], __METHOD__); |
|
121 | 121 | |
122 | 122 | // run the action on the provided controller object |
123 | 123 | return $controller[0]->runAction($controller[1], $requestRoute['args']); |
@@ -63,7 +63,7 @@ |
||
63 | 63 | public function getWebroot() |
64 | 64 | { |
65 | 65 | if ($this->_webroot === null) { |
66 | - $this->_webroot = realpath(realpath($this->basePath) . DIRECTORY_SEPARATOR . $this->webrootDirectory); |
|
66 | + $this->_webroot = realpath(realpath($this->basePath).DIRECTORY_SEPARATOR.$this->webrootDirectory); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | return $this->_webroot; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | { |
42 | 42 | $info = pathinfo($file); |
43 | 43 | if (!isset($info['extension']) || empty($info['extension'])) { |
44 | - $file = rtrim($file, '.') . '.' . $extension; |
|
44 | + $file = rtrim($file, '.').'.'.$extension; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | return $file; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function mailer() |
62 | 62 | { |
63 | - trigger_error("Deprecated function called: " . __METHOD__, E_USER_NOTICE); |
|
63 | + trigger_error("Deprecated function called: ".__METHOD__, E_USER_NOTICE); |
|
64 | 64 | return $this->getMailer(); |
65 | 65 | } |
66 | 66 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | return true; |
238 | 238 | } else { |
239 | 239 | $data = [$this->host, $this->port, $this->smtpSecure, $this->username]; |
240 | - throw new Exception('Authentication failed ('.implode(',', $data).'): '.$smtp->getLastReply() . PHP_EOL . print_r($smtp->getError(), true)); |
|
240 | + throw new Exception('Authentication failed ('.implode(',', $data).'): '.$smtp->getLastReply().PHP_EOL.print_r($smtp->getError(), true)); |
|
241 | 241 | } |
242 | 242 | } else { |
243 | 243 | throw new Exception('HELO failed: '.$smtp->getLastReply()); |