for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Devpri\Tinre\Http\Controllers;
use Devpri\Tinre\Models\Url;
use Illuminate\Http\Request;
class PreviewController extends Controller
{
public function show(Request $request, $path)
$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 show(/** @scrutinizer ignore-unused */ Request $request, $path)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$url = URL::select(['long_url', 'path', 'created_at'])->where(['path' => $path, 'active' => 1])->first();
if (! $url) {
return redirect('/');
}
return view('tinre::preview', ['url' => $url]);
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.