for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Bavix\Prof\Middleware;
use Bavix\Prof\Services\ProfileLogService;
use Illuminate\Http\Request;
use Closure;
class TerminateMiddleware
{
/**
* @param Request $request
* @param Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next)
* Note from the beginning of the application...
if (\config('prof.globalMiddleware', false)) {
app(ProfileLogService::class)
->tick('app:init');
}
return $next($request);
* @param $request
* @param $response
public function terminate($request, $response): void
$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 terminate(/** @scrutinizer ignore-unused */ $request, $response): void
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$response
public function terminate($request, /** @scrutinizer ignore-unused */ $response): void
* If there are started ticks, but not completed, we complete it.
->recordAllTicks();
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.