@@ -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); |
@@ -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 | } |
@@ -76,12 +76,12 @@ |
||
76 | 76 | if (isset($partial[0]) && (count($partial) > 1) && ($module = Yii::$app->getModule($partial[0]))) { |
77 | 77 | try { |
78 | 78 | // change the controller namespace of this module to make usage of `commands`. |
79 | - $module->controllerNamespace = $module->namespace . '\commands'; |
|
79 | + $module->controllerNamespace = $module->namespace.'\commands'; |
|
80 | 80 | unset($partial[0]); |
81 | 81 | // action response |
82 | 82 | return $module->runAction(implode("/", $partial), $params); |
83 | 83 | } catch (\Exception $e) { |
84 | - return Console::output("Command Exception: '" . $e->getMessage() . "' in file '" . $e->getFile() . "' on line '" . $e->getLine() . "'."); |
|
84 | + return Console::output("Command Exception: '".$e->getMessage()."' in file '".$e->getFile()."' on line '".$e->getLine()."'."); |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | } |
@@ -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 |
@@ -64,11 +64,11 @@ discard block |
||
64 | 64 | private function getExtraVarDef($type, $varName, $func) |
65 | 65 | { |
66 | 66 | $info = [ |
67 | - 'image-upload' => function ($varName) use ($func) { return '$this->zaaImageUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
68 | - 'image-array-upload' => function ($varName) use ($func) { return '$this->zaaImageArrayUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
69 | - 'file-upload' => function ($varName) use ($func) { return '$this->zaaFileUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
70 | - 'file-array-upload' => function ($varName) use ($func) { return '$this->zaaFileArrayUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
71 | - 'cms-page' => function ($varName) use ($func) { return 'Yii::$app->menu->findOne([\'nav_id\' => $this->'.$func.'(\''.$varName.'\', 0)]),'; }, |
|
67 | + 'image-upload' => function($varName) use ($func) { return '$this->zaaImageUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
68 | + 'image-array-upload' => function($varName) use ($func) { return '$this->zaaImageArrayUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
69 | + 'file-upload' => function($varName) use ($func) { return '$this->zaaFileUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
70 | + 'file-array-upload' => function($varName) use ($func) { return '$this->zaaFileArrayUpload($this->'.$func.'(\''.$varName.'\')),'; }, |
|
71 | + 'cms-page' => function($varName) use ($func) { return 'Yii::$app->menu->findOne([\'nav_id\' => $this->'.$func.'(\''.$varName.'\', 0)]),'; }, |
|
72 | 72 | ]; |
73 | 73 | |
74 | 74 | if (array_key_exists($type, $info)) { |
@@ -186,15 +186,15 @@ discard block |
||
186 | 186 | $content .= ' * @var bool Choose whether block is a layout/container/segmnet/section block or not, Container elements will be optically displayed'.PHP_EOL; |
187 | 187 | $content .= ' * in a different way for a better user experience. Container block will not display isDirty colorizing.'.PHP_EOL; |
188 | 188 | $content .= ' */'.PHP_EOL; |
189 | - $content .= ' public $isContainer = false;'.PHP_EOL . PHP_EOL; |
|
189 | + $content .= ' public $isContainer = false;'.PHP_EOL.PHP_EOL; |
|
190 | 190 | $content .= ' /**'.PHP_EOL; |
191 | 191 | $content .= ' * @var bool Choose whether a block can be cached trough the caching component. Be carefull with caching container blocks.'.PHP_EOL; |
192 | 192 | $content .= ' */'.PHP_EOL; |
193 | - $content .= ' public $cacheEnabled = false;'.PHP_EOL . PHP_EOL; |
|
193 | + $content .= ' public $cacheEnabled = false;'.PHP_EOL.PHP_EOL; |
|
194 | 194 | $content .= ' /**'.PHP_EOL; |
195 | 195 | $content .= ' * @var int The cache lifetime for this block in seconds (3600 = 1 hour), only affects when cacheEnabled is true'.PHP_EOL; |
196 | 196 | $content .= ' */'.PHP_EOL; |
197 | - $content .= ' public $cacheExpiration = 3600;'.PHP_EOL . PHP_EOL; |
|
197 | + $content .= ' public $cacheExpiration = 3600;'.PHP_EOL.PHP_EOL; |
|
198 | 198 | |
199 | 199 | // method name |
200 | 200 | $content .= ' public function name()'.PHP_EOL; |