Completed
Push — master ( fb7a26...d5e2d7 )
by Agiel Kurniawan
04:29
created
console/migrations/m000000_000020_module.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,16 +23,16 @@
 block discarded – undo
23 23
 
24 24
         $this->createTable('{{%module}}', [
25 25
             'id' => Schema::TYPE_PK,
26
-            'name' => Schema::TYPE_STRING . '(64) NOT NULL',
27
-            'title' => Schema::TYPE_TEXT . ' NOT NULL',
26
+            'name' => Schema::TYPE_STRING.'(64) NOT NULL',
27
+            'title' => Schema::TYPE_TEXT.' NOT NULL',
28 28
             'description' => Schema::TYPE_TEXT,
29
-            'config' => Schema::TYPE_TEXT . ' NOT NULL',
30
-            'status' => Schema::TYPE_SMALLINT . '(1) NOT NULL DEFAULT 0',
31
-            'directory' => Schema::TYPE_STRING . '(128) NOT NULL',
32
-            'backend_bootstrap' => Schema::TYPE_SMALLINT . '(1) NOT NULL DEFAULT 0',
33
-            'frontend_bootstrap' => Schema::TYPE_SMALLINT . '(1) NOT NULL DEFAULT 0',
34
-            'date' => Schema::TYPE_DATETIME . ' NOT NULL',
35
-            'modified' => Schema::TYPE_DATETIME . ' NOT NULL',
29
+            'config' => Schema::TYPE_TEXT.' NOT NULL',
30
+            'status' => Schema::TYPE_SMALLINT.'(1) NOT NULL DEFAULT 0',
31
+            'directory' => Schema::TYPE_STRING.'(128) NOT NULL',
32
+            'backend_bootstrap' => Schema::TYPE_SMALLINT.'(1) NOT NULL DEFAULT 0',
33
+            'frontend_bootstrap' => Schema::TYPE_SMALLINT.'(1) NOT NULL DEFAULT 0',
34
+            'date' => Schema::TYPE_DATETIME.' NOT NULL',
35
+            'modified' => Schema::TYPE_DATETIME.' NOT NULL',
36 36
         ], $tableOptions);
37 37
 
