Passed
Push — master ( cafe2d...62400b )
by Aleksandr
02:35
created
src/actions/UpdateAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,6 @@
 block discarded – undo
30 30
             }
31 31
             Yii::$app->session->setFlash('error', Html::errorSummary($model));
32 32
         }
33
-        return $this->controller->render($this->controller->updateView ?: 'update', ['model' => $model]);
33
+        return $this->controller->render($this->controller->updateView ?: 'update', [ 'model' => $model ]);
34 34
     }
35 35
 }
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
src/actions/DeleteAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,6 +29,6 @@
 block discarded – undo
29 29
             return Yii::$app->response->redirect(Yii::$app->request->referrer, 302, false);
30 30
         }
31 31
 
32
-        return $this->controller->redirect(['index']);
32
+        return $this->controller->redirect([ 'index' ]);
33 33
     }
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
src/actions/DeleteBatch.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
     public function run()
18 18
     {
19 19
         $ids = (array)Yii::$app->request->post('ids');
20
-        $errors = [];
20
+        $errors = [ ];
21 21
         foreach ($ids as $id) {
22
-            $this->controller->runAction('delete', ['id' => $id]);
22
+            $this->controller->runAction('delete', [ 'id' => $id ]);
23 23
             if (Yii::$app->session->hasFlash('error')) {
24
-                $errors[] = Yii::$app->session->getFlash('error');
24
+                $errors[ ] = Yii::$app->session->getFlash('error');
25 25
             }
26 26
         }
27 27
         if ($errors) {
@@ -32,6 +32,6 @@  discard block
 block discarded – undo
32 32
             return Yii::$app->response->redirect(Yii::$app->request->referrer, 302, false);
33 33
         }
34 34
 
35
-        return $this->controller->redirect(['index']);
35
+        return $this->controller->redirect([ 'index' ]);
36 36
     }
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
src/actions/CreateAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
             }
35 35
             Yii::$app->session->setFlash('error', Html::errorSummary($model));
36 36
         }
37
-        return $this->controller->render('create', ['model' => $model]);
37
+        return $this->controller->render('create', [ 'model' => $model ]);
38 38
     }
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
src/CrudController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
          * @var ActiveRecord $class
62 62
          */
63 63
         $class = $class ?? $this->modelClass;
64
-        $query = $this->getModelQuery($class)->andWhere(['id' => (int)$id]);
64
+        $query = $this->getModelQuery($class)->andWhere([ 'id' => (int)$id ]);
65 65
         $this->findModelCondition($query);
66 66
         if (($model = $query->one()) !== null) {
67 67
             return $model;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                 ]
88 88
             ],
89 89
         ];
90
-        return new ActiveDataProvider(array_merge(['query' => $query], $options));
90
+        return new ActiveDataProvider(array_merge([ 'query' => $query ], $options));
91 91
     }
92 92
 
93 93
     /**
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
             'verbs' => [
100 100
                 'class' => VerbFilter::class,
101 101
                 'actions' => [
102
-                    'delete' => ['POST'],
103
-                    'delete-batch' => ['POST']
102
+                    'delete' => [ 'POST' ],
103
+                    'delete-batch' => [ 'POST' ]
104 104
                 ],
105 105
             ],
106 106
         ]);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     public function actionView($id)
146 146
     {
147 147
         if (Yii::$app->request->isPost) {
148
-            return $this->runAction('update', ['id' => $this->id]);
148
+            return $this->runAction('update', [ 'id' => $this->id ]);
149 149
         }
150 150
         return $this->render('view', [
151 151
             'model' => $this->findModel($id),
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public function createRedirect($model): array
167 167
     {
168
-        return ['index'];
168
+        return [ 'index' ];
169 169
     }
170 170
 
171 171
     /**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function updateRedirect($model): array
176 176
     {
177
-        return ['index'];
177
+        return [ 'index' ];
178 178
     }
179 179
 
180 180
     /**
Please login to merge, or discard this patch.