@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * Revokes the given permission from the role. |
40 | 40 | * |
41 | 41 | * @param int|null $permissionId |
42 | - * @return bool |
|
42 | + * @return integer |
|
43 | 43 | */ |
44 | 44 | public function revokePermission($permissionId = null) |
45 | 45 | { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /** |
61 | 61 | * Revokes all permissions from the role. |
62 | 62 | * |
63 | - * @return bool |
|
63 | + * @return integer |
|
64 | 64 | */ |
65 | 65 | public function revokeAllPermissions() |
66 | 66 | { |
@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace Yajra\Acl; |
4 | 4 | |
5 | +use Illuminate\Contracts\Auth\Access\Gate as GateContract; |
|
6 | +use Illuminate\Contracts\Cache\Repository; |
|
7 | +use Illuminate\Support\Collection; |
|
5 | 8 | use Illuminate\Support\Str; |
6 | 9 | use Yajra\Acl\Models\Permission; |
7 | -use Illuminate\Support\Collection; |
|
8 | -use Illuminate\Contracts\Cache\Repository; |
|
9 | -use Illuminate\Contracts\Auth\Access\Gate as GateContract; |
|
10 | 10 | |
11 | 11 | class GateRegistrar |
12 | 12 | { |
@@ -2,9 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Yajra\Acl; |
4 | 4 | |
5 | -use Yajra\Acl\Observers\AclModelObserver; |
|
6 | -use Illuminate\View\Compilers\BladeCompiler; |
|
7 | 5 | use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; |
6 | +use Illuminate\View\Compilers\BladeCompiler; |
|
8 | 7 | |
9 | 8 | class AclServiceProvider extends ServiceProvider |
10 | 9 | { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * Attach a role to user using slug. |
109 | 109 | * |
110 | 110 | * @param $slug |
111 | - * @return bool |
|
111 | + * @return null|false |
|
112 | 112 | */ |
113 | 113 | public function attachRoleBySlug($slug) |
114 | 114 | { |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * Attach a role to user |
122 | 122 | * |
123 | 123 | * @param Role $role |
124 | - * @return boolean |
|
124 | + * @return null|false |
|
125 | 125 | */ |
126 | 126 | public function attachRole(Role $role) |
127 | 127 | { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * Assigns the given role to the user. |
133 | 133 | * |
134 | 134 | * @param int $roleId |
135 | - * @return bool |
|
135 | + * @return null|false |
|
136 | 136 | */ |
137 | 137 | public function assignRole($roleId = null) |
138 | 138 | { |
@@ -176,7 +176,6 @@ discard block |
||
176 | 176 | * Query scope for user having the given roles by slugs. |
177 | 177 | * |
178 | 178 | * @param \Illuminate\Database\Eloquent\Builder $query |
179 | - * @param array $roles |
|
180 | 179 | * @return mixed |
181 | 180 | */ |
182 | 181 | public function scopeHavingRolesBySlugs($query, array $slugs) |
@@ -190,7 +189,7 @@ discard block |
||
190 | 189 | * Revokes the given role from the user using slug. |
191 | 190 | * |
192 | 191 | * @param string $slug |
193 | - * @return bool |
|
192 | + * @return integer |
|
194 | 193 | */ |
195 | 194 | public function revokeRoleBySlug($slug) |
196 | 195 | { |
@@ -203,7 +202,7 @@ discard block |
||
203 | 202 | * Revokes the given role from the user. |
204 | 203 | * |
205 | 204 | * @param mixed $role |
206 | - * @return bool |
|
205 | + * @return integer |
|
207 | 206 | */ |
208 | 207 | public function revokeRole($role = "") |
209 | 208 | { |
@@ -224,7 +223,7 @@ discard block |
||
224 | 223 | /** |
225 | 224 | * Revokes all roles from the user. |
226 | 225 | * |
227 | - * @return bool |
|
226 | + * @return integer |
|
228 | 227 | */ |
229 | 228 | public function revokeAllRoles() |
230 | 229 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Yajra\Acl\Traits; |
4 | 4 | |
5 | -use Yajra\Acl\Models\Role; |
|
6 | 5 | use Illuminate\Support\Str; |
6 | +use Yajra\Acl\Models\Role; |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * @property \Illuminate\Database\Eloquent\Collection roles |