Completed
Pull Request — master (#4696)
by
unknown
02:30
created
src/Auth/Database/Permission.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      *
92 92
      * @param string $path
93 93
      *
94
-     * @return mixed
94
+     * @return string
95 95
      */
96 96
     public function getHttpPathAttribute($path)
97 97
     {
Please login to merge, or discard this patch.
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace Encore\Admin\Auth\Database;
4 4
 
5
-use Encore\Admin\Traits\DefaultDatetimeFormat;
6
-use Illuminate\Database\Eloquent\Model;
7
-use Illuminate\Database\Eloquent\Relations\BelongsToMany;
8
-use Illuminate\Http\Request;
5
+use Encore\Admin\Traits\DefaultDatetimeFormat;
6
+use Illuminate\Database\Eloquent\Model;
7
+use Illuminate\Database\Eloquent\Relations\BelongsToMany;
8
+use Illuminate\Http\Request;
9 9
 use Illuminate\Support\Str;
10 10
 
11 11
 class Permission extends Model
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $method = $this->http_method;
67 67
 
68
-        $matches = array_map(function ($path) use ($method) {
68
+        $matches = array_map(function($path) use ($method) {
69 69
             $path = trim(config('admin.route.prefix'), '/').$path;
70 70
 
71 71
             if (Str::contains($path, ':')) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             return false;
118 118
         }
119 119
 
120
-        $method = collect($match['method'])->filter()->map(function ($method) {
120
+        $method = collect($match['method'])->filter()->map(function($method) {
121 121
             return strtoupper($method);
122 122
         });
123 123
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     {
158 158
         parent::boot();
159 159
 
160
-        static::deleting(function ($model) {
160
+        static::deleting(function($model) {
161 161
             $model->roles()->detach();
162 162
         });
163 163
     }
Please login to merge, or discard this patch.