for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Http\Controllers;
use App\Http\Requests\ContactMeStoreRequest;
use App\Services\NotificationService;
use Illuminate\Http\Request;
use Mail;
class ContactMeController extends Controller
{
private NotificationService $notificationService;
public function __construct(
NotificationService $notificationService
) {
$this->notificationService = $notificationService;
}
// Show Contact Form
public function index(Request $request)
$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 index(/** @scrutinizer ignore-unused */ Request $request)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return view('forms.contact');
// Store Contact Form data
public function store(ContactMeStoreRequest $request)
// Store data in database
//Contact::create($request->all());
$this->notificationService->sendEmailContactMe($request->all(), 1);
return back()->with('success', 'We have received your message and would like to thank you for writing to us.');
//return redirect('/');
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.