wip add wfl
This commit is contained in:
1 parent
a125dddb4c
commit
bf5e06848a
17 files changed
+188
-43
No files matched your search
@@ -34,9 +34,10 @@ class AverageLeagueSeason
|
||||
ExpectationAverage::filter($result, 'liga', 'crd', $val->crd_h, $val->crd_a);
|
||||
ExpectationAverage::filter($result, 'liga', 'snt', $val->snt_h, $val->snt_a);
|
||||
ExpectationAverage::filter($result, 'liga', 'tsh', $val->tsh_h, $val->tsh_a);
|
||||
ExpectationAverage::filter($result, 'liga', 'wfl', $val->wfl_h, $val->wfl_a);
|
||||
}
|
||||
|
||||
$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.'_liga_season']['home'] = round(array_sum($result['liga'][$bet]['home']) / \count($result['liga'][$bet]['home']), 1);
|
||||
@@ -55,6 +56,7 @@ class AverageLeagueSeason
|
||||
$expectations['crd_liga_season']['name'] = 'Cards';
|
||||
$expectations['snt_liga_season']['name'] = 'Shots on Target';
|
||||
$expectations['tsh_liga_season']['name'] = 'Total Shots';
|
||||
$expectations['wfl_liga_season']['name'] = 'Was Fouled';
|
||||
$expectations['active_season'] = $active_season;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ class AverageTeam
|
||||
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);
|
||||
@@ -80,6 +81,7 @@ class AverageTeam
|
||||
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);
|
||||
@@ -89,6 +91,7 @@ class AverageTeam
|
||||
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);
|
||||
@@ -97,6 +100,7 @@ class AverageTeam
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -120,6 +124,7 @@ class AverageTeam
|
||||
$expectations['crd_team']['name'] = 'Cards';
|
||||
$expectations['snt_team']['name'] = 'Shots on Target';
|
||||
$expectations['tsh_team']['name'] = 'Total Shots';
|
||||
$expectations['wfl_team']['name'] = 'Was Fouled';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,9 @@ class ExpectationsBox3
|
||||
// TSH
|
||||
$tmp['tsh']['home'] += $val->tsh_h;
|
||||
$tmp['tsh']['away'] += $val->tsh_a;
|
||||
// WFL
|
||||
$tmp['wfl']['home'] += $val->wfl_h;
|
||||
$tmp['wfl']['away'] += $val->wfl_a;
|
||||
}
|
||||
foreach ($bets as $bet) {
|
||||
$expectations[$bet]['home'] = round($tmp[$bet]['home'] / $events, 1);
|
||||
@@ -89,6 +92,10 @@ class ExpectationsBox3
|
||||
$tmp['tsh']['home']['events']['home']++;
|
||||
$tmp['tsh']['home']['scored']['home'] += $val->tsh_h;
|
||||
$tmp['tsh']['home']['conceded']['home'] += $val->tsh_a;
|
||||
// TSH
|
||||
$tmp['wfl']['home']['events']['home']++;
|
||||
$tmp['wfl']['home']['scored']['home'] += $val->wfl_h;
|
||||
$tmp['wfl']['home']['conceded']['home'] += $val->wfl_a;
|
||||
|
||||
}
|
||||
// away home
|
||||
@@ -121,6 +128,10 @@ class ExpectationsBox3
|
||||
$tmp['tsh']['away']['events']['home']++;
|
||||
$tmp['tsh']['away']['scored']['home'] += $val->tsh_h;
|
||||
$tmp['tsh']['away']['conceded']['home'] += $val->tsh_a;
|
||||
// WFL
|
||||
$tmp['wfl']['away']['events']['home']++;
|
||||
$tmp['wfl']['away']['scored']['home'] += $val->wfl_h;
|
||||
$tmp['wfl']['away']['conceded']['home'] += $val->wfl_a;
|
||||
}
|
||||
// home away
|
||||
if ($match->home_id == $val->away_id) {
|
||||
@@ -152,6 +163,10 @@ class ExpectationsBox3
|
||||
$tmp['tsh']['home']['events']['away']++;
|
||||
$tmp['tsh']['home']['scored']['away'] += $val->tsh_a;
|
||||
$tmp['tsh']['home']['conceded']['away'] += $val->tsh_h;
|
||||
// WFL
|
||||
$tmp['wfl']['home']['events']['away']++;
|
||||
$tmp['wfl']['home']['scored']['away'] += $val->wfl_a;
|
||||
$tmp['wfl']['home']['conceded']['away'] += $val->wfl_h;
|
||||
|
||||
}
|
||||
// away away
|
||||
@@ -184,6 +199,10 @@ class ExpectationsBox3
|
||||
$tmp['tsh']['away']['events']['away']++;
|
||||
$tmp['tsh']['away']['scored']['away'] += $val->tsh_a;
|
||||
$tmp['tsh']['away']['conceded']['away'] += $val->tsh_h;
|
||||
// WFL
|
||||
$tmp['wfl']['away']['events']['away']++;
|
||||
$tmp['wfl']['away']['scored']['away'] += $val->wfl_a;
|
||||
$tmp['wfl']['away']['conceded']['away'] += $val->wfl_h;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +240,7 @@ class ExpectationsBox3
|
||||
public static function sceleton()
|
||||
{
|
||||
$tmp = [];
|
||||
$bets = ['gls', 'crn', 'fls', 'ofs', 'crd', 'snt', 'tsh'];
|
||||
$bets = ['gls', 'crn', 'fls', 'ofs', 'crd', 'snt', 'tsh', 'wfl'];
|
||||
foreach ($bets as $bet) {
|
||||
$tmp[$bet]['home']['events']['home'] = 0;
|
||||
$tmp[$bet]['home']['scored']['home'] = 0;
|
||||
|
||||
@@ -12,7 +12,7 @@ class ExpectationsMinMax
|
||||
* get min and max for each bettype from all DB for liga
|
||||
* make average
|
||||
*/
|
||||
$bets = ['crn', 'fls', 'ofs', 'crd', 'snt', 'tsh'];
|
||||
$bets = ['crn', 'fls', 'ofs', 'crd', 'snt', 'tsh', 'wfl'];
|
||||
$Y = 0.25;
|
||||
|
||||
$res = StatistikoEvent::where('league_id', $match->league_id)->get();
|
||||
@@ -43,6 +43,9 @@ class ExpectationsMinMax
|
||||
|
||||
$data['crd']['home'] += $val->crd_h;
|
||||
$data['crd']['away'] += $val->crd_a;
|
||||
|
||||
$data['wfl']['home'] += $val->wfl_h;
|
||||
$data['wfl']['away'] += $val->wfl_a;
|
||||
}
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
|
||||
@@ -41,6 +41,7 @@ class LoadEventsBoxes
|
||||
$expectations['crd']['name'] = 'Cards';
|
||||
$expectations['snt']['name'] = 'Shots on Target';
|
||||
$expectations['tsh']['name'] = 'Total Shots';
|
||||
$expectations['wfl']['name'] = 'Was Fouled';
|
||||
$expectations['home'] = $home_team;
|
||||
$expectations['away'] = $away_team;
|
||||
|
||||
@@ -69,7 +70,7 @@ class LoadEventsBoxes
|
||||
public static function template()
|
||||
{
|
||||
$arr = [];
|
||||
$bets = ['gls', 'crn', 'fls', 'ofs', 'crd', 'snt', 'tsh'];
|
||||
$bets = ['gls', 'crn', 'fls', 'ofs', 'crd', 'snt', 'tsh', 'wfl'];
|
||||
foreach ($bets as $bet) {
|
||||
foreach (['team_home', 'team_away'] as $team) {
|
||||
foreach (['scored', 'conceded'] as $sc) {
|
||||
|
||||
Reference in new issue
Block a user