This commit is contained in:
salam committed 2026-09-25 11:42:32 +02:00
1 parent eb682c311b
commit 2ef3ef9f7f
1 file changed
+1 -4
@@ -29,6 +29,7 @@ class ExpectationsTeam
}
$res = LoadEventsQueryAll::load($filter, $match);
$count_events = $res->count();
if (! $res) {
return [];
}
@@ -53,10 +54,8 @@ class ExpectationsTeam
$expectations['away'] = $away_team;
$expectations += ['win_count' => 0, 'draw_count' => 0, 'lost_count' => 0];
$count_events = 0;
foreach ($res as $value) {
if ($team_id && $team_position == 'home') {
$count_events++;
switch ($value['result_code']) {
case '1':
$expectations['win_count']++;
@@ -70,7 +69,6 @@ class ExpectationsTeam
}
} elseif ($team_id && $team_position == 'away') {
$count_events++;
switch ($value['result_code']) {
case '1':
$expectations['win_count']++;
@@ -84,7 +82,6 @@ class ExpectationsTeam
}
} else {
$count_events++;
switch ($value['result_code']) {
case '1':
$expectations['win_count']++;