for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Usamamuneerchaudhary\LaraClient\Exceptions;
use Exception;
use Illuminate\Support\Facades\Log;
class LaraClientApiClientException extends Exception
{
protected $statusCode;
protected $response;
/**
* @param $message
* @param $statusCode
* @param $response
*/
public function __construct($message = '', $statusCode = null, $response = null)
parent::__construct($message);
$this->statusCode = $statusCode;
$this->response = $response;
}
* @return mixed|null
public function getStatusCode(): mixed
return $this->statusCode;
public function getResponse(): mixed
return $this->response;
* @return void
public function report(): void
Log::debug('HTTP Error with Lara Client API');
* @param $request
* @return \Illuminate\Http\JsonResponse
public function render($request): \Illuminate\Http\JsonResponse
$request
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function render(/** @scrutinizer ignore-unused */ $request): \Illuminate\Http\JsonResponse
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return response()->json(["error" => true, "message" => $this->getStatusCode()]);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.