wup
This commit is contained in:
1 parent
c2f068e8bf
commit
436a8ec142
8 files changed
+158
-86
No files matched your search
@@ -20,7 +20,6 @@ class ExpectationsTeam
|
||||
* STATTISTIC DATA
|
||||
*/
|
||||
$team_id = (int) $filter['team_id'] ?? 0;
|
||||
$league_id = (int) $filter['league_id'] ?? 0;
|
||||
$team_position = $filter['team_position'];
|
||||
$similar_past_matches = $filter['similar_past_matches'];
|
||||
|
||||
@@ -40,7 +39,7 @@ class ExpectationsTeam
|
||||
return [];
|
||||
}
|
||||
|
||||
$tmp = [];
|
||||
$tmp = self::template();
|
||||
foreach ($res as $value) {
|
||||
// dd($match->home_id, $match->away_id, $value);
|
||||
ExpectationCollecting::sort($similar_past_matches, $tmp, 'gls', $value->home_id, $value->away_id, $value->gls_h, $value->gls_a, $match);
|
||||
@@ -52,14 +51,15 @@ class ExpectationsTeam
|
||||
ExpectationCollecting::sort($similar_past_matches, $tmp, 'crn', $value->home_id, $value->away_id, $value->crn_h, $value->crn_a, $match);
|
||||
}
|
||||
|
||||
if (self::$collectionMethod == 'A') {
|
||||
$expectations = ExpectationMethodA::calc($tmp);
|
||||
} else {
|
||||
$expectations = ExpectationMethodB::calc($tmp);
|
||||
if ($expectations) {
|
||||
if (self::$collectionMethod == 'A') {
|
||||
$expectations = ExpectationMethodA::calc($tmp);
|
||||
} else {
|
||||
$expectations = ExpectationMethodB::calc($tmp);
|
||||
}
|
||||
ExpectationsMinMax::calc($expectations, $match);
|
||||
}
|
||||
|
||||
ExpectationsMinMax::calc($expectations, $match);
|
||||
|
||||
$expectations['gls']['name'] = 'Goals';
|
||||
$expectations['crn']['name'] = 'Corner';
|
||||
$expectations['fls']['name'] = 'Fouls';
|
||||
@@ -120,4 +120,23 @@ class ExpectationsTeam
|
||||
$expectations['draw_odd'] = $expectations['draw_count'] ? number_format(Round::odd($count_tp / $expectations['draw_count']), 2) : 0;
|
||||
$expectations['lost_odd'] = $expectations['lost_count'] ? number_format(Round::odd($count_tp / $expectations['lost_count']), 2) : 0;
|
||||
}
|
||||
|
||||
public static function template()
|
||||
{
|
||||
$arr = [];
|
||||
$bets = ['gls', 'crn', 'fls', 'ofs', 'crd', 'snt', 'tsh'];
|
||||
foreach ($bets as $bet) {
|
||||
foreach (['team_home', 'team_away'] as $team) {
|
||||
foreach (['scored', 'conceded'] as $sc) {
|
||||
foreach (['home', 'away'] as $ha) {
|
||||
foreach (['evt', 'sum'] as $es) {
|
||||
$arr[$bet][$team][$sc][$ha][$es] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user