@@ -71,7 +71,6 @@ |
||
| 71 | 71 | * $this->addLog('block', 'new block <ID> have been found and added to database'); |
| 72 | 72 | * ``` |
| 73 | 73 | * |
| 74 | - * @param string $section |
|
| 75 | 74 | * @param string $value |
| 76 | 75 | * @todo trigger deprecated section call |
| 77 | 76 | */ |
@@ -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); |
@@ -20,9 +20,9 @@ |
||
| 20 | 20 | { |
| 21 | 21 | if (is_numeric($string)) { |
| 22 | 22 | if (is_float($string)) { |
| 23 | - return (float)$string; |
|
| 23 | + return (float) $string; |
|
| 24 | 24 | } else { |
| 25 | - return (int)$string; |
|
| 25 | + return (int) $string; |
|
| 26 | 26 | } |
| 27 | 27 | } elseif (is_array($string)) { |
| 28 | 28 | return ArrayHelper::typeCast($string); |
@@ -1,10 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $tests = [ |
| 3 | - "in_array('mod_rewrite', apache_get_modules());", |
|
| 4 | - "ini_get('short_open_tag');", |
|
| 5 | - "ini_get('error_reporting');", |
|
| 6 | - "phpversion()", |
|
| 7 | - "php_ini_loaded_file()", |
|
| 3 | + "in_array('mod_rewrite', apache_get_modules());", |
|
| 4 | + "ini_get('short_open_tag');", |
|
| 5 | + "ini_get('error_reporting');", |
|
| 6 | + "phpversion()", |
|
| 7 | + "php_ini_loaded_file()", |
|
| 8 | 8 | ]; |
| 9 | 9 | foreach ($tests as $i => $test) { |
| 10 | 10 | $result = eval('return ' . $test . ';'); |
@@ -7,6 +7,6 @@ |
||
| 7 | 7 | "php_ini_loaded_file()", |
| 8 | 8 | ]; |
| 9 | 9 | foreach ($tests as $i => $test) { |
| 10 | - $result = eval('return ' . $test . ';'); |
|
| 10 | + $result = eval('return '.$test.';'); |
|
| 11 | 11 | printf("%2d: [%s] %s<br />", $i + 1, $test, var_export($result, true)); |
| 12 | 12 | } |
| 13 | 13 | \ No newline at end of file |
@@ -217,12 +217,12 @@ |
||
| 217 | 217 | { |
| 218 | 218 | if ($this->renderEngine == 'php') { |
| 219 | 219 | $view = new View(); |
| 220 | - return $view->renderPhpFile(rtrim($this->getFolder(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . FileHelper::ensureExtension($file, 'php'), $args); |
|
| 220 | + return $view->renderPhpFile(rtrim($this->getFolder(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.FileHelper::ensureExtension($file, 'php'), $args); |
|
| 221 | 221 | } elseif ($this->renderEngine == 'twig') { |
| 222 | 222 | $twig = Yii::$app->twig->env(new Twig_Loader_Filesystem($this->getFolder())); |
| 223 | 223 | return $twig->render(FileHelper::ensureExtension($file, 'twig'), $args); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - throw new Exception('Not supported render engine: ' . $this->renderEngine); |
|
| 226 | + throw new Exception('Not supported render engine: '.$this->renderEngine); |
|
| 227 | 227 | } |
| 228 | 228 | } |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * NgRest Model created at <?= date("d.m.Y H:i"); ?> on LUYA Version <?= $luyaVersion; ?>. |
| 24 | 24 | * |
| 25 | -<?php foreach ($properties as $name => $type): ?> * @property <?= $type; ?> $<?= $name . PHP_EOL; ?> |
|
| 26 | -<?php endforeach;?> |
|
| 25 | +<?php foreach ($properties as $name => $type): ?> * @property <?= $type; ?> $<?= $name.PHP_EOL; ?> |
|
| 26 | +<?php endforeach; ?> |
|
| 27 | 27 | */ |
| 28 | 28 | <?php if (!$extended): ?>abstract <?php endif; ?>class <?= $className; ?> extends \admin\ngrest\base\Model |
| 29 | 29 | { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | return [ |
| 99 | 99 | <?php foreach ($fieldConfigs as $name => $type): ?> |
| 100 | - '<?=$name; ?>' => '<?= $type;?>', |
|
| 100 | + '<?=$name; ?>' => '<?= $type; ?>', |
|
| 101 | 101 | <?php endforeach; ?>]; |
| 102 | 102 | } |
| 103 | 103 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | public function verbosePrint($message, $section = null) |
| 36 | 36 | { |
| 37 | 37 | if ($this->verbose) { |
| 38 | - $this->output((!empty($section)) ? $section . ': ' . $message : $message); |
|
| 38 | + $this->output((!empty($section)) ? $section.': '.$message : $message); |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $name = substr($name, 0, -(strlen($suffix))); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - return $name . $suffix; |
|
| 120 | + return $name.$suffix; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
@@ -73,6 +73,7 @@ |
||
| 73 | 73 | * @param string $key The identifier key |
| 74 | 74 | * @param mixed $value The value to store in the cache component. |
| 75 | 75 | * @param \yii\caching\Dependency $dependency Dependency of the cached item. If the dependency changes, the corresponding value in the cache will be invalidated when it is fetched via get(). This parameter is ignored if $serializer is false. |
| 76 | + * @param integer $cacheExpiration |
|
| 76 | 77 | * @return void |
| 77 | 78 | */ |
| 78 | 79 | public function setHasCache($key, $value, $dependency = null, $cacheExpiration = null) |