@@ -87,14 +87,6 @@ class Gate implements GateContract
87
87
88
88
/**
89
89
* Create a new gate instance.
90
- *
91
- * @param \Illuminate\Contracts\Container\Container $container
92
- * @param callable $userResolver
93
- * @param array $abilities
94
- * @param array $policies
95
- * @param array $beforeCallbacks
96
- * @param array $afterCallbacks
97
- * @param callable|null $guessPolicyNamesUsingCallback
98
90
*/
99
91
public function __construct (
100
92
Container $ container ,
@@ -226,7 +218,6 @@ public function define($ability, $callback)
226
218
*
227
219
* @param string $name
228
220
* @param string $class
229
- * @param array|null $abilities
230
221
* @return $this
231
222
*/
232
223
public function resource ($ name , $ class , ?array $ abilities = null )
@@ -299,7 +290,6 @@ public function policy($class, $policy)
299
290
/**
300
291
* Register a callback to run before all Gate checks.
301
292
*
302
- * @param callable $callback
303
293
* @return $this
304
294
*/
305
295
public function before (callable $ callback )
@@ -312,7 +302,6 @@ public function before(callable $callback)
312
302
/**
313
303
* Register a callback to run after all Gate checks.
314
304
*
315
- * @param callable $callback
316
305
* @return $this
317
306
*/
318
307
public function after (callable $ callback )
@@ -326,7 +315,6 @@ public function after(callable $callback)
326
315
* Determine if all of the given abilities should be granted for the current user.
327
316
*
328
317
* @param iterable|\UnitEnum|string $ability
329
- * @param mixed $arguments
330
318
* @return bool
331
319
*/
332
320
public function allows ($ ability , $ arguments = [])
@@ -338,7 +326,6 @@ public function allows($ability, $arguments = [])
338
326
* Determine if any of the given abilities should be denied for the current user.
339
327
*
340
328
* @param iterable|\UnitEnum|string $ability
341
- * @param mixed $arguments
342
329
* @return bool
343
330
*/
344
331
public function denies ($ ability , $ arguments = [])
@@ -350,7 +337,6 @@ public function denies($ability, $arguments = [])
350
337
* Determine if all of the given abilities should be granted for the current user.
351
338
*
352
339
* @param iterable|\UnitEnum|string $abilities
353
- * @param mixed $arguments
354
340
* @return bool
355
341
*/
356
342
public function check ($ abilities , $ arguments = [])
@@ -364,7 +350,6 @@ public function check($abilities, $arguments = [])
364
350
* Determine if any one of the given abilities should be granted for the current user.
365
351
*
366
352
* @param iterable|\UnitEnum|string $abilities
367
- * @param mixed $arguments
368
353
* @return bool
369
354
*/
370
355
public function any ($ abilities , $ arguments = [])
@@ -376,7 +361,6 @@ public function any($abilities, $arguments = [])
376
361
* Determine if all of the given abilities should be denied for the current user.
377
362
*
378
363
* @param iterable|\UnitEnum|string $abilities
379
- * @param mixed $arguments
380
364
* @return bool
381
365
*/
382
366
public function none ($ abilities , $ arguments = [])
@@ -388,7 +372,6 @@ public function none($abilities, $arguments = [])
388
372
* Determine if the given ability should be granted for the current user.
389
373
*
390
374
* @param \UnitEnum|string $ability
391
- * @param mixed $arguments
392
375
* @return \Illuminate\Auth\Access\Response
393
376
*
394
377
* @throws \Illuminate\Auth\Access\AuthorizationException
@@ -402,7 +385,6 @@ public function authorize($ability, $arguments = [])
402
385
* Inspect the user for the given ability.
403
386
*
404
387
* @param \UnitEnum|string $ability
405
- * @param mixed $arguments
406
388
* @return \Illuminate\Auth\Access\Response
407
389
*/
408
390
public function inspect ($ ability , $ arguments = [])
@@ -426,8 +408,6 @@ public function inspect($ability, $arguments = [])
426
408
* Get the raw result from the authorization callback.
427
409
*
428
410
* @param string $ability
429
- * @param mixed $arguments
430
- * @return mixed
431
411
*
432
412
* @throws \Illuminate\Auth\Access\AuthorizationException
433
413
*/
@@ -543,7 +523,6 @@ protected function parameterAllowsGuests($parameter)
543
523
*
544
524
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
545
525
* @param string $ability
546
- * @param array $arguments
547
526
* @return bool
548
527
*/
549
528
protected function callAuthCallback ($ user , $ ability , array $ arguments )
@@ -558,7 +537,6 @@ protected function callAuthCallback($user, $ability, array $arguments)
558
537
*
559
538
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
560
539
* @param string $ability
561
- * @param array $arguments
562
540
* @return bool|null
563
541
*/
564
542
protected function callBeforeCallbacks ($ user , $ ability , array $ arguments )
@@ -579,7 +557,6 @@ protected function callBeforeCallbacks($user, $ability, array $arguments)
579
557
*
580
558
* @param \Illuminate\Contracts\Auth\Authenticatable $user
581
559
* @param string $ability
582
- * @param array $arguments
583
560
* @param bool|null $result
584
561
* @return bool|null
585
562
*/
@@ -603,7 +580,6 @@ protected function callAfterCallbacks($user, $ability, array $arguments, $result
603
580
*
604
581
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
605
582
* @param string $ability
606
- * @param array $arguments
607
583
* @param bool|null $result
608
584
* @return void
609
585
*/
@@ -621,7 +597,6 @@ protected function dispatchGateEvaluatedEvent($user, $ability, array $arguments,
621
597
*
622
598
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
623
599
* @param string $ability
624
- * @param array $arguments
625
600
* @return callable
626
601
*/
627
602
protected function resolveAuthCallback ($ user , $ ability , array $ arguments )
@@ -654,7 +629,6 @@ protected function resolveAuthCallback($user, $ability, array $arguments)
654
629
* Get a policy instance for a given class.
655
630
*
656
631
* @param object|string $class
657
- * @return mixed
658
632
*/
659
633
public function getPolicyFor ($ class )
660
634
{
@@ -739,7 +713,6 @@ protected function guessPolicyName($class)
739
713
/**
740
714
* Specify a callback to be used to guess policy names.
741
715
*
742
- * @param callable $callback
743
716
* @return $this
744
717
*/
745
718
public function guessPolicyNamesUsing (callable $ callback )
@@ -753,7 +726,6 @@ public function guessPolicyNamesUsing(callable $callback)
753
726
* Build a policy class instance of the given type.
754
727
*
755
728
* @param object|string $class
756
- * @return mixed
757
729
*
758
730
* @throws \Illuminate\Contracts\Container\BindingResolutionException
759
731
*/
@@ -767,8 +739,6 @@ public function resolvePolicy($class)
767
739
*
768
740
* @param \Illuminate\Contracts\Auth\Authenticatable $user
769
741
* @param string $ability
770
- * @param array $arguments
771
- * @param mixed $policy
772
742
* @return bool|callable
773
743
*/
774
744
protected function resolvePolicyCallback ($ user , $ ability , array $ arguments , $ policy )
@@ -801,11 +771,9 @@ protected function resolvePolicyCallback($user, $ability, array $arguments, $pol
801
771
/**
802
772
* Call the "before" method on the given policy, if applicable.
803
773
*
804
- * @param mixed $policy
805
774
* @param \Illuminate\Contracts\Auth\Authenticatable $user
806
775
* @param string $ability
807
776
* @param array $arguments
808
- * @return mixed
809
777
*/
810
778
protected function callPolicyBefore ($ policy , $ user , $ ability , $ arguments )
811
779
{
@@ -821,11 +789,8 @@ protected function callPolicyBefore($policy, $user, $ability, $arguments)
821
789
/**
822
790
* Call the appropriate method on the given policy.
823
791
*
824
- * @param mixed $policy
825
792
* @param string $method
826
793
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
827
- * @param array $arguments
828
- * @return mixed
829
794
*/
830
795
protected function callPolicyMethod ($ policy , $ method , $ user , array $ arguments )
831
796
{
@@ -877,8 +842,6 @@ public function forUser($user)
877
842
878
843
/**
879
844
* Resolve the user from the user resolver.
880
- *
881
- * @return mixed
882
845
*/
883
846
protected function resolveUser ()
884
847
{
@@ -908,7 +871,6 @@ public function policies()
908
871
/**
909
872
* Set the default denial response for gates and policies.
910
873
*
911
- * @param \Illuminate\Auth\Access\Response $response
912
874
* @return $this
913
875
*/
914
876
public function defaultDenialResponse (Response $ response )
@@ -921,7 +883,6 @@ public function defaultDenialResponse(Response $response)
921
883
/**
922
884
* Set the container instance used by the gate.
923
885
*
924
- * @param \Illuminate\Contracts\Container\Container $container
925
886
* @return $this
926
887
*/
927
888
public function setContainer (Container $ container )
0 commit comments