@@ -390,7 +390,7 @@ |
||
390 | 390 | * |
391 | 391 | * @param $name |
392 | 392 | * @param $slug |
393 | - * @param $path |
|
393 | + * @param string $path |
|
394 | 394 | * @param array $methods |
395 | 395 | */ |
396 | 396 | protected static function createPermission($name, $slug, $path, $methods = []) |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | public static function import() |
237 | 237 | { |
238 | 238 | $extension = static::getInstance(); |
239 | - DB::transaction(function () use ($extension) { |
|
239 | + DB::transaction(function() use ($extension) { |
|
240 | 240 | if ($menu = $extension->menu()) { |
241 | 241 | if ($extension->validateMenu($menu)) { |
242 | 242 | extract($menu); |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | return true; |
279 | 279 | } |
280 | 280 | |
281 | - $message = "Invalid menu:\r\n" . implode("\r\n", Arr::flatten($validator->errors()->messages())); |
|
281 | + $message = "Invalid menu:\r\n".implode("\r\n", Arr::flatten($validator->errors()->messages())); |
|
282 | 282 | |
283 | 283 | throw new \Exception($message); |
284 | 284 | } |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | return true; |
321 | 321 | } |
322 | 322 | |
323 | - $message = "Invalid permission:\r\n" . implode("\r\n", Arr::flatten($validator->errors()->messages())); |
|
323 | + $message = "Invalid permission:\r\n".implode("\r\n", Arr::flatten($validator->errors()->messages())); |
|
324 | 324 | |
325 | 325 | throw new \Exception($message); |
326 | 326 | } |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | $permissionModel::create([ |
401 | 401 | 'name' => $name, |
402 | 402 | 'slug' => $slug, |
403 | - 'http_path' => '/' . trim($path, '/'), |
|
403 | + 'http_path' => '/'.trim($path, '/'), |
|
404 | 404 | 'http_method' => $methods, |
405 | 405 | ]); |
406 | 406 | } |