Passed
Pull Request — master (#400)
by
unknown
02:08
created
views/rule/update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 /* @var $this  yii\web\View */
6 6
 /* @var $model mdm\admin\models\BizRule */
7 7
 
8
-$this->title = Yii::t('rbac-admin', 'Update Rule') . ': ' . $model->name;
8
+$this->title = Yii::t('rbac-admin', 'Update Rule').': '.$model->name;
9 9
 $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Rules'), 'url' => ['index']];
10 10
 $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->name]];
11 11
 $this->params['breadcrumbs'][] = Yii::t('rbac-admin', 'Update');
Please login to merge, or discard this patch.
views/item/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 <div class="role-index">
22 22
     <h1><?= Html::encode($this->title) ?></h1>
23 23
     <p>
24
-        <?= Html::a(Yii::t('rbac-admin', 'Create ' . $labels['Item']), ['create'], ['class' => 'btn btn-success']) ?>
24
+        <?= Html::a(Yii::t('rbac-admin', 'Create '.$labels['Item']), ['create'], ['class' => 'btn btn-success']) ?>
25 25
     </p>
26 26
     <?=
27 27
     GridView::widget([
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
                 'attribute' => 'description',
43 43
                 'label' => Yii::t('rbac-admin', 'Description'),
44 44
             ],
45
-            ['class' => 'yii\grid\ActionColumn',],
45
+            ['class' => 'yii\grid\ActionColumn', ],
46 46
         ],
47 47
     ])
48 48
     ?>
Please login to merge, or discard this patch.
views/item/update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 $context = $this->context;
10 10
 $labels = $context->labels();
11
-$this->title = Yii::t('rbac-admin', 'Update ' . $labels['Item']) . ': ' . $model->name;
11
+$this->title = Yii::t('rbac-admin', 'Update '.$labels['Item']).': '.$model->name;
12 12
 $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', $labels['Items']), 'url' => ['index']];
13 13
 $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->name]];
14 14
 $this->params['breadcrumbs'][] = Yii::t('rbac-admin', 'Update');
Please login to merge, or discard this patch.
views/item/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 $context = $this->context;
10 10
 $labels = $context->labels();
11
-$this->title = Yii::t('rbac-admin', 'Create ' . $labels['Item']);
11
+$this->title = Yii::t('rbac-admin', 'Create '.$labels['Item']);
12 12
 $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', $labels['Items']), 'url' => ['index']];
13 13
 $this->params['breadcrumbs'][] = $this->title;
14 14
 ?>
Please login to merge, or discard this patch.
views/menu/update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 /* @var $this yii\web\View */
6 6
 /* @var $model mdm\admin\models\Menu */
7 7
 
8
-$this->title = Yii::t('rbac-admin', 'Update Menu') . ': ' . ' ' . $model->name;
8
+$this->title = Yii::t('rbac-admin', 'Update Menu').': '.' '.$model->name;
9 9
 $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Menus'), 'url' => ['index']];
10 10
 $this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
11 11
 $this->params['breadcrumbs'][] = Yii::t('rbac-admin', 'Update');
Please login to merge, or discard this patch.
views/layouts/right-menu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
                 $label = Html::tag('span', Html::encode($menu['label']), []);
26 26
                 $active = $menu['active'] ? ' active' : '';
27 27
                 echo Html::a($label, $menu['url'], [
28
-                    'class' => 'list-group-item' . $active,
28
+                    'class' => 'list-group-item'.$active,
29 29
                 ]);
30 30
             }
31 31
             ?>
Please login to merge, or discard this patch.
views/assignment/view.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
 
13 13
 $userName = $model->{$usernameField};
14 14
 if (!empty($fullnameField)) {
15
-    $userName .= ' (' . ArrayHelper::getValue($model, $fullnameField) . ')';
15
+    $userName .= ' ('.ArrayHelper::getValue($model, $fullnameField).')';
16 16
 }
17 17
 $userName = Html::encode($userName);
18 18
 
19
-$this->title = Yii::t('rbac-admin', 'Assignment') . ' : ' . $userName;
19
+$this->title = Yii::t('rbac-admin', 'Assignment').' : '.$userName;
20 20
 
