Skip to content

Commit c3bc7b1

Browse files
authored
Revert "[12.x] Improve PHPDoc blocks for array of arguments in Gate (#56426)" (#56593)
This reverts commit b39a756.
1 parent b735473 commit c3bc7b1

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/Illuminate/Auth/Access/Gate.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818

1919
use function Illuminate\Support\enum_value;
2020

21-
/**
22-
* @template TClass of object
23-
*/
2421
class Gate implements GateContract
2522
{
2623
use HandlesAuthorization;
@@ -329,7 +326,7 @@ public function after(callable $callback)
329326
* Determine if all of the given abilities should be granted for the current user.
330327
*
331328
* @param iterable|\UnitEnum|string $ability
332-
* @param array{class-string<TClass>|TClass, ...} $arguments
329+
* @param mixed $arguments
333330
* @return bool
334331
*/
335332
public function allows($ability, $arguments = [])
@@ -341,7 +338,7 @@ public function allows($ability, $arguments = [])
341338
* Determine if any of the given abilities should be denied for the current user.
342339
*
343340
* @param iterable|\UnitEnum|string $ability
344-
* @param array{class-string<TClass>|TClass, ...} $arguments
341+
* @param mixed $arguments
345342
* @return bool
346343
*/
347344
public function denies($ability, $arguments = [])
@@ -353,7 +350,7 @@ public function denies($ability, $arguments = [])
353350
* Determine if all of the given abilities should be granted for the current user.
354351
*
355352
* @param iterable|\UnitEnum|string $abilities
356-
* @param array{class-string<TClass>|TClass, ...} $arguments
353+
* @param mixed $arguments
357354
* @return bool
358355
*/
359356
public function check($abilities, $arguments = [])
@@ -367,7 +364,7 @@ public function check($abilities, $arguments = [])
367364
* Determine if any one of the given abilities should be granted for the current user.
368365
*
369366
* @param iterable|\UnitEnum|string $abilities
370-
* @param array{class-string<TClass>|TClass, ...} $arguments
367+
* @param mixed $arguments
371368
* @return bool
372369
*/
373370
public function any($abilities, $arguments = [])
@@ -379,7 +376,7 @@ public function any($abilities, $arguments = [])
379376
* Determine if all of the given abilities should be denied for the current user.
380377
*
381378
* @param iterable|\UnitEnum|string $abilities
382-
* @param array{class-string<TClass>|TClass, ...} $arguments
379+
* @param mixed $arguments
383380
* @return bool
384381
*/
385382
public function none($abilities, $arguments = [])
@@ -391,7 +388,7 @@ public function none($abilities, $arguments = [])
391388
* Determine if the given ability should be granted for the current user.
392389
*
393390
* @param \UnitEnum|string $ability
394-
* @param array{class-string<TClass>|TClass, ...} $arguments
391+
* @param mixed $arguments
395392
* @return \Illuminate\Auth\Access\Response
396393
*
397394
* @throws \Illuminate\Auth\Access\AuthorizationException
@@ -405,7 +402,7 @@ public function authorize($ability, $arguments = [])
405402
* Inspect the user for the given ability.
406403
*
407404
* @param \UnitEnum|string $ability
408-
* @param array{class-string<TClass>|TClass, ...} $arguments
405+
* @param array|mixed $arguments
409406
* @return \Illuminate\Auth\Access\Response
410407
*/
411408
public function inspect($ability, $arguments = [])
@@ -429,7 +426,7 @@ public function inspect($ability, $arguments = [])
429426
* Get the raw result from the authorization callback.
430427
*
431428
* @param string $ability
432-
* @param array{class-string<TClass>|TClass, ...} $arguments
429+
* @param array|mixed $arguments
433430
* @return mixed
434431
*
435432
* @throws \Illuminate\Auth\Access\AuthorizationException

0 commit comments

Comments
 (0)