From 2a91a439df4626b4d8648840d3c2e8fc698f0111 Mon Sep 17 00:00:00 2001 From: salam Date: Thu, 21 May 2026 19:07:37 +0200 Subject: [PATCH] wip --- app/Actions/Statistics/LoadEventsAspGoal.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/Actions/Statistics/LoadEventsAspGoal.php b/app/Actions/Statistics/LoadEventsAspGoal.php index 1c06cd55..b85a7f19 100644 --- a/app/Actions/Statistics/LoadEventsAspGoal.php +++ b/app/Actions/Statistics/LoadEventsAspGoal.php @@ -50,13 +50,22 @@ class LoadEventsAspGoal $accuracy = (float) $filter['accuracy']; - $exp_handicap = $res['exp_away'] - $res['exp_home']; + if ($res == null) { - $exp_total = $res['exp_away'] + $res['exp_home']; + $handicap_range = 0; - $handicap_range = [$exp_handicap - $accuracy, $exp_handicap + $accuracy]; + $total_range = 0; - $total_range = [$exp_total - $accuracy, $exp_total + $accuracy]; + } else { + + $exp_handicap = $res['exp_away'] - $res['exp_home']; + + $exp_total = $res['exp_away'] + $res['exp_home']; + + $handicap_range = [$exp_handicap - $accuracy, $exp_handicap + $accuracy]; + + $total_range = [$exp_total - $accuracy, $exp_total + $accuracy]; + } $similar_past_matches = $filter['similar_past_matches'] ?? 0;