for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Middleware;
use Closure;
class TransformRequestLoginProvider
{
public function handle($request, Closure $next, $guard = null)
$guard
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function handle($request, Closure $next, /** @scrutinizer ignore-unused */ $guard = null)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$params = $request->all();
if(isset($params['\code'])) {
$request->merge([
'\code' => null,
'code' => $params['\code']
]);
}
if(isset($params['\oauth_token'])) {
'\oauth_token' => null,
'oauth_token' => $params['\oauth_token']
return $next($request);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.