Skip to content

Commit 5d0a703

Browse files
drbytegithub-actions[bot]
authored andcommitted
Fix styling
1 parent 6c2fc83 commit 5d0a703

File tree

13 files changed

+0
-89
lines changed

13 files changed

+0
-89
lines changed

src/Commands/UpgradeForTeams.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ protected function createMigration()
7878
* Build a warning regarding possible duplication
7979
* due to already existing migrations.
8080
*
81-
* @param array $existingMigrations
8281
* @return string
8382
*/
8483
protected function getExistingMigrationsWarning(array $existingMigrations)

src/Contracts/Permission.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@ interface Permission
88
{
99
/**
1010
* A permission can be applied to roles.
11-
*
12-
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
1311
*/
1412
public function roles(): BelongsToMany;
1513

1614
/**
1715
* Find a permission by its name.
1816
*
19-
* @param string $name
2017
* @param string|null $guardName
21-
* @return Permission
2218
*
2319
* @throws \Spatie\Permission\Exceptions\PermissionDoesNotExist
2420
*/
@@ -27,9 +23,7 @@ public static function findByName(string $name, $guardName): self;
2723
/**
2824
* Find a permission by its id.
2925
*
30-
* @param int $id
3126
* @param string|null $guardName
32-
* @return Permission
3327
*
3428
* @throws \Spatie\Permission\Exceptions\PermissionDoesNotExist
3529
*/
@@ -38,9 +32,7 @@ public static function findById(int $id, $guardName): self;
3832
/**
3933
* Find or Create a permission by its name and guard name.
4034
*
41-
* @param string $name
4235
* @param string|null $guardName
43-
* @return Permission
4436
*/
4537
public static function findOrCreate(string $name, $guardName): self;
4638
}

src/Contracts/Role.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ interface Role
88
{
99
/**
1010
* A role may be given various permissions.
11-
*
12-
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
1311
*/
1412
public function permissions(): BelongsToMany;
1513

1614
/**
1715
* Find a role by its name and guard name.
1816
*
19-
* @param string $name
2017
* @param string|null $guardName
2118
* @return \Spatie\Permission\Contracts\Role
2219
*
@@ -27,7 +24,6 @@ public static function findByName(string $name, $guardName): self;
2724
/**
2825
* Find a role by its id and guard name.
2926
*
30-
* @param int $id
3127
* @param string|null $guardName
3228
* @return \Spatie\Permission\Contracts\Role
3329
*
@@ -38,7 +34,6 @@ public static function findById(int $id, $guardName): self;
3834
/**
3935
* Find or create a role by its name and guard name.
4036
*
41-
* @param string $name
4237
* @param string|null $guardName
4338
* @return \Spatie\Permission\Contracts\Role
4439
*/
@@ -48,7 +43,6 @@ public static function findOrCreate(string $name, $guardName): self;
4843
* Determine if the user may perform the given permission.
4944
*
5045
* @param string|\Spatie\Permission\Contracts\Permission $permission
51-
* @return bool
5246
*/
5347
public function hasPermissionTo($permission): bool;
5448
}

src/Contracts/Wildcard.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ interface Wildcard
66
{
77
/**
88
* @param string|Wildcard $permission
9-
* @return bool
109
*/
1110
public function implies($permission): bool;
1211
}

