wip add wfl
This commit is contained in:
1 parent
a125dddb4c
commit
bf5e06848a
17 files changed
+188
-43
No files matched your search
@@ -47,6 +47,7 @@ class AverageTeamSeason
|
||||
ExpectationAverage::filter($result, 'team', 'crd', $val->crd_h, $val->crd_a);
|
||||
ExpectationAverage::filter($result, 'team', 'snt', $val->snt_h, $val->snt_a);
|
||||
ExpectationAverage::filter($result, 'team', 'tsh', $val->tsh_h, $val->tsh_a);
|
||||
ExpectationAverage::filter($result, 'team', 'wfl', $val->wfl_h, $val->wfl_a);
|
||||
} elseif ($team_position == 'away' && $team_id == $val->away_id) {
|
||||
ExpectationAverage::filter($result, 'team', 'gls', $val->gls_a, $val->gls_h);
|
||||
ExpectationAverage::filter($result, 'team', 'crn', $val->crn_a, $val->crn_h);
|
||||
@@ -55,6 +56,7 @@ class AverageTeamSeason
|
||||
ExpectationAverage::filter($result, 'team', 'crd', $val->crd_a, $val->crd_h);
|
||||
ExpectationAverage::filter($result, 'team', 'snt', $val->snt_a, $val->snt_h);
|
||||
ExpectationAverage::filter($result, 'team', 'tsh', $val->tsh_a, $val->tsh_h);
|
||||
ExpectationAverage::filter($result, 'team', 'wfl', $val->wfl_a, $val->wfl_h);
|
||||
} else {
|
||||
if ($team_id == $val->home_id) {
|
||||
ExpectationAverage::filter($result, 'team', 'gls', $val->gls_h, $val->gls_a);
|
||||
@@ -64,6 +66,7 @@ class AverageTeamSeason
|
||||
ExpectationAverage::filter($result, 'team', 'crd', $val->crd_h, $val->crd_a);
|
||||
ExpectationAverage::filter($result, 'team', 'snt', $val->snt_h, $val->snt_a);
|
||||
ExpectationAverage::filter($result, 'team', 'tsh', $val->tsh_h, $val->tsh_a);
|
||||
ExpectationAverage::filter($result, 'team', 'wfl', $val->wfl_h, $val->wfl_a);
|
||||
} elseif ($team_id == $val->away_id) {
|
||||
ExpectationAverage::filter($result, 'team', 'gls', $val->gls_a, $val->gls_h);
|
||||
ExpectationAverage::filter($result, 'team', 'crn', $val->crn_a, $val->crn_h);
|
||||
@@ -72,11 +75,12 @@ class AverageTeamSeason
|
||||
ExpectationAverage::filter($result, 'team', 'crd', $val->crd_a, $val->crd_h);
|
||||
ExpectationAverage::filter($result, 'team', 'snt', $val->snt_a, $val->snt_h);
|
||||
ExpectationAverage::filter($result, 'team', 'tsh', $val->tsh_a, $val->tsh_h);
|
||||
ExpectationAverage::filter($result, 'team', 'wfl', $val->wfl_a, $val->wfl_h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$bets = ['gls', 'crn', 'fls', 'ofs', 'crd', 'snt', 'tsh'];
|
||||
$bets = ['gls', 'crn', 'fls', 'ofs', 'crd', 'snt', 'tsh', 'wfl'];
|
||||
if ($result) {
|
||||
foreach ($bets as $bet) {
|
||||
$expectations[$bet.'_team_season']['home'] = round(array_sum($result['team'][$bet]['home']) / \count($result['team'][$bet]['home']), 1);
|
||||
@@ -95,6 +99,7 @@ class AverageTeamSeason
|
||||
$expectations['crd_team_season']['name'] = 'Cards';
|
||||
$expectations['snt_team_season']['name'] = 'Shots on Target';
|
||||
$expectations['tsh_team_season']['name'] = 'Total Shots';
|
||||
$expectations['wfl_team_season']['name'] = 'Was Fouled';
|
||||
$expectations['active_season'] = $season;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user