This commit is contained in:
salam committed 2026-10-07 10:56:09 +02:00
1 parent 4f7f9f28f1
commit 1fbf53cf1f
1 file changed
+5 -4
@@ -31,6 +31,7 @@ class ExpectationsTeam
} }
$res = LoadEventsQueryAll::load($filter, $match); $res = LoadEventsQueryAll::load($filter, $match);
$count_events_selection = $res->count();
$count_events = ExpectationCounting::count($team_position, $team_id, $res); $count_events = ExpectationCounting::count($team_position, $team_id, $res);
@@ -61,6 +62,7 @@ class ExpectationsTeam
$expectations['tsh']['name'] = 'Total Shots'; $expectations['tsh']['name'] = 'Total Shots';
$expectations['home'] = $home_team; $expectations['home'] = $home_team;
$expectations['away'] = $away_team; $expectations['away'] = $away_team;
$expectations['count_events'] = $count_events;
$expectations += ['win_count' => 0, 'draw_count' => 0, 'lost_count' => 0]; $expectations += ['win_count' => 0, 'draw_count' => 0, 'lost_count' => 0];
foreach ($res as $value) { foreach ($res as $value) {
@@ -103,9 +105,8 @@ class ExpectationsTeam
} }
} }
$expectations['win_odd'] = $expectations['win_count'] ? number_format(Round::odd($count_events / $expectations['win_count']), 2) : 0; $expectations['win_odd'] = $expectations['win_count'] ? number_format(Round::odd($count_events_selection / $expectations['win_count']), 2) : 0;
$expectations['draw_odd'] = $expectations['draw_count'] ? number_format(Round::odd($count_events / $expectations['draw_count']), 2) : 0; $expectations['draw_odd'] = $expectations['draw_count'] ? number_format(Round::odd($count_events_selection / $expectations['draw_count']), 2) : 0;
$expectations['lost_odd'] = $expectations['lost_count'] ? number_format(Round::odd($count_events / $expectations['lost_count']), 2) : 0; $expectations['lost_odd'] = $expectations['lost_count'] ? number_format(Round::odd($count_events_selection / $expectations['lost_count']), 2) : 0;
$expectations['count_events'] = $count_events;
} }
} }