Completed
Pull Request — master (#359)
by
unknown
02:05
created
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.
views/default/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     $baseDir = '';
11 11
     $this->title = substr($page, 0, strrpos($page, '.'));
12 12
 } else {
13
-    $baseDir = substr($page, 0, $pos) . '/';
13
+    $baseDir = substr($page, 0, $pos).'/';
14 14
     $this->title = substr($page, $pos + 1, strrpos($page, '.') - $pos - 1);
15 15
 }
16 16
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
         $url = Url::to($menu['url'], true);
23 23
         $links[] = "[**{$menu['label']}**]({$url})";
24 24
     }
25
-    $body = str_replace(':smile:.', ".\n\n" . implode('  ', $links) . "\n", file_get_contents(Url::to('@mdm/admin/README.md')));
25
+    $body = str_replace(':smile:.', ".\n\n".implode('  ', $links)."\n", file_get_contents(Url::to('@mdm/admin/README.md')));
26 26
 } else {
27 27
     $body = file_get_contents(Url::to("@mdm/admin/{$page}"));
28 28
 }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         if ($link[0] == '/') {
34 34
             $link = Url::current(['page' => ltrim($link, '/')], true);
35 35
         } else {
36
-            $link = Url::current(['page' => $baseDir . $link], true);
36
+            $link = Url::current(['page' => $baseDir.$link], true);
37 37
         }
38 38
     }
39 39
     return "]($link)";
Please login to merge, or discard this patch.
models/Menu.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
         if (self::$_routes === null) {
131 131
             self::$_routes = [];
132 132
             foreach (Configs::authManager()->getPermissions() as $name => $value) {
133
-		if (($name[0] === Route::PREFIX_BASIC || $name[0] === Route::PREFIX_ADVANCED) && substr($name, -1) != '*') {
133
+        if (($name[0] === Route::PREFIX_BASIC || $name[0] === Route::PREFIX_ADVANCED) && substr($name, -1) != '*') {
134 134
                     self::$_routes[] = $name;
135 135
                 }
136 136
             }
Please login to merge, or discard this patch.