for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Rinvex\Oauth\Exceptions;
use Exception;
use Illuminate\Http\Response;
use League\OAuth2\Server\Exception\OAuthServerException as LeagueException;
class OAuthServerException extends Exception
{
/**
* The response to render.
*
* @var \Illuminate\Http\Response
*/
protected $response;
* Create a new OAuthServerException.
* @param \League\OAuth2\Server\Exception\OAuthServerException $e
* @param \Illuminate\Http\Response $response
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
public function __construct(LeagueException $e, Response $response)
parent::__construct($e->getMessage(), $e->getCode(), $e);
$this->response = $response;
}
* Render the exception into an HTTP response.
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
public function render($request)
$request
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return $this->response;
* Get the HTTP response status code.
* @return int
public function statusCode()
return $this->response->getStatusCode();
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.