38 38
         /**
Please login to merge, or discard this patch.
console/migrations/m000000_000007_post_type.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@
 block discarded – undo
24 24
 
25 25
         $this->createTable('{{%post_type}}', [
26 26
             'id' => Schema::TYPE_PK,
27
-            'name' => Schema::TYPE_STRING . '(64) NOT NULL',
28
-            'slug' => Schema::TYPE_STRING . '(64) NOT NULL',
27
+            'name' => Schema::TYPE_STRING.'(64) NOT NULL',
28
+            'slug' => Schema::TYPE_STRING.'(64) NOT NULL',
29 29
             'description' => Schema::TYPE_TEXT,
30
-            'icon' => Schema::TYPE_STRING . '(255)',
31
-            'singular_name' => Schema::TYPE_STRING . '(255) NOT NULL',
32
-            'plural_name' => Schema::TYPE_STRING . '(255) NOT NULL',
33
-            'menu_builder' => Schema::TYPE_SMALLINT . '(1) NOT NULL DEFAULT 0',
34
-            'permission' => Schema::TYPE_STRING . '(64) NOT NULL',
30
+            'icon' => Schema::TYPE_STRING.'(255)',
31
+            'singular_name' => Schema::TYPE_STRING.'(255) NOT NULL',
32
+            'plural_name' => Schema::TYPE_STRING.'(255) NOT NULL',
33
+            'menu_builder' => Schema::TYPE_SMALLINT.'(1) NOT NULL DEFAULT 0',
34
+            'permission' => Schema::TYPE_STRING.'(64) NOT NULL',
35 35
         ], $tableOptions);
36 36
 
37 37
         /**
Please login to merge, or discard this patch.
console/migrations/m000000_000017_media_comment.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@
 block discarded – undo
23 23
 
24 24
         $this->createTable('{{%media_comment}}', [
25 25
             'id' => Schema::TYPE_PK,
26
-            'media_id' => Schema::TYPE_INTEGER . '(11) NOT NULL',
26
+            'media_id' => Schema::TYPE_INTEGER.'(11) NOT NULL',
27 27
             'author' => Schema::TYPE_TEXT,
28
-            'email' => Schema::TYPE_STRING . '(100)',
29
-            'url' => Schema::TYPE_STRING . '(255)',
30
-            'ip' => Schema::TYPE_STRING . '(100) NOT NULL',
31
-            'date' => Schema::TYPE_DATETIME . ' NOT NULL',
32
-            'content' => Schema::TYPE_TEXT . ' NOT NULL',
33
-            'status' => Schema::TYPE_STRING . '(20) NOT NULL',
34
-            'agent' => Schema::TYPE_STRING . '(255) NOT NULL',
35
-            'parent' => Schema::TYPE_INTEGER . '(11) DEFAULT 0',
36
-            'user_id' => Schema::TYPE_INTEGER . '(11)',
28
+            'email' => Schema::TYPE_STRING.'(100)',
29
+            'url' => Schema::TYPE_STRING.'(255)',
30
+            'ip' => Schema::TYPE_STRING.'(100) NOT NULL',
31
+            'date' => Schema::TYPE_DATETIME.' NOT NULL',
32
+            'content' => Schema::TYPE_TEXT.' NOT NULL',
33
+            'status' => Schema::TYPE_STRING.'(20) NOT NULL',
34
+            'agent' => Schema::TYPE_STRING.'(255) NOT NULL',
35
+            'parent' => Schema::TYPE_INTEGER.'(11) DEFAULT 0',
36
+            'user_id' => Schema::TYPE_INTEGER.'(11)',
37 37
             'FOREIGN KEY ([[media_id]]) REFERENCES {{%media}} ([[id]]) ON DELETE CASCADE ON UPDATE CASCADE',
38 38
         ], $tableOptions);
39 39
     }
Please login to merge, or discard this patch.
console/config/main.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <?php
2 2
 $params = array_merge(
3
-    require(__DIR__ . '/../../common/config/params.php'),
4
-    require(__DIR__ . '/../../common/config/params-local.php'),
5
-    require(__DIR__ . '/params.php'),
6
-    require(__DIR__ . '/params-local.php')
3
+    require(__DIR__.'/../../common/config/params.php'),
4
+    require(__DIR__.'/../../common/config/params-local.php'),
5
+    require(__DIR__.'/params.php'),
6
+    require(__DIR__.'/params-local.php')
7 7
 );
8 8
 
9 9
 return [
Please login to merge, or discard this patch.
backend/controllers/TermController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,13 +75,13 @@
 block discarded – undo
75 75
                     if ($termRelationship->save()) {
76 76
                         $item = $item
77 77
                             . '<br />'
78
-                            . Html::label(Html::checkbox('termIds[]', true, ['value' => $term->id]) . $term->name);
78
+                            . Html::label(Html::checkbox('termIds[]', true, ['value' => $term->id]).$term->name);
79 79
                     }
80 80
                 }
81 81
             } elseif ($term->save()) {
82 82
                 $item = $item
83 83
                     . '<br />'
84
-                    . Html::label(Html::checkbox('termIds[]', true, ['value' => $term->id]) . $term->name);
84
+                    . Html::label(Html::checkbox('termIds[]', true, ['value' => $term->id]).$term->name);
85 85
             }
86 86
         }
87 87
 
Please login to merge, or discard this patch.
backend/controllers/ModuleController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         }
95 95
 
96 96
         if (($model->file = UploadedFile::getInstance($model, 'file')) && $model->validate(['file'])) {
97
-            $tmpPath = $this->_tmp . $model->file->name;
97
+            $tmpPath = $this->_tmp.$model->file->name;
98 98
 
99 99
             if (!$model->file->saveAs($tmpPath)) {
100 100
                 return $this->render('create', [
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             $baseDir = substr($zipArchive->getNameIndex(0), 0, strpos($zipArchive->getNameIndex(0), '/'));
120 120
             $zipArchive->close();
121 121
             unlink($tmpPath);
122
-            $configPath = $this->_tmp . $baseDir . '/config/main.php';
122
+            $configPath = $this->_tmp.$baseDir.'/config/main.php';
123 123
 
124 124
             if (!is_file($configPath)) {
125 125
                 FileHelper::removeDirectory($this->_tmp);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             $model->setAttributes(['directory' => $baseDir, 'status' => Module::STATUS_NOT_ACTIVE]);
136 136
 
137 137
             if ($model->validate(['directory'])) {
138
-                rename($this->_tmp . $baseDir, $this->_dir . $baseDir);
138
+                rename($this->_tmp.$baseDir, $this->_dir.$baseDir);
139 139
             }
140 140
 
141 141
             FileHelper::removeDirectory($this->_tmp);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                 return $this->redirect(['index']);
161 161
             } else {
162 162
                 if (!$model->hasErrors('directory')) {
163
-                    FileHelper::removeDirectory($this->_dir . $baseDir);
163
+                    FileHelper::removeDirectory($this->_dir.$baseDir);
164 164
                 }
165 165
 
166 166
                 $errors = ArrayHelper::merge($errors, $model->getFirstErrors());
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     public function actionDelete($id)
220 220
     {
221 221
         $model = $this->findModel($id);
222
-        $path = Yii::getAlias($this->_dir . $model->directory);
222
+        $path = Yii::getAlias($this->_dir.$model->directory);
223 223
 
224 224
         // Delete module and its directory
225 225
         if ($model->delete()) {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         } elseif (Yii::$app->request->post('action') === 'deleted') {
248 248
             foreach (Yii::$app->request->post('ids', []) as $id) {
249 249
                 $model = $this->findModel($id);
250
-                $path = Yii::getAlias($this->_dir . $model->directory);
250
+                $path = Yii::getAlias($this->_dir.$model->directory);
251 251
                 if ($model->delete()) {
252 252
                     FileHelper::removeDirectory($path);
253 253
                 }
Please login to merge, or discard this patch.
backend/controllers/WidgetController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         foreach (scandir($this->_dir) as $widget) {
92
-            if (is_dir($this->_dir . $widget) && $widget !== '.' && $widget !== '..') {
93
-                $configPath = $this->_dir . $widget . '/config/main.php';
92
+            if (is_dir($this->_dir.$widget) && $widget !== '.' && $widget !== '..') {
93
+                $configPath = $this->_dir.$widget.'/config/main.php';
94 94
                 if (is_file($configPath)) {
95 95
                     $config = require($configPath);
96 96
                     $config['directory'] = $widget;
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         }
138 138
 
139 139
         if (($model->file = UploadedFile::getInstance($model, 'file')) && $model->validate(['file'])) {
140
-            $tmpPath = $this->_tmp . $model->file->name;
140
+            $tmpPath = $this->_tmp.$model->file->name;
141 141
 
142 142
             if (!$model->file->saveAs($tmpPath)) {
143 143
                 return $this->render('create', [
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
             $baseDir = substr($zipArchive->getNameIndex(0), 0, strpos($zipArchive->getNameIndex(0), '/'));
163 163
             $zipArchive->close();
164
-            $configPath = $this->_tmp . $baseDir . '/config/main.php';
164
+            $configPath = $this->_tmp.$baseDir.'/config/main.php';
165 165
 
166 166
             if (!is_file($configPath)) {
167 167
                 FileHelper::removeDirectory($this->_tmp);
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
 
175 175
             $config = require($configPath);
176 176
 
177
-            if (is_dir($this->_dir . $baseDir)) {
177
+            if (is_dir($this->_dir.$baseDir)) {
178 178
                 $errors['dirExist'] = Yii::t('writesdown', 'Widget with the same directory already exist.');
179 179
             } else {
180
-                rename($this->_tmp . $baseDir, $this->_dir . $baseDir);
180
+                rename($this->_tmp.$baseDir, $this->_dir.$baseDir);
181 181
             }
182 182
 
183 183
             FileHelper::removeDirectory($this->_tmp);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
                 return $this->redirect(['index']);
195 195
             } else {
196 196
                 if (!$errors['dirExist']) {
197
-                    FileHelper::removeDirectory($this->_dir . $baseDir);
197
+                    FileHelper::removeDirectory($this->_dir.$baseDir);
198 198
                 }
199 199
 
200 200
                 $errors = ArrayHelper::merge($errors, $model->getFirstErrors());
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      */
217 217
     public function actionDelete($id)
