Completed
Pull Request — master (#926)
by
unknown
02:11
created
src/Models/Role.php 1 patch
Unused Use Statements   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -2,16 +2,16 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\Permission\Models;
4 4
 
5
-use Spatie\Permission\Guard;
6 5
 use Illuminate\Database\Eloquent\Model;
7
-use Spatie\Permission\Traits\HasPermissions;
8
-use Spatie\Permission\Exceptions\RoleDoesNotExist;
6
+use Illuminate\Database\Eloquent\Relations\BelongsToMany;
7
+use Illuminate\Database\Eloquent\Relations\MorphToMany;
8
+use Spatie\Permission\Contracts\Role as RoleContract;
9 9
 use Spatie\Permission\Exceptions\GuardDoesNotMatch;
10 10
 use Spatie\Permission\Exceptions\RoleAlreadyExists;
11
-use Spatie\Permission\Contracts\Role as RoleContract;
11
+use Spatie\Permission\Exceptions\RoleDoesNotExist;
12
+use Spatie\Permission\Guard;
13
+use Spatie\Permission\Traits\HasPermissions;
12 14
 use Spatie\Permission\Traits\RefreshesPermissionCache;
13
-use Illuminate\Database\Eloquent\Relations\MorphToMany;
14
-use Illuminate\Database\Eloquent\Relations\BelongsToMany;
15 15
 
16 16
 class Role extends Model implements RoleContract
17 17
 {
Please login to merge, or discard this patch.
src/Models/Permission.php 1 patch
Unused Use Statements   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,17 +2,17 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\Permission\Models;
4 4
 
5
-use Spatie\Permission\Guard;
6
-use Illuminate\Support\Collection;
7
-use Spatie\Permission\Traits\HasRoles;
8 5
 use Illuminate\Database\Eloquent\Model;
9
-use Spatie\Permission\PermissionRegistrar;
10
-use Spatie\Permission\Traits\RefreshesPermissionCache;
11
-use Illuminate\Database\Eloquent\Relations\MorphToMany;
12
-use Spatie\Permission\Exceptions\PermissionDoesNotExist;
13 6
 use Illuminate\Database\Eloquent\Relations\BelongsToMany;
14
-use Spatie\Permission\Exceptions\PermissionAlreadyExists;
7
+use Illuminate\Database\Eloquent\Relations\MorphToMany;
8
+use Illuminate\Support\Collection;
15 9
 use Spatie\Permission\Contracts\Permission as PermissionContract;
10
+use Spatie\Permission\Exceptions\PermissionAlreadyExists;
11
+use Spatie\Permission\Exceptions\PermissionDoesNotExist;
12
+use Spatie\Permission\Guard;
13
+use Spatie\Permission\PermissionRegistrar;
14
+use Spatie\Permission\Traits\HasRoles;
15
+use Spatie\Permission\Traits\RefreshesPermissionCache;
16 16
 
17 17
 class Permission extends Model implements PermissionContract
18 18
 {
Please login to merge, or discard this patch.
src/Traits/HasRoles.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@
 block discarded – undo
2 2
 
3 3
 namespace Spatie\Permission\Traits;
4 4
 
5
+use Illuminate\Database\Eloquent\Builder;
6
+use Illuminate\Database\Eloquent\Relations\MorphToMany;
5 7
 use Illuminate\Support\Collection;
6 8
 use Spatie\Permission\Contracts\Role;
7
-use Illuminate\Database\Eloquent\Builder;
8 9
 use Spatie\Permission\PermissionRegistrar;
9
-use Illuminate\Database\Eloquent\Relations\MorphToMany;
10 10
 
11 11
 trait HasRoles
12 12
 {
Please login to merge, or discard this patch.
src/PermissionServiceProvider.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 use Illuminate\Routing\Route;
6 6
 use Illuminate\Support\ServiceProvider;
7 7
 use Illuminate\View\Compilers\BladeCompiler;
8
-use Spatie\Permission\Contracts\Role as RoleContract;
9 8
 use Spatie\Permission\Contracts\Permission as PermissionContract;
9
+use Spatie\Permission\Contracts\Role as RoleContract;
10 10
 
11 11
 class PermissionServiceProvider extends ServiceProvider
12 12
 {
Please login to merge, or discard this patch.
src/Traits/HasPermissions.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      * Check the uncached permissions for the model.
139 139
      *
140 140
      * @param      $permission
141
-     * @param null $guardName
141
+     * @param string|null $guardName
142 142
      *
143 143
      * @return bool
144 144
      */
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      * @param array                                              $config
244 244
      * @param string|int|\Spatie\Permission\Contracts\Permission $permission
245 245
      *
246
-     * @return mixed
246
+     * @return string
247 247
      */
248 248
     protected function getPermissionCacheString(array $config, $permission)
249 249
     {
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
     /**
316 316
      * Determine if the model has the given permission.
317 317
      *
318
-     * @param string|int|\Spatie\Permission\Contracts\Permission $permission
318
+     * @param Permission $permission
319 319
      *
320 320
      * @return bool
321 321
      */
Please login to merge, or discard this patch.