wip add wfl
This commit is contained in:
1 parent
a125dddb4c
commit
bf5e06848a
17 files changed
+188
-43
No files matched your search
@@ -16,7 +16,7 @@ class Expectations
|
||||
})->get();
|
||||
|
||||
$work = [];
|
||||
$bettypes = ['gls', 'fls', 'crn', 'ofs', 'crd', 'snt', 'tsh'];
|
||||
$bettypes = ['gls', 'fls', 'crn', 'ofs', 'crd', 'snt', 'tsh', 'wfl'];
|
||||
foreach ($data as $value) {
|
||||
foreach ($bettypes as $type) {
|
||||
if ($value['home_id'] == $home_id) {
|
||||
@@ -69,8 +69,10 @@ class Expectations
|
||||
$num_away_snt = 0;
|
||||
$num_home_tsh = 0;
|
||||
$num_away_tsh = 0;
|
||||
$num_home_wfl = 0;
|
||||
$num_away_wfl = 0;
|
||||
|
||||
$bettypes = ['gls', 'crd', 'fls', 'ofs', 'snt', 'tsh'];
|
||||
$bettypes = ['gls', 'crd', 'fls', 'ofs', 'snt', 'tsh', 'wfl'];
|
||||
|
||||
foreach ($work as $type => $value) {
|
||||
switch ($type) {
|
||||
@@ -224,6 +226,31 @@ class Expectations
|
||||
$sum_away_tsh += array_sum($value['away_got_away']);
|
||||
$num_away_tsh += \count($value['away_got_away']);
|
||||
break;
|
||||
case 'wfl':
|
||||
$sum_home_wfl = array_sum($value['home_made_total']);
|
||||
$num_home_wfl = \count($value['home_made_total']);
|
||||
|
||||
$sum_home_wfl += array_sum($value['home_made_home']);
|
||||
$num_home_wfl += \count($value['home_made_home']);
|
||||
|
||||
$sum_home_wfl += array_sum($value['home_got_total']);
|
||||
$num_home_wfl += \count($value['home_got_total']);
|
||||
|
||||
$sum_home_wfl += array_sum($value['home_got_home']);
|
||||
$num_home_wfl += \count($value['home_got_home']);
|
||||
|
||||
$sum_away_wfl = array_sum($value['away_made_total']);
|
||||
$num_away_wfl = \count($value['away_made_total']);
|
||||
|
||||
$sum_away_wfl += array_sum($value['away_made_away']);
|
||||
$num_away_wfl += \count($value['away_made_away']);
|
||||
|
||||
$sum_away_wfl += array_sum($value['away_got_total']);
|
||||
$num_away_wfl += \count($value['away_got_total']);
|
||||
|
||||
$sum_away_wfl += array_sum($value['away_got_away']);
|
||||
$num_away_wfl += \count($value['away_got_away']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,6 +261,7 @@ class Expectations
|
||||
$aspettativa['home']['ofs'] = round($sum_home_ofs / $num_home_ofs, 1);
|
||||
$aspettativa['home']['snt'] = round($sum_home_snt / $num_home_snt, 1);
|
||||
$aspettativa['home']['tsh'] = round($sum_home_tsh / $num_home_tsh, 1);
|
||||
$aspettativa['home']['wfl'] = round($sum_home_wfl / $num_home_wfl, 1);
|
||||
|
||||
$aspettativa['away']['gls'] = round($sum_away_gls / $sum_away_gls, 1);
|
||||
$aspettativa['away']['crd'] = round($sum_away_crd / $num_away_crd, 1);
|
||||
@@ -241,6 +269,7 @@ class Expectations
|
||||
$aspettativa['away']['ofs'] = round($sum_away_ofs / $num_away_ofs, 1);
|
||||
$aspettativa['away']['snt'] = round($sum_away_snt / $num_away_snt, 1);
|
||||
$aspettativa['away']['tsh'] = round($sum_away_tsh / $num_away_tsh, 1);
|
||||
$aspettativa['away']['wfl'] = round($sum_away_wfl / $num_away_wfl, 1);
|
||||
|
||||
return $aspettativa;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user