for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Domains\Users;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Auth;
use App\TechTipFavs;
use App\CustomerFavs;
class UserFavs
{
protected $userID;
public function __construct($userID = null)
$this->userID = isset($userID) ? $userID : Auth::user()->user_id;
}
public function updateTechTipFav($tipID)
$tipID
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function updateTechTipFav(/** @scrutinizer ignore-unused */ $tipID)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
//
public function updateCustomerFav($custID)
$favData = CustomerFavs::where('cust_id', $custID)->where('user_id', $this->userID)->first();
if($favData)
Log::info('Customer Bookmark removed. Detais', [
'user_id' => $this->userID,
'cust_id' => $custID,
]);
$favData->delete();
else
CustomerFavs::create([
Log::info('Customer Bookmark added. Detais', [
return true;
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.