Completed
Push — master ( 9ef083...af60f7 )
by Marc
03:21
created
core/console/commands/BlockController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
     private function getExtraVarDef($type, $varName, $func)
65 65
     {
66 66
         $info = [
67
-            'image-upload' => function ($varName) use ($func) {
67
+            'image-upload' => function($varName) use ($func) {
68 68
                 return '$this->zaaImageUpload($this->'.$func.'(\''.$varName.'\'), false, true),';
69 69
             },
70
-            'image-array-upload' => function ($varName) use ($func) {
70
+            'image-array-upload' => function($varName) use ($func) {
71 71
                 return '$this->zaaImageArrayUpload($this->'.$func.'(\''.$varName.'\'), false, true),';
72 72
             },
73
-            'file-upload' => function ($varName) use ($func) {
73
+            'file-upload' => function($varName) use ($func) {
74 74
                 return '$this->zaaFileUpload($this->'.$func.'(\''.$varName.'\'), true),';
75 75
             },
76
-            'file-array-upload' => function ($varName) use ($func) {
76
+            'file-array-upload' => function($varName) use ($func) {
77 77
                 return '$this->zaaFileArrayUpload($this->'.$func.'(\''.$varName.'\'), true),';
78 78
             },
79
-            'cms-page' => function ($varName) use ($func) {
79
+            'cms-page' => function($varName) use ($func) {
80 80
                 return 'Yii::$app->menu->findOne([\'nav_id\' => $this->'.$func.'(\''.$varName.'\', 0)]),';
81 81
             },
82 82
         ];
@@ -196,15 +196,15 @@  discard block
 block discarded – undo
196 196
         $content .= '     * @var bool Choose whether block is a layout/container/segmnet/section block or not, Container elements will be optically displayed'.PHP_EOL;
197 197
         $content .= '     * in a different way for a better user experience. Container block will not display isDirty colorizing.'.PHP_EOL;
198 198
         $content .= '     */'.PHP_EOL;
199
-        $content .= '    public $isContainer = false;'.PHP_EOL . PHP_EOL;
199
+        $content .= '    public $isContainer = false;'.PHP_EOL.PHP_EOL;
200 200
         $content .= '    /**'.PHP_EOL;
201 201
         $content .= '     * @var bool Choose whether a block can be cached trough the caching component. Be carefull with caching container blocks.'.PHP_EOL;
202 202
         $content .= '     */'.PHP_EOL;
203
-        $content .= '    public $cacheEnabled = false;'.PHP_EOL . PHP_EOL;
203
+        $content .= '    public $cacheEnabled = false;'.PHP_EOL.PHP_EOL;
204 204
         $content .= '    /**'.PHP_EOL;
205 205
         $content .= '     * @var int The cache lifetime for this block in seconds (3600 = 1 hour), only affects when cacheEnabled is true'.PHP_EOL;
206 206
         $content .= '     */'.PHP_EOL;
207
-        $content .= '    public $cacheExpiration = 3600;'.PHP_EOL . PHP_EOL;
207
+        $content .= '    public $cacheExpiration = 3600;'.PHP_EOL.PHP_EOL;
208 208
         
209 209
         // method name
210 210
         $content .= '    public function name()'.PHP_EOL;
Please login to merge, or discard this patch.
core/console/commands/ModuleController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -34,19 +34,19 @@  discard block
 block discarded – undo
34 34
             }
35 35
         }
36 36
         
37
-        $appModulesFolder = Yii::$app->basePath . DIRECTORY_SEPARATOR . 'modules';
38
-        $moduleFolder = $appModulesFolder . DIRECTORY_SEPARATOR . $moduleName;
37
+        $appModulesFolder = Yii::$app->basePath.DIRECTORY_SEPARATOR.'modules';
38
+        $moduleFolder = $appModulesFolder.DIRECTORY_SEPARATOR.$moduleName;
39 39
         
40 40
         if (file_exists($moduleFolder)) {
41
-            return $this->outputError("The folder " . $moduleFolder . " exists already.");
41
+            return $this->outputError("The folder ".$moduleFolder." exists already.");
42 42
         }
43 43
         
44 44
         $folders = [
45 45
             'basePath' => $moduleFolder,
46
-            'adminPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin',
47
-            'frontendPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend',
48
-            'blocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'blocks',
49
-            'modelsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'models',
46
+            'adminPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin',
47
+            'frontendPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend',
48
+            'blocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'blocks',
49
+            'modelsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'models',
50 50
         ];
51 51
 
52 52
         $vars = ['folders' => $folders, 'name' => $moduleName, 'ns' => 'app\\modules\\'.$moduleName];
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         }
57 57
         
58 58
         $contents = [
59
-            $moduleFolder. DIRECTORY_SEPARATOR . 'README.md' => $this->view->render('@luya/console/commands/views/module/readme.php', $vars),
60
-            $moduleFolder. DIRECTORY_SEPARATOR . 'admin/Module.php' => $this->view->render('@luya/console/commands/views/module/adminmodule.php', $vars),
61
-            $moduleFolder. DIRECTORY_SEPARATOR . 'frontend/Module.php' => $this->view->render('@luya/console/commands/views/module/frontendmodule.php', $vars),
59
+            $moduleFolder.DIRECTORY_SEPARATOR.'README.md' => $this->view->render('@luya/console/commands/views/module/readme.php', $vars),
60
+            $moduleFolder.DIRECTORY_SEPARATOR.'admin/Module.php' => $this->view->render('@luya/console/commands/views/module/adminmodule.php', $vars),
61
+            $moduleFolder.DIRECTORY_SEPARATOR.'frontend/Module.php' => $this->view->render('@luya/console/commands/views/module/frontendmodule.php', $vars),
62 62
         ];
63 63
         
64 64
         foreach ($contents as $fileName => $content) {
Please login to merge, or discard this patch.
core/console/commands/CrudController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $apiEndpoint = $this->prompt('Api Endpoint (e.g. api-'.$modulePre.'-'.strtolower($modelName).')');
35 35
 
36 36
         $sqlSelection = true;
37
-        while($sqlSelection) {
37
+        while ($sqlSelection) {
38 38
             $sqlTable = $this->prompt('Database Table name (e.g. '.strtolower($modulePre).'_'.Inflector::underscore($modelName).')');
39 39
             if (isset($this->getSqlTablesArray()[$sqlTable])) {
40 40
                 $sqlSelection = false;
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
                 case 'model':
130 130
 
131 131
                     if (!$extended) {
132
-                        $modelName = $modelName . 'NgRest';
133
-                        $item['file'] = $modelName . '.php';
132
+                        $modelName = $modelName.'NgRest';
133
+                        $item['file'] = $modelName.'.php';
134 134
                         $item['class'] = $modelName;
135 135
                     }
136 136
                     
Please login to merge, or discard this patch.
core/traits/ApplicationTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
core/traits/ErrorHandlerTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,9 +114,9 @@
 block discarded – undo
114 114
             $_file = $exception->getFile();
115 115
             $_line = $exception->getLine();
116 116
         } elseif (is_string($exception)) {
117
-            $_message = 'exception string: ' . $exception;
117
+            $_message = 'exception string: '.$exception;
118 118
         } elseif (is_array($exception)) {
119
-            $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: ' . print_r($exception, true);
119
+            $_message = isset($exception['message']) ? $exception['message'] : 'exception array dump: '.print_r($exception, true);
120 120
             $_file = isset($exception['file']) ? $exception['file'] : __FILE__;
121 121
             $_line = isset($exception['line']) ? $exception['line'] : __LINE__;
122 122
         }
Please login to merge, or discard this patch.
core/TagParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         
63 63
         if (!is_object($this->tags[$tag])) {
64 64
             $this->tags[$tag] = Yii::createObject($this->tags[$tag]);
65
-            Yii::trace('tag parser object generated for:'. $tag, __CLASS__);
65
+            Yii::trace('tag parser object generated for:'.$tag, __CLASS__);
66 66
         }
67 67
         
68 68
         $value = isset($context['value']) ? $context['value'] : false;
Please login to merge, or discard this patch.
core/base/Bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
             // see if the module has a registerComponents method
101 101
             foreach ($module->registerComponents() as $componentId => $definition) {
102 102
                 if (!$app->has($componentId)) {
103
-                    Yii::trace('Register component ' . $componentId, __METHOD__);
103
+                    Yii::trace('Register component '.$componentId, __METHOD__);
104 104
                     $app->set($componentId, $definition);
105 105
                 }
106 106
             }
Please login to merge, or discard this patch.
core/tag/tags/TelTag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 	
16 16
 	public function parse($value, $sub)
17 17
 	{
18
-		return Html::a(empty($sub) ? $value : $sub, 'tel:' . $this->ensureNumber($value));
18
+		return Html::a(empty($sub) ? $value : $sub, 'tel:'.$this->ensureNumber($value));
19 19
 	}
20 20
 		
21 21
 	private function ensureNumber($number)
Please login to merge, or discard this patch.
core/lazyload/LazyLoad.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function run()
68 68
     {
69
-        $this->class .= " " . $this->additionalClass;
69
+        $this->class .= " ".$this->additionalClass;
70 70
 
71
-        if($this->onlyTags) {
71
+        if ($this->onlyTags) {
72 72
             return "class = \"$this->class\"
73 73
                     data-src = \"$this->src\"
74 74
                     data-width = \"$this->width\"
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
         
80 80
         $tag = Html::tag('img', '', ['class' => $this->class, 'data-src' => $this->src, 'data-width' => $this->width, 'data-height' => $this->height]);
81
-        $tag.= '<noscript><img class="'.$this->class.'" src="'.$this->src.'" /></noscript>';
81
+        $tag .= '<noscript><img class="'.$this->class.'" src="'.$this->src.'" /></noscript>';
82 82
         return $tag;
83 83
     }
84 84
 }
85 85
\ No newline at end of file
Please login to merge, or discard this patch.