for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TypeHints\Unused\Middleware;
use Closure;
use Illuminate\Http\Request;
class LaravelUnusedMiddleware
{
/**
* Handle an incoming request.
*
* @param Request $request
* @param Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
if (!app('config')->get('app.debug')) {
app
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
if (!/** @scrutinizer ignore-call */ app('config')->get('app.debug')) {
abort(404);
abort
/** @scrutinizer ignore-call */
}
return $next($request);