for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Support\Facades\Lang;
class TwoFactorRequiredException extends Exception
{
/**
* Render the exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request Incoming request object.
* @return \Illuminate\Http\Response|\Illuminate\Contracts\Routing\ResponseFactory
*/
public function render(\Illuminate\Http\Request $request)
$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 */ \Illuminate\Http\Request $request)
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()->view(
response
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return /** @scrutinizer ignore-call */ response()->view(
'errors/two_factor_required',
[
'exception' => $this,
'error' => [
'title' => Lang::get('errors.title'),
],
$this->getStatusCode()
);
}
* Override, custom exception doesn't return a status code.
* @return mixed
public function getStatusCode()
return 403;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.