@@ -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; |
@@ -104,8 +104,8 @@ |
||
| 104 | 104 | case 'model': |
| 105 | 105 | |
| 106 | 106 | if (!$extended) { |
| 107 | - $modelName = $modelName . 'NgRest'; |
|
| 108 | - $item['file'] = $modelName . '.php'; |
|
| 107 | + $modelName = $modelName.'NgRest'; |
|
| 108 | + $item['file'] = $modelName.'.php'; |
|
| 109 | 109 | $item['class'] = $modelName; |
| 110 | 110 | } |
| 111 | 111 | |
@@ -19,5 +19,5 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * @var string $modelClass The path to the model which is the provider for the rules and fields. |
| 21 | 21 | */ |
| 22 | - public $modelClass = '<?= $modelClass;?>'; |
|
| 22 | + public $modelClass = '<?= $modelClass; ?>'; |
|
| 23 | 23 | } |
@@ -19,5 +19,5 @@ |
||
| 19 | 19 | /** |
| 20 | 20 | * @var string $modelClass The path to the model which is the provider for the rules and fields. |
| 21 | 21 | */ |
| 22 | - public $modelClass = '<?= $modelClass;?>'; |
|
| 22 | + public $modelClass = '<?= $modelClass; ?>'; |
|
| 23 | 23 | } |
@@ -50,9 +50,9 @@ |
||
| 50 | 50 | foreach ($array as $k => $v) { |
| 51 | 51 | if (is_numeric($v)) { |
| 52 | 52 | if (is_float($v)) { |
| 53 | - $return[$k] = (float)$v; |
|
| 53 | + $return[$k] = (float) $v; |
|
| 54 | 54 | } else { |
| 55 | - $return[$k] = (int)$v; |
|
| 55 | + $return[$k] = (int) $v; |
|
| 56 | 56 | } |
| 57 | 57 | } elseif (is_array($v)) { |
| 58 | 58 | $return[$k] = self::typeCast($v); |
@@ -68,9 +68,9 @@ |
||
| 68 | 68 | $_file = $exception->getFile(); |
| 69 | 69 | $_line = $exception->getLine(); |
| 70 | 70 | } elseif (is_string($exception)) { |
| 71 | - $_message = 'exception string: ' . $exception; |
|
| 71 | + $_message = 'exception string: '.$exception; |
|
| 72 | 72 | } elseif (is_array($exception)) { |
| 73 | - $_message = 'exception array dump: ' . print_r($exception, true); |
|
| 73 | + $_message = 'exception array dump: '.print_r($exception, true); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | return [ |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $this->verbosePrint('Run import index', __METHOD__); |
| 129 | 129 | foreach (Yii::$app->getModules() as $id => $module) { |
| 130 | 130 | if ($module instanceof \luya\base\Module) { |
| 131 | - $this->verbosePrint('collect module importers from module: ' . $id, __METHOD__); |
|
| 131 | + $this->verbosePrint('collect module importers from module: '.$id, __METHOD__); |
|
| 132 | 132 | $response = $module->import($this); |
| 133 | 133 | if (is_array($response)) { // importer returns an array with class names |
| 134 | 134 | foreach ($response as $class) { |
@@ -150,9 +150,9 @@ discard block |
||
| 150 | 150 | ksort($queue); |
| 151 | 151 | |
| 152 | 152 | foreach ($queue as $pos => $object) { |
| 153 | - $this->verbosePrint("run object '" .$object->className() . " on pos $pos.", __METHOD__); |
|
| 153 | + $this->verbosePrint("run object '".$object->className()." on pos $pos.", __METHOD__); |
|
| 154 | 154 | $objectResponse = $object->run(); |
| 155 | - $this->verbosePrint("run object response: " . var_export($objectResponse, true), __METHOD__); |
|
| 155 | + $this->verbosePrint("run object response: ".var_export($objectResponse, true), __METHOD__); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | if (Yii::$app->hasModule('admin')) { |
@@ -160,15 +160,15 @@ discard block |
||
| 160 | 160 | Yii::$app->db->createCommand()->update('admin_user', ['force_reload' => 1])->execute(); |
| 161 | 161 | } |
| 162 | 162 | |
| 163 | - $this->verbosePrint('importer finished, get log output: ' . var_export($this->getLog(), true), __METHOD__); |
|
| 163 | + $this->verbosePrint('importer finished, get log output: '.var_export($this->getLog(), true), __METHOD__); |
|
| 164 | 164 | |
| 165 | 165 | foreach ($this->getLog() as $section => $value) { |
| 166 | - $this->outputInfo(PHP_EOL . $section . ":"); |
|
| 166 | + $this->outputInfo(PHP_EOL.$section.":"); |
|
| 167 | 167 | foreach ($value as $k => $v) { |
| 168 | 168 | if (is_array($v)) { |
| 169 | 169 | $this->output(print_r($v, true)); |
| 170 | 170 | } else { |
| 171 | - $this->output(" - " . $v); |
|
| 171 | + $this->output(" - ".$v); |
|
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | if (isset($partial[0]) && (count($partial) > 1) && ($module = Yii::$app->getModule($partial[0]))) { |
| 76 | 76 | try { |
| 77 | 77 | // change the controller namespace of this module to make usage of `commands`. |
| 78 | - $module->controllerNamespace = $module->namespace . '\commands'; |
|
| 78 | + $module->controllerNamespace = $module->namespace.'\commands'; |
|
| 79 | 79 | unset($partial[0]); |
| 80 | 80 | // action response |
| 81 | 81 | return $module->runAction(implode("/", $partial), $params); |