fix: 🚨 resolve some phpcs/phpstan errors

This commit is contained in:
Alexis Gousseau 2026-04-15 11:44:56 +02:00
parent 380985915f
commit d6fc06e032
No known key found for this signature in database
GPG key ID: 7F3C786EE12DBB72
7 changed files with 13 additions and 13 deletions

View file

@ -129,12 +129,14 @@ class CustomerController extends Controller
$mesBr = app('mesBrAPI');
$brBasket = $mesBr->getBasket($crmUser);
if (!empty($brBasket['coupons'])) {
$canPrint = (collect($brBasket['coupons'])->sum('quantity') - collect($brBasket['coupons'])->sum('printed'));
$canPrint = (
collect($brBasket['coupons'])->sum('quantity') - collect($brBasket['coupons'])->sum('printed')
);
}
$winningList = $customer->participations()
->with(['instantWin'])->where(function (Builder $q) {
$q->whereHas('instantWin');
->with(['instantWin'])->where(function (Builder $query) {
$query->whereHas('instantWin');
})->get();
return view('theme::pages.participation.winning-participations', compact('winningList', 'canPrint'));

View file

@ -10,7 +10,6 @@ use App\Mail\Won\PrizeWonAdminMail;
use App\Models\Customer;
use App\Models\InstantWin;
use App\Models\Participation;
use App\Models\Discount;
use App\Notifications\Customer\HasWonDiscount;
use App\Notifications\Customer\HasWonInstantWin;
use App\Repositories\Fo\CrmRepository;

View file

@ -196,7 +196,7 @@ class CreateAccountRequest extends FormRequest
]),
]
),
}; //end match
}; // end match
return $messages;
}

View file

@ -97,7 +97,7 @@ class ToolboxHelper
Validator::validate($request->all(), [
'g-recaptcha-response' => [
'required', 'string',
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundAfterLastUsed, Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed
function ($attribute, $value, $fail) use ($isV3) {
try {
$response = Http::asForm()->post('https://www.google.com/recaptcha/api/siteverify', [

View file

@ -17,8 +17,8 @@ class HasWonDiscount extends Notification implements ShouldQueue
/**
* Create a new notification instance.
*
* @param Discount $discount The discount as set in Settings.
* @param string $first_name The client first name.
* @param \App\Lib\Discount $discount The discount as set in Settings.
* @param string $first_name The client first name.
* @return void
*/
public function __construct(

View file

@ -51,10 +51,10 @@ return [
'missing_routes' => false,
],
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send-default-pii.
// See: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send-default-pii.
'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces-sample-rate.
// See: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces-sample-rate.
'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float) env('SENTRY_TRACES_SAMPLE_RATE'),
'before_send' => [\App\Lib\Helpers\ExceptionsHelper::class, 'sentryEventHandler'],

View file

@ -9,5 +9,4 @@ parameters:
excludePaths:
- app/Lib/vendor/
# Level 9 is the highest level
level: 5
level: 7