for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ElfSundae\Laravel\Api\Exceptions;
use RuntimeException;
use ElfSundae\Laravel\Api\ApiResponse;
class ApiResponseException extends RuntimeException
{
/**
* The underlying response instance.
*
* @var \ElfSundae\Laravel\Api\ApiResponse
*/
protected $response;
* Create a new exception instance.
* @param mixed $data
* @param int $code
* @param array $headers
* @param int $options
public function __construct($data = null, $code = -1, $headers = [], $options = 0)
$this->response = new ApiResponse($data, $code, $headers, $options);
}
* Get the underlying response instance.
* @return \ElfSundae\Laravel\Api\ApiResponse
public function getResponse()
return $this->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->getResponse();
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.