grapper logifuture wip
This commit is contained in:
1 parent
0bee21dc2d
commit
91ec9d11cc
10 files changed
+480
-324
No files matched your search
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Grapper\Logifuture;
|
||||
|
||||
class Tennis
|
||||
{
|
||||
public static function get(&$event, &$_spreads, $match)
|
||||
{
|
||||
$n_totals = [];
|
||||
$n_points = [];
|
||||
$c_totals = [];
|
||||
$c_points = [];
|
||||
|
||||
foreach ($match['odds'] as $name => $value) {
|
||||
switch ($name) {
|
||||
case 'T_12_1':
|
||||
$event['h2w'] = (float) $value;
|
||||
break;
|
||||
case 'T_12_2':
|
||||
$event['a2w'] = (float) $value;
|
||||
break;
|
||||
|
||||
case 'T_121P_1':
|
||||
$_spreads['mlset1']['h2w'] = (float) $value;
|
||||
break;
|
||||
case 'T_121P_2':
|
||||
$_spreads['mlset1']['a2w'] = (float) $value;
|
||||
break;
|
||||
}
|
||||
|
||||
if (strpos($name, '@') !== false) {
|
||||
$pos = strpos($name, '@');
|
||||
$market = substr($name, 0, $pos);
|
||||
|
||||
switch ($market) {
|
||||
// NIGERIA
|
||||
case 'T_OUG':
|
||||
$n_totals[$name] = $value;
|
||||
break;
|
||||
case 'T_GH':
|
||||
$n_points[$name] = $value;
|
||||
break;
|
||||
|
||||
// COLOMBIA
|
||||
case 'T_OUG':
|
||||
$c_totals[$name] = $value;
|
||||
break;
|
||||
case 'T_HNDGAMES':
|
||||
$c_points[$name] = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// COLUMBIA
|
||||
if ($c_totals) {
|
||||
Filter::prinz($_spreads['total'], 'T_OUG@', $c_totals, ['over', 'under', 'total']);
|
||||
}
|
||||
if ($c_points) {
|
||||
Filter::prinz($_spreads['point'], 'T_HNDGAMES@', $c_points, ['hth1', 'hth2', 'hcap']);
|
||||
}
|
||||
|
||||
// NIGERIA
|
||||
if ($n_totals) {
|
||||
Filter::prinz($_spreads['total'], 'T_OUG@', $n_totals, ['over', 'under', 'total']);
|
||||
}
|
||||
if ($n_points) {
|
||||
Filter::prinz($_spreads['point'], 'T_GH@', $n_points, ['hth1', 'hth2', 'hcap']);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user