wip
This commit is contained in:
1 parent
eb682c311b
commit
2ef3ef9f7f
1 file changed
+1
-4
@@ -29,6 +29,7 @@ class ExpectationsTeam
|
|||||||
}
|
}
|
||||||
|
|
||||||
$res = LoadEventsQueryAll::load($filter, $match);
|
$res = LoadEventsQueryAll::load($filter, $match);
|
||||||
|
$count_events = $res->count();
|
||||||
if (! $res) {
|
if (! $res) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -53,10 +54,8 @@ class ExpectationsTeam
|
|||||||
$expectations['away'] = $away_team;
|
$expectations['away'] = $away_team;
|
||||||
|
|
||||||
$expectations += ['win_count' => 0, 'draw_count' => 0, 'lost_count' => 0];
|
$expectations += ['win_count' => 0, 'draw_count' => 0, 'lost_count' => 0];
|
||||||
$count_events = 0;
|
|
||||||
foreach ($res as $value) {
|
foreach ($res as $value) {
|
||||||
if ($team_id && $team_position == 'home') {
|
if ($team_id && $team_position == 'home') {
|
||||||
$count_events++;
|
|
||||||
switch ($value['result_code']) {
|
switch ($value['result_code']) {
|
||||||
case '1':
|
case '1':
|
||||||
$expectations['win_count']++;
|
$expectations['win_count']++;
|
||||||
@@ -70,7 +69,6 @@ class ExpectationsTeam
|
|||||||
}
|
}
|
||||||
|
|
||||||
} elseif ($team_id && $team_position == 'away') {
|
} elseif ($team_id && $team_position == 'away') {
|
||||||
$count_events++;
|
|
||||||
switch ($value['result_code']) {
|
switch ($value['result_code']) {
|
||||||
case '1':
|
case '1':
|
||||||
$expectations['win_count']++;
|
$expectations['win_count']++;
|
||||||
@@ -84,7 +82,6 @@ class ExpectationsTeam
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$count_events++;
|
|
||||||
switch ($value['result_code']) {
|
switch ($value['result_code']) {
|
||||||
case '1':
|
case '1':
|
||||||
$expectations['win_count']++;
|
$expectations['win_count']++;
|
||||||
|
|||||||
Reference in new issue
Block a user