@@ -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; |
@@ -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 | /** |
@@ -104,7 +104,7 @@ |
||
104 | 104 | public static function ensureHttp($url, $https = false) |
105 | 105 | { |
106 | 106 | if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { |
107 | - $url = ($https ? "https://" : "http://") . $url; |
|
107 | + $url = ($https ? "https://" : "http://").$url; |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | return $url; |