Completed
Push — master ( 3ac3d9...807735 )
by Igor
02:48
created
views/permission/view.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                         'class' => 'role-search form-control',
49 49
                         'data-target' => 'available',
50 50
                         'placeholder' => 'Search:'
51
-                    ]) . '<br>';
51
+                    ]).'<br>';
52 52
                 echo Html::listBox('roles', '', $available, [
53 53
                     'id' => 'available',
54 54
                     'multiple' => true,
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                         'class' => 'role-search form-control',
80 80
                         'data-target' => 'assigned',
81 81
                         'placeholder' => 'Search:'
82
-                    ]) . '<br>';
82
+                    ]).'<br>';
83 83
                 echo Html::listBox('roles', '', $assigned, [
84 84
                     'id' => 'assigned',
85 85
                     'multiple' => true,
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
     </div>
94 94
 <?php
95 95
 $this->registerJs("rbac.init({
96
-        name: " . json_encode($model->name) . ",
97
-        route: '" . Url::toRoute(['role-search']) . "',
98
-        routeAssign: '" . Url::toRoute(['assign', 'id' => $model->name, 'action' => 'assign']) . "',
99
-        routeDelete: '" . Url::toRoute(['assign', 'id' => $model->name, 'action' => 'delete']) . "',
100
-        routeSearch: '" . Url::toRoute(['route-search']) . "',
96
+        name: " . json_encode($model->name).",
97
+        route: '" . Url::toRoute(['role-search'])."',
98
+        routeAssign: '" . Url::toRoute(['assign', 'id' => $model->name, 'action' => 'assign'])."',
99
+        routeDelete: '" . Url::toRoute(['assign', 'id' => $model->name, 'action' => 'delete'])."',
100
+        routeSearch: '" . Url::toRoute(['route-search'])."',
101 101
     });", yii\web\View::POS_READY);
102 102
 
Please login to merge, or discard this patch.
views/permission/update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @var yii\web\View                 $this
7 7
  * @var yii2mod\rbac\models\AuthItem $model
8 8
  */
9
-$this->title = 'Update Permission: ' . $model->name;
9
+$this->title = 'Update Permission: '.$model->name;
10 10
 $this->params['breadcrumbs'][] = [
11 11
     'label' => 'Permissions',
12 12
     'url' => ['index']
Please login to merge, or discard this patch.
views/rule/update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @var yii\web\View $this
7 7
  * @var yii2mod\rbac\models\AuthItem $model
8 8
  */
9
-$this->title = 'Update BizRule: ' . $model->name;
9
+$this->title = 'Update BizRule: '.$model->name;
10 10
 $this->params['breadcrumbs'][] = [
11 11
     'label' => 'BizRules',
12 12
     'url' => ['index']
Please login to merge, or discard this patch.
views/rule/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
             ['class' => 'yii\grid\SerialColumn'],
31 31
             'name',
32 32
             'expression:ntext',
33
-            ['class' => 'yii\grid\ActionColumn',],
33
+            ['class' => 'yii\grid\ActionColumn', ],
34 34
         ],
35 35
     ]);
36 36
     ?>
Please login to merge, or discard this patch.
models/search/AuthItemSearch.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
         if ($this->load($params) && $this->validate() && (trim($this->name) !== '' || trim($this->description) !== '')) {
94 94
             $search = strtolower(trim($this->name));
95 95
             $desc = strtolower(trim($this->description));
96
-            $items = array_filter($items, function ($item) use ($search, $desc) {
96
+            $items = array_filter($items, function($item) use ($search, $desc) {
97 97
                 return (empty($search) || strpos(strtolower($item->name), $search) !== false) && (empty($desc) || strpos(strtolower($item->description), $desc) !== false);
98 98
             });
99 99
         }
Please login to merge, or discard this patch.
models/AuthItemModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $this->_item = $item;
63 63
         if ($item !== null) {
64 64
             $this->name = $item->name;
65
-            $this->type = (int)$item->type;
65
+            $this->type = (int) $item->type;
66 66
             $this->description = $item->description;
67 67
             $this->ruleName = $item->ruleName;
68 68
             $this->data = $item->data === null ? null : VarDumper::export($item->data);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             $this->_item->name = $this->name;
181 181
             $this->_item->description = $this->description;
182 182
             $this->_item->ruleName = $this->ruleName;
183
-            $this->_item->data = $this->data === null || $this->data === '' ? null : @eval('return ' . $this->data . ';');
183
+            $this->_item->data = $this->data === null || $this->data === '' ? null : @eval('return '.$this->data.';');
184 184
             if ($isNew) {
185 185
                 $manager->add($this->_item);
186 186
             } else {
Please login to merge, or discard this patch.
models/RouteModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     {
41 41
         $manager = \Yii::$app->getAuthManager();
42 42
         foreach ($routes as $route) {
43
-            $manager->add($manager->createPermission('/' . trim($route, ' /')));
43
+            $manager->add($manager->createPermission('/'.trim($route, ' /')));
44 44
         }
45 45
         return true;
46 46
     }
Please login to merge, or discard this patch.
controllers/RoleController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             Yii::$app->session->setFlash('success', 'Role has been saved.');
114 114
             return $this->redirect(['view', 'id' => $model->name]);
115 115
         } else {
116
-            return $this->render('create', ['model' => $model,]);
116
+            return $this->render('create', ['model' => $model, ]);
117 117
         }
118 118
     }
119 119
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             Yii::$app->session->setFlash('success', 'Role has been saved.');
133 133
             return $this->redirect(['view', 'id' => $model->name]);
134 134
         }
135
-        return $this->render('update', ['model' => $model,]);
135
+        return $this->render('update', ['model' => $model, ]);
136 136
     }
137 137
 
138 138
     /**
Please login to merge, or discard this patch.
controllers/RuleController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             Yii::$app->session->setFlash('success', 'Rule has been saved.');
76 76
             return $this->redirect(['view', 'id' => $model->name]);
77 77
         } else {
78
-            return $this->render('create', ['model' => $model,]);
78
+            return $this->render('create', ['model' => $model, ]);
79 79
         }
80 80
     }
81 81
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             Yii::$app->session->setFlash('success', 'Rule has been saved.');
95 95
             return $this->redirect(['view', 'id' => $model->name]);
96 96
         }
97
-        return $this->render('update', ['model' => $model,]);
97
+        return $this->render('update', ['model' => $model, ]);
98 98
     }
99 99
 
100 100
     /**
Please login to merge, or discard this patch.