Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions pint.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
]
},
"no_spaces_after_function_name": true,
"no_superfluous_phpdoc_tags": true,
"no_trailing_comma_in_singleline": true,
"no_trailing_whitespace": true,
"no_trailing_whitespace_in_comment": true,
Expand Down
2 changes: 0 additions & 2 deletions src/Illuminate/Auth/Access/AuthorizationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class AuthorizationException extends Exception
* Create a new authorization exception instance.
*
* @param string|null $message
* @param mixed $code
* @param \Throwable|null $previous
*/
public function __construct($message = null, $code = null, ?Throwable $previous = null)
{
Expand Down
39 changes: 0 additions & 39 deletions src/Illuminate/Auth/Access/Gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,6 @@ class Gate implements GateContract

/**
* Create a new gate instance.
*
* @param \Illuminate\Contracts\Container\Container $container
* @param callable $userResolver
* @param array $abilities
* @param array $policies
* @param array $beforeCallbacks
* @param array $afterCallbacks
* @param callable|null $guessPolicyNamesUsingCallback
*/
public function __construct(
Container $container,
Expand Down Expand Up @@ -226,7 +218,6 @@ public function define($ability, $callback)
*
* @param string $name
* @param string $class
* @param array|null $abilities
* @return $this
*/
public function resource($name, $class, ?array $abilities = null)
Expand Down Expand Up @@ -299,7 +290,6 @@ public function policy($class, $policy)
/**
* Register a callback to run before all Gate checks.
*
* @param callable $callback
* @return $this
*/
public function before(callable $callback)
Expand All @@ -312,7 +302,6 @@ public function before(callable $callback)
/**
* Register a callback to run after all Gate checks.
*
* @param callable $callback
* @return $this
*/
public function after(callable $callback)
Expand All @@ -326,7 +315,6 @@ public function after(callable $callback)
* Determine if all of the given abilities should be granted for the current user.
*
* @param iterable|\UnitEnum|string $ability
* @param mixed $arguments
* @return bool
*/
public function allows($ability, $arguments = [])
Expand All @@ -338,7 +326,6 @@ public function allows($ability, $arguments = [])
* Determine if any of the given abilities should be denied for the current user.
*
* @param iterable|\UnitEnum|string $ability
* @param mixed $arguments
* @return bool
*/
public function denies($ability, $arguments = [])
Expand All @@ -350,7 +337,6 @@ public function denies($ability, $arguments = [])
* Determine if all of the given abilities should be granted for the current user.
*
* @param iterable|\UnitEnum|string $abilities
* @param mixed $arguments
* @return bool
*/
public function check($abilities, $arguments = [])
Expand All @@ -364,7 +350,6 @@ public function check($abilities, $arguments = [])
* Determine if any one of the given abilities should be granted for the current user.
*
* @param iterable|\UnitEnum|string $abilities
* @param mixed $arguments
* @return bool
*/
public function any($abilities, $arguments = [])
Expand All @@ -376,7 +361,6 @@ public function any($abilities, $arguments = [])
* Determine if all of the given abilities should be denied for the current user.
*
* @param iterable|\UnitEnum|string $abilities
* @param mixed $arguments
* @return bool
*/
public function none($abilities, $arguments = [])
Expand All @@ -388,7 +372,6 @@ public function none($abilities, $arguments = [])
* Determine if the given ability should be granted for the current user.
*
* @param \UnitEnum|string $ability
* @param mixed $arguments
* @return \Illuminate\Auth\Access\Response
*
* @throws \Illuminate\Auth\Access\AuthorizationException
Expand All @@ -402,7 +385,6 @@ public function authorize($ability, $arguments = [])
* Inspect the user for the given ability.
*
* @param \UnitEnum|string $ability
* @param mixed $arguments
* @return \Illuminate\Auth\Access\Response
*/
public function inspect($ability, $arguments = [])
Expand All @@ -426,8 +408,6 @@ public function inspect($ability, $arguments = [])
* Get the raw result from the authorization callback.
*
* @param string $ability
* @param mixed $arguments
* @return mixed
*
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
Expand Down Expand Up @@ -543,7 +523,6 @@ protected function parameterAllowsGuests($parameter)
*
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param string $ability
* @param array $arguments
* @return bool
*/
protected function callAuthCallback($user, $ability, array $arguments)
Expand All @@ -558,7 +537,6 @@ protected function callAuthCallback($user, $ability, array $arguments)
*
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param string $ability
* @param array $arguments
* @return bool|null
*/
protected function callBeforeCallbacks($user, $ability, array $arguments)
Expand All @@ -579,7 +557,6 @@ protected function callBeforeCallbacks($user, $ability, array $arguments)
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $ability
* @param array $arguments
* @param bool|null $result
* @return bool|null
*/
Expand All @@ -603,7 +580,6 @@ protected function callAfterCallbacks($user, $ability, array $arguments, $result
*
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param string $ability
* @param array $arguments
* @param bool|null $result
* @return void
*/
Expand All @@ -621,7 +597,6 @@ protected function dispatchGateEvaluatedEvent($user, $ability, array $arguments,
*
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param string $ability
* @param array $arguments
* @return callable
*/
protected function resolveAuthCallback($user, $ability, array $arguments)
Expand Down Expand Up @@ -654,7 +629,6 @@ protected function resolveAuthCallback($user, $ability, array $arguments)
* Get a policy instance for a given class.
*
* @param object|string $class
* @return mixed
*/
public function getPolicyFor($class)
{
Expand Down Expand Up @@ -739,7 +713,6 @@ protected function guessPolicyName($class)
/**
* Specify a callback to be used to guess policy names.
*
* @param callable $callback
* @return $this
*/
public function guessPolicyNamesUsing(callable $callback)
Expand All @@ -753,7 +726,6 @@ public function guessPolicyNamesUsing(callable $callback)
* Build a policy class instance of the given type.
*
* @param object|string $class
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
Expand All @@ -767,8 +739,6 @@ public function resolvePolicy($class)
*
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $ability
* @param array $arguments
* @param mixed $policy
* @return bool|callable
*/
protected function resolvePolicyCallback($user, $ability, array $arguments, $policy)
Expand Down Expand Up @@ -801,11 +771,9 @@ protected function resolvePolicyCallback($user, $ability, array $arguments, $pol
/**
* Call the "before" method on the given policy, if applicable.
*
* @param mixed $policy
* @param \Illuminate\Contracts\Auth\Authenticatable $user
* @param string $ability
* @param array $arguments
* @return mixed
*/
protected function callPolicyBefore($policy, $user, $ability, $arguments)
{
Expand All @@ -821,11 +789,8 @@ protected function callPolicyBefore($policy, $user, $ability, $arguments)
/**
* Call the appropriate method on the given policy.
*
* @param mixed $policy
* @param string $method
* @param \Illuminate\Contracts\Auth\Authenticatable|null $user
* @param array $arguments
* @return mixed
*/
protected function callPolicyMethod($policy, $method, $user, array $arguments)
{
Expand Down Expand Up @@ -877,8 +842,6 @@ public function forUser($user)

/**
* Resolve the user from the user resolver.
*
* @return mixed
*/
protected function resolveUser()
{
Expand Down Expand Up @@ -908,7 +871,6 @@ public function policies()
/**
* Set the default denial response for gates and policies.
*
* @param \Illuminate\Auth\Access\Response $response
* @return $this
*/
public function defaultDenialResponse(Response $response)
Expand All @@ -921,7 +883,6 @@ public function defaultDenialResponse(Response $response)
/**
* Set the container instance used by the gate.
*
* @param \Illuminate\Contracts\Container\Container $container
* @return $this
*/
public function setContainer(Container $container)
Expand Down
2 changes: 0 additions & 2 deletions src/Illuminate/Auth/Access/HandlesAuthorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ trait HandlesAuthorization
* Create a new access response.
*
* @param string|null $message
* @param mixed $code
* @return \Illuminate\Auth\Access\Response
*/
protected function allow($message = null, $code = null)
Expand All @@ -20,7 +19,6 @@ protected function allow($message = null, $code = null)
* Throws an unauthorized exception.
*
* @param string|null $message
* @param mixed $code
* @return \Illuminate\Auth\Access\Response
*/
protected function deny($message = null, $code = null)
Expand Down
9 changes: 0 additions & 9 deletions src/Illuminate/Auth/Access/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ class Response implements Arrayable, Stringable

/**
* The response code.
*
* @var mixed
*/
protected $code;

Expand All @@ -40,7 +38,6 @@ class Response implements Arrayable, Stringable
*
* @param bool $allowed
* @param string|null $message
* @param mixed $code
*/
public function __construct($allowed, $message = '', $code = null)
{
Expand All @@ -53,7 +50,6 @@ public function __construct($allowed, $message = '', $code = null)
* Create a new "allow" Response.
*
* @param string|null $message
* @param mixed $code
* @return \Illuminate\Auth\Access\Response
*/
public static function allow($message = null, $code = null)
Expand All @@ -65,7 +61,6 @@ public static function allow($message = null, $code = null)
* Create a new "deny" Response.
*
* @param string|null $message
* @param mixed $code
* @return \Illuminate\Auth\Access\Response
*/
public static function deny($message = null, $code = null)
Expand All @@ -78,7 +73,6 @@ public static function deny($message = null, $code = null)
*
* @param int $status
* @param string|null $message
* @param mixed $code
* @return \Illuminate\Auth\Access\Response
*/
public static function denyWithStatus($status, $message = null, $code = null)
Expand All @@ -90,7 +84,6 @@ public static function denyWithStatus($status, $message = null, $code = null)
* Create a new "deny" Response with a 404 HTTP status code.
*
* @param string|null $message
* @param mixed $code
* @return \Illuminate\Auth\Access\Response
*/
public static function denyAsNotFound($message = null, $code = null)
Expand Down Expand Up @@ -130,8 +123,6 @@ public function message()

/**
* Get the response code / reason.
*
* @return mixed
*/
public function code()
{
Expand Down
7 changes: 0 additions & 7 deletions src/Illuminate/Auth/AuthManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ protected function resolve($name)
* Call a custom driver creator.
*
* @param string $name
* @param array $config
* @return mixed
*/
protected function callCustomCreator($name, array $config)
{
Expand Down Expand Up @@ -227,7 +225,6 @@ public function setDefaultDriver($name)
* Register a new callback based request guard.
*
* @param string $driver
* @param callable $callback
* @return $this
*/
public function viaRequest($driver, callable $callback)
Expand All @@ -254,7 +251,6 @@ public function userResolver()
/**
* Set the callback to be used to resolve users.
*
* @param \Closure $userResolver
* @return $this
*/
public function resolveUsersUsing(Closure $userResolver)
Expand All @@ -268,7 +264,6 @@ public function resolveUsersUsing(Closure $userResolver)
* Register a custom driver creator Closure.
*
* @param string $driver
* @param \Closure $callback
* @return $this
*/
public function extend($driver, Closure $callback)
Expand All @@ -282,7 +277,6 @@ public function extend($driver, Closure $callback)
* Register a custom provider creator Closure.
*
* @param string $name
* @param \Closure $callback
* @return $this
*/
public function provider($name, Closure $callback)
Expand Down Expand Up @@ -332,7 +326,6 @@ public function setApplication($app)
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
Expand Down
4 changes: 0 additions & 4 deletions src/Illuminate/Auth/Authenticatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ public function getAuthIdentifierName()

/**
* Get the unique identifier for the user.
*
* @return mixed
*/
public function getAuthIdentifier()
{
Expand All @@ -40,8 +38,6 @@ public function getAuthIdentifier()

/**
* Get the unique broadcast identifier for the user.
*
* @return mixed
*/
public function getAuthIdentifierForBroadcasting()
{
Expand Down
Loading