x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.
Completed
Push — master ( dbd591...5a5033 )
by Pavel
02:48
created
src/SortAction.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,14 +52,14 @@  discard block
 block discarded – undo
52 52
             Yii::$app->response->format = Response::FORMAT_JSON;
53 53
         }
54 54
         if (empty($this->modelClass) || !class_exists($this->modelClass)) {
55
-            throw new InvalidParamException('Define model class name for action ' . $this->controller->id . '::' . $this->id);
55
+            throw new InvalidParamException('Define model class name for action '.$this->controller->id.'::'.$this->id);
56 56
         }
57 57
         /** @var ActiveRecord $class */
58 58
         $class = $this->modelClass;
59 59
         /** @var SortableBehavior|ActiveRecord $model */
60 60
         $model = $class::findOne($id);
61 61
         if (!$model) {
62
-            throw new HttpException(404, 'Model `' . $this->modelClass . '` to change sort not found');
62
+            throw new HttpException(404, 'Model `'.$this->modelClass.'` to change sort not found');
63 63
         }
64 64
         switch ($position) {
65 65
             case 'top':
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             default:
74 74
                 if (strpos('ud-', $position[0]) !== false) {
75 75
                     // relative position
76
-                    $position = ($position[0] == 'u' ? '' : '-') . substr($position, 1);
76
+                    $position = ($position[0] == 'u' ? '' : '-').substr($position, 1);
77 77
                     if (is_numeric($position)) {
78 78
                         $model->sortChange($position);
79 79
                     }
Please login to merge, or discard this patch.