Completed
Push — master ( fb7a26...d5e2d7 )
by Agiel Kurniawan
04:29
created
common/models/search/MediaComment.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     {
52 52
         $query = MediaCommentModel::find();
53 53
         $query->innerJoinWith([
54
-            'commentMedia' => function ($query) {
54
+            'commentMedia' => function($query) {
55 55
                 /* @var $query \yii\db\ActiveQuery */
56 56
                 return $query->from(['media' => Media::tableName()]);
57 57
             },
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 namespace common\models\search;
9 9
 
10 10
 use common\models\PostComment as PostCommentModel;
11
-use Yii;
12 11
 use yii\base\Model;
13 12
 use yii\data\ActiveDataProvider;
14 13
 
Please login to merge, or discard this patch.
frontend/views/layouts/main.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,11 @@
 block discarded – undo
65 65
 
66 66
         <?php if (Yii::$app->controller->route == 'site/index'): ?>
67 67
             <h1 id="site-title" class="site-title"><?= Option::get('sitetitle'); ?></h1>
68
-        <?php else: ?>
69
-            <span id="site-title" class="h1 site-title"><?= Option::get('sitetitle'); ?></span>
68
+        <?php else {
69
+    : ?>
70
+            <span id="site-title" class="h1 site-title"><?= Option::get('sitetitle');
71
+}
72
+?></span>
70 73
         <?php endif ?>
71 74
 
72 75
         <span id="site-tagline" class="h3 site-tagline"><?= Option::get('tagline'); ?></span>
Please login to merge, or discard this patch.
frontend/views/post-comment/_form.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,8 @@  discard block
 block discarded – undo
35 35
             ]) ?>
36 36
 
37 37
         </p>
38
-    <?php else: ?>
38
+    <?php else {
39
+    : ?>
39 40
         <p>
40 41
             <?= Html::a('<strong>' . Yii::t('writesdown', 'Cancel Reply') . '</strong>', '#', [
41 42
                 'id' => 'cancel-reply',
@@ -44,7 +45,9 @@  discard block
 block discarded – undo
44 45
             ]) ?>
45 46
 
46 47
         </p>
47
-    <?php endif; ?>
48
+    <?php endif;
49
+}
50
+?>
48 51
 
49 52
     <?php $form = ActiveForm::begin() ?>
50 53
 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
     <?php if (!Yii::$app->user->isGuest): ?>
22 22
         <p>
23 23
             <?= Yii::t('writesdown', 'Login as {username}, {logout}{cancelReply}', [
24
-                'username' => '<strong>' . Yii::$app->user->identity->username . '</strong>',
24
+                'username' => '<strong>'.Yii::$app->user->identity->username.'</strong>',
25 25
                 'logout' => Html::a(
26 26
                     Yii::t('writesdown', '<strong>Sign Out</strong>'),
27 27
                     ['/site/logout'],
28 28
                     ['data-method' => 'post']
29 29
                 ),
30
-                'cancelReply' => Html::a('<strong>' . Yii::t('writesdown', ', Cancel Reply') . '</strong>', '#', [
30
+                'cancelReply' => Html::a('<strong>'.Yii::t('writesdown', ', Cancel Reply').'</strong>', '#', [
31 31
                     'id' => 'cancel-reply',
32 32
                     'class' => 'cancel-reply',
33 33
                     'style' => 'display:none;',
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         </p>
38 38
     <?php else: ?>
39 39
         <p>
40
-            <?= Html::a('<strong>' . Yii::t('writesdown', 'Cancel Reply') . '</strong>', '#', [
40
+            <?= Html::a('<strong>'.Yii::t('writesdown', 'Cancel Reply').'</strong>', '#', [
41 41
                 'id' => 'cancel-reply',
42 42
                 'class' => 'cancel-reply',
43 43
                 'style' => 'display:none;',
Please login to merge, or discard this patch.
modules/sitemap/backend/views/default/_media.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
21 21
         <label>
22 22
             <?php
23 23
             $checked = isset($option['media']['enable']) && $option['media']['enable'] ?
24
-                true :
25
-                false;
24
+                true : false;
26 25
             ?>
27 26
             <?= Html::checkbox("Option[option_value][media][enable]", $checked, ['value' => 1]) ?>
28 27
 
Please login to merge, or discard this patch.
backend/controllers/MediaController.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     /**
59 59
      * Lists all User models.
60 60
      *
61
-     * @return mixed
61
+     * @return string
62 62
      */
63 63
     public function actionIndex()
64 64
     {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * Displays a single User model.
76 76
      *
77 77
      * @param integer $id
78
-     * @return mixed
78
+     * @return string
79 79
      */
80 80
     public function actionView($id)
81 81
     {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      * @throws \Exception
145 145
      * @throws \yii\web\ForbiddenHttpException
146 146
      * @throws \yii\web\NotFoundHttpException
147
-     * @return mixed
147
+     * @return \yii\web\Response
148 148
      */
149 149
     public function actionDelete($id)
150 150
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
             ],
182 182
         ];
183 183
 
184
-        if($userVersions = ArrayHelper::getValue(Yii::$app->params, 'media.versions', [])){
184
+        if ($userVersions = ArrayHelper::getValue(Yii::$app->params, 'media.versions', [])) {
185 185
             $versions = ArrayHelper::merge($versions, $userVersions);
186 186
         }
187 187
 
Please login to merge, or discard this patch.
backend/controllers/ModuleController.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     /**
59 59
      * Lists all User models.
60 60
      *
61
-     * @return mixed
61
+     * @return string
62 62
      */
63 63
     public function actionIndex()
64 64
     {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * Displays a single User model.
76 76
      *
77 77
      * @param integer $id
78
-     * @return mixed
78
+     * @return string
79 79
      */
80 80
     public function actionView($id)
81 81
     {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      * @throws \Exception
145 145
      * @throws \yii\web\ForbiddenHttpException
146 146
      * @throws \yii\web\NotFoundHttpException
147
-     * @return mixed
147
+     * @return \yii\web\Response
148 148
      */
149 149
     public function actionDelete($id)
150 150
     {
Please login to merge, or discard this 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/PostTypeController.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     /**
59 59
      * Lists all User models.
60 60
      *
61
-     * @return mixed
61
+     * @return string
62 62
      */
63 63
     public function actionIndex()
64 64
     {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * Displays a single User model.
76 76
      *
77 77
      * @param integer $id
78
-     * @return mixed
78
+     * @return string
79 79
      */
80 80
     public function actionView($id)
81 81
     {
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      * @throws \Exception
145 145
      * @throws \yii\web\ForbiddenHttpException
146 146
      * @throws \yii\web\NotFoundHttpException
147
-     * @return mixed
147
+     * @return \yii\web\Response
148 148
      */
149 149
     public function actionDelete($id)
150 150
     {
Please login to merge, or discard this patch.
backend/widgets/RenderMenu.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 namespace common\models\search;
9 9
 
10 10
 use common\models\PostComment as PostCommentModel;
11
-use Yii;
12 11
 use yii\base\Model;
13 12
 use yii\data\ActiveDataProvider;
14 13
 
Please login to merge, or discard this patch.
common/models/ResetPasswordForm.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 namespace common\models\search;
9 9
 
10 10
 use common\models\PostComment as PostCommentModel;
11
-use Yii;
12 11
 use yii\base\Model;
13 12
 use yii\data\ActiveDataProvider;
14 13
 
Please login to merge, or discard this patch.