Passed
Branch master (be24eb)
by Agiel Kurniawan
11:45
created
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 backend\widgets;
9 9
 
10 10
 use common\models\MenuItem;
11
-use Yii;
12 11
 use yii\base\Widget;
13 12
 use yii\helpers\Html;
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
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 
8 8
 namespace common\models;
9 9
 
10
-use Yii;
11 10
 use yii\base\InvalidParamException;
12 11
 use yii\base\Model;
13 12
 
Please login to merge, or discard this patch.
common/models/search/MediaComment.php 2 patches
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\MediaComment as MediaCommentModel;
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.
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.
common/models/search/Post.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\Post as PostModel;
11
-use Yii;
12 11
 use yii\base\Model;
13 12
 use yii\data\ActiveDataProvider;
14 13
 use yii\helpers\ArrayHelper;
Please login to merge, or discard this patch.
common/models/search/PostComment.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $query = PostCommentModel::find();
55 55
 
56 56
         $query->innerJoinWith([
57
-            'commentPost' => function ($query) {
57
+            'commentPost' => function($query) {
58 58
                 /* @var $query \yii\db\ActiveQuery */
59 59
                 return $query->from(['post' => Post::tableName()]);
60 60
             },
Please login to merge, or discard this patch.
backend/controllers/SiteController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
                     [
61 61
                         'actions' => ['signup'],
62 62
                         'allow' => true,
63
-                        'matchCallback' => function () {
63
+                        'matchCallback' => function() {
64 64
                             return Option::get('allow_signup') && Yii::$app->user->isGuest;
65 65
                         },
66 66
                     ],
Please login to merge, or discard this patch.
backend/views/media-comment/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             [
68 68
                 'attribute' => 'content',
69 69
                 'format' => 'html',
70
-                'value' => function ($model) {
70
+                'value' => function($model) {
71 71
                     return substr(strip_tags($model->content), 0, 150) . '...';
72 72
                 },
73 73
             ],
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
                 'class' => 'yii\grid\ActionColumn',
81 81
                 'template' => Yii::$app->user->can('editor') ? '{view} {update} {delete} {reply}' : '{view}',
82 82
                 'buttons' => [
83
-                    'view' => function ($url, $model) {
83
+                    'view' => function($url, $model) {
84 84
                         return Html::a('<span class="glyphicon glyphicon-eye-open"></span>',
85 85
                             $model->commentMedia->url . '#comment' . $model->id, [
86 86
                                 'title' => Yii::t('yii', 'View'),
87 87
                                 'data-pjax' => '0',
88 88
                             ]);
89 89
                     },
90
-                    'reply' => function ($url, $model) {
90
+                    'reply' => function($url, $model) {
91 91
                         return Html::a('<span class="glyphicon glyphicon-share-alt"></span>', [
92 92
                             'reply',
93 93
                             'id' => $model->id,
Please login to merge, or discard this patch.
backend/views/media/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         'columns' => [
51 51
             [
52 52
                 'class' => 'yii\grid\CheckboxColumn',
53
-                'checkboxOptions' => function ($model) {
53
+                'checkboxOptions' => function($model) {
54 54
                     if (!Yii::$app->user->can('editor') && $model->author !== Yii::$app->user->id) {
55 55
                         return ['disabled' => 'disabled'];
56 56
                     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             [
62 62
                 'attribute' => Yii::t('writesdown', 'Preview'),
63 63
                 'format' => 'raw',
64
-                'value' => function ($model) {
64
+                'value' => function($model) {
65 65
                     /* @var $model common\models\Media */
66 66
                     $metadata = $model->getMeta('metadata');
67 67
                     if (preg_match('/^image\//', $model->mime_type)) {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             [
81 81
                 'label' => Yii::t('writesdown', 'File Name'),
82 82
                 'format' => 'html',
83
-                'value' => function ($model) {
83
+                'value' => function($model) {
84 84
                     /* @var $model common\models\Media */
85 85
                     $metadata = $model->getMeta('metadata');
86 86
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             ],
90 90
             [
91 91
                 'attribute' => 'username',
92
-                'value' => function ($model) {
92
+                'value' => function($model) {
93 93
                     return $model->mediaAuthor->username;
94 94
                 },
95 95
             ],
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
             [
99 99
                 'class' => 'yii\grid\ActionColumn',
100 100
                 'buttons' => [
101
-                    'view' => function ($url, $model) {
101
+                    'view' => function($url, $model) {
102 102
                         return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', $model->url, [
103 103
                             'title' => Yii::t('yii', 'View'),
104 104
                             'data-pjax' => '0',
105 105
                         ]);
106 106
                     },
107
-                    'update' => function ($url, $model) {
107
+                    'update' => function($url, $model) {
108 108
                         if (!Yii::$app->user->can('editor') && $model->author !== Yii::$app->user->id) {
109 109
                             return '';
110 110
                         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                             'data-pjax' => '0',
115 115
                         ]);
116 116
                     },
117
-                    'delete' => function ($url, $model) {
117
+                    'delete' => function($url, $model) {
118 118
                         if (!Yii::$app->user->can('editor') && $model->author !== Yii::$app->user->id) {
119 119
                             return '';
120 120
                         }
Please login to merge, or discard this patch.
backend/views/module/_config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
  * @param $type    string
22 22
  * @param $oldKey  null|array
23 23
  */
24
-$renderConfig = function ($form, $model, $config, $type, $oldKey = null) use (&$renderConfig) {
24
+$renderConfig = function($form, $model, $config, $type, $oldKey = null) use (&$renderConfig) {
25 25
     echo '<ul>';
26 26
 
27 27
     foreach ($config as $key => $value) {
Please login to merge, or discard this patch.