218 218
     {
219
-        FileHelper::removeDirectory($this->_dir . $id);
219
+        FileHelper::removeDirectory($this->_dir.$id);
220 220
         Widget::deleteAll(['directory' => $id]);
221 221
 
222 222
         return $this->redirect(['index']);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     {
234 234
         $model = new Widget(['scenario' => 'activate']);
235 235
         if ($model->load(Yii::$app->request->post())) {
236
-            $configPath = $this->_dir . $id . '/config/main.php';
236
+            $configPath = $this->_dir.$id.'/config/main.php';
237 237
             $config = require($configPath);
238 238
 
239 239
             // Set attribute of model
Please login to merge, or discard this patch.
backend/controllers/SettingController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
             return $this->redirect(['group', 'id' => $id]);
158 158
         }
159 159
 
160
-        if (is_file($this->getViewPath() . '/' . strtolower($id) . '.php')) {
160
+        if (is_file($this->getViewPath().'/'.strtolower($id).'.php')) {
161 161
             return $this->render(strtolower($id), [
162 162
                 'model' => (object)$model,
163 163
                 'group' => $id,
Please login to merge, or discard this patch.
backend/controllers/TaxonomyController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
 
230 230
         if ($model->load(Yii::$app->request->post()) && $model->save()) {
231 231
             return '<br />'
232
-            . Html::label(Html::checkbox('taxonomy_ids[]', true, ['value' => $model->id]) . ' ' . $model->name);
232
+            . Html::label(Html::checkbox('taxonomy_ids[]', true, ['value' => $model->id]).' '.$model->name);
233 233
         }
234 234
 
235 235
         return '';
Please login to merge, or discard this patch.