21 21
 $this->params['breadcrumbs'][] = ['label' => Yii::t('rbac-admin', 'Assignments'), 'url' => ['index']];
22 22
 $this->params['breadcrumbs'][] = $userName;
@@ -31,31 +31,31 @@  discard block
 block discarded – undo
31 31
 $animateIcon = ' <i class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></i>';
32 32
 ?>
33 33
 <div class="assignment-index">
34
-    <h1><?=$this->title;?></h1>
34
+    <h1><?=$this->title; ?></h1>
35 35
 
36 36
     <div class="row">
37 37
         <div class="col-sm-5">
38 38
             <input class="form-control search" data-target="available"
39
-                   placeholder="<?=Yii::t('rbac-admin', 'Search for available');?>">
39
+                   placeholder="<?=Yii::t('rbac-admin', 'Search for available'); ?>">
40 40
             <select multiple size="20" class="form-control list" data-target="available">
41 41
             </select>
42 42
         </div>
43 43
         <div class="col-sm-1">
44 44
             <br><br>
45
-            <?=Html::a('&gt;&gt;' . $animateIcon, ['assign', 'id' => (string) $model->id], [
45
+            <?=Html::a('&gt;&gt;'.$animateIcon, ['assign', 'id' => (string)$model->id], [
46 46
     'class' => 'btn btn-success btn-assign',
47 47
     'data-target' => 'available',
48 48
     'title' => Yii::t('rbac-admin', 'Assign'),
49
-]);?><br><br>
50
-            <?=Html::a('&lt;&lt;' . $animateIcon, ['revoke', 'id' => (string) $model->id], [
49
+]); ?><br><br>
50
+            <?=Html::a('&lt;&lt;'.$animateIcon, ['revoke', 'id' => (string)$model->id], [
51 51
     'class' => 'btn btn-danger btn-assign',
52 52
     'data-target' => 'assigned',
53 53
     'title' => Yii::t('rbac-admin', 'Remove'),
54
-]);?>
54
+]); ?>
55 55
         </div>
56 56
         <div class="col-sm-5">
57 57
             <input class="form-control search" data-target="assigned"
58
-                   placeholder="<?=Yii::t('rbac-admin', 'Search for assigned');?>">
58
+                   placeholder="<?=Yii::t('rbac-admin', 'Search for assigned'); ?>">
59 59
             <select multiple size="20" class="form-control list" data-target="assigned">
60 60
             </select>
61 61
         </div>
Please login to merge, or discard this patch.
views/route/index.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
 $this->registerJs($this->render('_script.js'));
21 21
 $animateIcon = ' <i class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></i>';
22 22
 ?>
23
-<h1><?=Html::encode($this->title);?></h1>
23
+<h1><?=Html::encode($this->title); ?></h1>
24 24
 <div class="row">
25 25
     <div class="col-sm-11">
26 26
         <div class="input-group">
27 27
             <input id="inp-route" type="text" class="form-control"
28
-                   placeholder="<?=Yii::t('rbac-admin', 'New route(s)');?>">
28
+                   placeholder="<?=Yii::t('rbac-admin', 'New route(s)'); ?>">
29 29
             <span class="input-group-btn">
30
-                <?=Html::a(Yii::t('rbac-admin', 'Add') . $animateIcon, ['create'], [
30
+                <?=Html::a(Yii::t('rbac-admin', 'Add').$animateIcon, ['create'], [
31 31
     'class' => 'btn btn-success',
32 32
     'id' => 'btn-new',
33
-]);?>
33
+]); ?>
34 34
             </span>
35 35
         </div>
36 36
     </div>
@@ -40,32 +40,32 @@  discard block
 block discarded – undo
40 40
     <div class="col-sm-5">
41 41
         <div class="input-group">
42 42
             <input class="form-control search" data-target="available"
43
-                   placeholder="<?=Yii::t('rbac-admin', 'Search for available');?>">
43
+                   placeholder="<?=Yii::t('rbac-admin', 'Search for available'); ?>">
44 44
             <span class="input-group-btn">