src/Guard.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class Guard
1212
* as indicated by the presence of a $guard_name property or a guardName() method on the model.
1313
*
1414
* @param string|Model $model model class object or name
15-
* @return Collection
1615
*/
1716
public static function getNames($model): Collection
1817
{
@@ -45,9 +44,6 @@ public static function getNames($model): Collection
4544
* - filter for provider models matching the model $class being checked (important for Lumen)
4645
* - keys() gives just the names of the matched guards
4746
* - return collection of guard names
48-
*
49-
* @param string $class
50-
* @return Collection
5147
*/
5248
protected static function getConfigAuthGuards(string $class): Collection
5349
{

src/Models/Permission.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ public function users(): BelongsToMany
8484
/**
8585
* Find a permission by its name (and optionally guardName).
8686
*
87-
* @param string $name
8887
* @param string|null $guardName
89-
* @return \Spatie\Permission\Contracts\Permission
9088
*
9189
* @throws \Spatie\Permission\Exceptions\PermissionDoesNotExist
9290
*/
@@ -104,9 +102,7 @@ public static function findByName(string $name, $guardName = null): PermissionCo
104102
/**
105103
* Find a permission by its id (and optionally guardName).
106104
*
107-
* @param int $id
108105
* @param string|null $guardName
109-
* @return \Spatie\Permission\Contracts\Permission
110106
*
111107
* @throws \Spatie\Permission\Exceptions\PermissionDoesNotExist
112108
*/
@@ -125,9 +121,7 @@ public static function findById(int $id, $guardName = null): PermissionContract
125121
/**
126122
* Find or create permission by its name (and optionally guardName).
127123
*
128-
* @param string $name
129124
* @param string|null $guardName
130-
* @return \Spatie\Permission\Contracts\Permission
131125
*/
132126
public static function findOrCreate(string $name, $guardName = null): PermissionContract
133127
{
@@ -143,10 +137,6 @@ public static function findOrCreate(string $name, $guardName = null): Permission
143137

144138
/**
145139
* Get the current cached permissions.
146-
*
147-
* @param array $params
148-
* @param bool $onlyOne
149-
* @return \Illuminate\Database\Eloquent\Collection
150140
*/
151141
protected static function getPermissions(array $params = [], bool $onlyOne = false): Collection
152142
{
@@ -158,7 +148,6 @@ protected static function getPermissions(array $params = [], bool $onlyOne = fal
158148
/**
159149
* Get the current cached first permission.
160150
*
161-
* @param array $params
162151
* @return \Spatie\Permission\Contracts\Permission
163152
*/
164153
protected static function getPermission(array $params = []): ?PermissionContract

src/Models/Role.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public function users(): BelongsToMany
9090
/**
9191
* Find a role by its name and guard name.
9292
*
93-
* @param string $name
9493
* @param string|null $guardName
9594
* @return \Spatie\Permission\Contracts\Role|\Spatie\Permission\Models\Role
9695
*
@@ -112,7 +111,6 @@ public static function findByName(string $name, $guardName = null): RoleContract
112111
/**
113112
* Find a role by its id (and optionally guardName).
114113
*
115-
* @param int $id
116114
* @param string|null $guardName
117115
* @return \Spatie\Permission\Contracts\Role|\Spatie\Permission\Models\Role
118116
*/
@@ -132,7 +130,6 @@ public static function findById(int $id, $guardName = null): RoleContract
132130
/**
133131
* Find or create role by its name (and optionally guardName).
134132
*
135-
* @param string $name
136133
* @param string|null $guardName
137134
* @return \Spatie\Permission\Contracts\Role|\Spatie\Permission\Models\Role
138135
*/
@@ -172,7 +169,6 @@ protected static function findByParam(array $params = [])
172169
* Determine if the user may perform the given permission.
173170
*
174171
* @param string|Permission $permission
175-
* @return bool
176172
*
177173
* @throws \Spatie\Permission\Exceptions\GuardDoesNotMatch
178174
*/

src/PermissionRegistrar.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ class PermissionRegistrar
6060

6161
/**
6262
* PermissionRegistrar constructor.
63-
*
64-
* @param \Illuminate\Cache\CacheManager $cacheManager
6563
*/
6664
public function __construct(CacheManager $cacheManager)
6765
{
@@ -130,8 +128,6 @@ public function getPermissionsTeamId()
130128
/**
131129
* Register the permission check method on the gate.
132130
* We resolve the Gate fresh here, for benefit of long-running instances.
133-
*
134-
* @return bool
135131
*/
136132
public function registerPermissions(): bool
137133
{
@@ -197,10 +193,6 @@ private function loadPermissions()
197193

198194
/**
199195
* Get the permissions based on the passed params.
200-
*
201-
* @param array $params
202-
* @param bool $onlyOne
203-
* @return \Illuminate\Database\Eloquent\Collection
204196
*/
205197
public function getPermissions(array $params = [], bool $onlyOne = false): Collection
206198
{
@@ -227,8 +219,6 @@ public function getPermissions(array $params = [], bool $onlyOne = false): Colle
227219

228220
/**
229221
* Get an instance of the permission class.
230-
*
231-
* @return \Spatie\Permission\Contracts\Permission
232222
*/
233223
public function getPermissionClass(): Permission
234224
{
@@ -246,8 +236,6 @@ public function setPermissionClass($permissionClass)
246236

247237
/**
248238
* Get an instance of the role class.
249-
*
250-
* @return \Spatie\Permission\Contracts\Role
251239
*/
252240
public function getRoleClass(): Role
253241
{
@@ -280,8 +268,6 @@ protected function getPermissionsWithRoles(): Collection
280268

281269
/**
282270
* Changes array keys with alias
283-
*
284-
* @return array
285271
*/
286272
private function aliasedArray($model): array
287273
{

src/PermissionServiceProvider.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ protected function registerMacroHelpers()
162162

163163
/**
164164
* Returns existing migration file if found, else uses the current timestamp.
165-
*
166-
* @return string
167165
*/
168166
protected function getMigrationFileName($migrationFileName): string
169167
{

src/Traits/HasPermissions.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ public function permissions(): BelongsToMany
9494
/**
9595
* Scope the model query to certain permissions only.
9696
*
97-
* @param \Illuminate\Database\Eloquent\Builder $query
9897
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection $permissions
99-
* @return \Illuminate\Database\Eloquent\Builder
10098
*/
10199
public function scopePermission(Builder $query, $permissions): Builder
102100
{
@@ -124,7 +122,6 @@ public function scopePermission(Builder $query, $permissions): Builder
124122

125123
/**
126124
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection $permissions
127-
* @return array
128125
*
129126
* @throws \Spatie\Permission\Exceptions\PermissionDoesNotExist
130127
*/
@@ -182,7 +179,6 @@ public function filterPermission($permission, $guardName = null)
182179
*
183180
* @param string|int|\Spatie\Permission\Contracts\Permission $permission
184181
* @param string|null $guardName
185-
* @return bool
186182
*
187183
* @throws PermissionDoesNotExist
188184
*/
@@ -202,7 +198,6 @@ public function hasPermissionTo($permission, $guardName = null): bool
202198
*
203199
* @param string|int|\Spatie\Permission\Contracts\Permission $permission
204200
* @param string|null $guardName
205-
* @return bool
206201
*/
207202
protected function hasWildcardPermission($permission, $guardName = null): bool
208203
{
@@ -242,7 +237,6 @@ protected function hasWildcardPermission($permission, $guardName = null): bool
242237
*
243238
* @param string|int|\Spatie\Permission\Contracts\Permission $permission
244239
* @param string|null $guardName
245-
* @return bool
246240
*/
247241
public function checkPermissionTo($permission, $guardName = null): bool
248242
{
@@ -257,7 +251,6 @@ public function checkPermissionTo($permission, $guardName = null): bool
257251
* Determine if the model has any of the given permissions.
258252
*
259253
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection ...$permissions
260-
* @return bool
261254
*/
262255
public function hasAnyPermission(...$permissions): bool
263256
{
@@ -276,7 +269,6 @@ public function hasAnyPermission(...$permissions): bool
276269
* Determine if the model has all of the given permissions.
277270
*
278271
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection ...$permissions
279-
* @return bool
280272
*/
281273
public function hasAllPermissions(...$permissions): bool
282274
{
@@ -293,9 +285,6 @@ public function hasAllPermissions(...$permissions): bool
293285

294286
/**
295287
* Determine if the model has, via roles, the given permission.
296-
*
297-
* @param \Spatie\Permission\Contracts\Permission $permission
298-
* @return bool
299288
*/
300289
protected function hasPermissionViaRole(Permission $permission): bool
301290
{
@@ -306,7 +295,6 @@ protected function hasPermissionViaRole(Permission $permission): bool
306295
* Determine if the model has the given permission.
307296
*
308297
* @param string|int|\Spatie\Permission\Contracts\Permission $permission
309-
* @return bool
310298
*
311299
* @throws PermissionDoesNotExist
312300
*/
@@ -509,7 +497,6 @@ public function forgetCachedPermissions()
509497
* Check if the model has All of the requested Direct permissions.
510498
*
511499
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection ...$permissions
512-
* @return bool
513500
*/
514501
public function hasAllDirectPermissions(...$permissions): bool
515502
{
@@ -528,7 +515,6 @@ public function hasAllDirectPermissions(...$permissions): bool
528515
* Check if the model has Any of the requested Direct permissions.
529516
*
530517
* @param string|int|array|\Spatie\Permission\Contracts\Permission|\Illuminate\Support\Collection ...$permissions
531-
* @return bool
532518
*/
533519
public function hasAnyDirectPermission(...$permissions): bool
534520
{

0 commit comments

Comments
 (0)