for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Bavix\XHProf\Middleware;
use Bavix\XHProf\Services\XHProfService;
use Closure;
class XHProfMiddleware
{
/**
* @param $request
* @param Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
app(XHProfService::class)->enable();
return $next($request);
}
* @param $response
public function terminate($request, $response)
$response
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function terminate($request, /** @scrutinizer ignore-unused */ $response)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$request
public function terminate(/** @scrutinizer ignore-unused */ $request, $response)
app(XHProfService::class)->disable();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.