45 45
                 <?=Html::a('<span class="glyphicon glyphicon-refresh"></span>', ['refresh'], [
46 46
     'class' => 'btn btn-default',
47 47
     'id' => 'btn-refresh',
48
-]);?>
48
+]); ?>
49 49
             </span>
50 50
         </div>
51 51
         <select multiple size="20" class="form-control list" data-target="available"></select>
52 52
     </div>
53 53
     <div class="col-sm-1">
54 54
         <br><br>
55
-        <?=Html::a('&gt;&gt;' . $animateIcon, ['assign'], [
55
+        <?=Html::a('&gt;&gt;'.$animateIcon, ['assign'], [
56 56
     'class' => 'btn btn-success btn-assign',
57 57
     'data-target' => 'available',
58 58
     'title' => Yii::t('rbac-admin', 'Assign'),
59
-]);?><br><br>
60
-        <?=Html::a('&lt;&lt;' . $animateIcon, ['remove'], [
59
+]); ?><br><br>
60
+        <?=Html::a('&lt;&lt;'.$animateIcon, ['remove'], [
61 61
     'class' => 'btn btn-danger btn-assign',
62 62
     'data-target' => 'assigned',
63 63
     'title' => Yii::t('rbac-admin', 'Remove'),
64
-]);?>
64
+]); ?>
65 65
     </div>
66 66
     <div class="col-sm-5">
67 67
         <input class="form-control search" data-target="assigned"
68
-               placeholder="<?=Yii::t('rbac-admin', 'Search for assigned');?>">
68
+               placeholder="<?=Yii::t('rbac-admin', 'Search for assigned'); ?>">
69 69
         <select multiple size="20" class="form-control list" data-target="assigned"></select>
70 70
     </div>
71 71
 </div>
Please login to merge, or discard this patch.
components/Helper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             }
122 122
             while (($pos = strrpos($r, '/')) > 0) {
123 123
                 $r = substr($r, 0, $pos);
124
-                if ($user->can($r . '/*', $params)) {
124
+                if ($user->can($r.'/*', $params)) {
125 125
                     return true;
126 126
                 }
127 127
             }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             }
134 134
             while (($pos = strrpos($r, '/')) > 0) {
135 135
                 $r = substr($r, 0, $pos);
136
-                if (isset($routes[$r . '/*'])) {
136
+                if (isset($routes[$r.'/*'])) {
137 137
                     return true;
138 138
                 }
139 139
             }
@@ -150,19 +150,19 @@  discard block
 block discarded – undo
150 150
     protected static function normalizeRoute($route, $advanced = false)
151 151
     {
152 152
         if ($route === '') {
153
-            $normalized = '/' . Yii::$app->controller->getRoute();
153
+            $normalized = '/'.Yii::$app->controller->getRoute();
154 154
         } elseif (strncmp($route, '/', 1) === 0) {
155 155
             $normalized = $route;
156 156
         } elseif (strpos($route, '/') === false) {
157
-            $normalized = '/' . Yii::$app->controller->getUniqueId() . '/' . $route;
157
+            $normalized = '/'.Yii::$app->controller->getUniqueId().'/'.$route;
158 158
         } elseif (($mid = Yii::$app->controller->module->getUniqueId()) !== '') {
159
-            $normalized = '/' . $mid . '/' . $route;
159
+            $normalized = '/'.$mid.'/'.$route;
160 160
         } else {
161
-            $normalized = '/' . $route;
161
+            $normalized = '/'.$route;
162 162
         }
163 163
         // Prefix @app-id to route.
164 164
         if ($advanced) {
165
-            $normalized = Route::PREFIX_ADVANCED . Yii::$app->id . $normalized;
165
+            $normalized = Route::PREFIX_ADVANCED.Yii::$app->id.$normalized;
166 166
         }
167 167
         return $normalized;
168 168
     }
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
             }
234 234
             return implode(' ', $result);
235 235
         }
236
-        return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function ($matches) use ($user) {
236
+        return preg_replace_callback('/\\{([\w\-\/]+)\\}/', function($matches) use ($user) {
237 237
             return static::checkRoute($matches[1], [], $user) ? "{{$matches[1]}}" : '';
238 238
         }, $buttons);
239 239
     }
Please login to merge, or discard this patch.