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,103 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Grapper\Logifuture;
|
||||
|
||||
class Basketball
|
||||
{
|
||||
public static function get(&$event, &$_spreads, $match)
|
||||
{
|
||||
$n_totals = [];
|
||||
$n_totals_qt = [];
|
||||
$n_points = [];
|
||||
$n_points_qt = [];
|
||||
|
||||
$c_totals = [];
|
||||
$c_totals_qt = [];
|
||||
$c_points = [];
|
||||
$c_points_qt = [];
|
||||
|
||||
foreach ($match['odds'] as $name => $value) {
|
||||
/*
|
||||
case 'B_1X2_1':
|
||||
$event['h3w'] = $value;
|
||||
break;
|
||||
case 'B_1X2_X':
|
||||
$event['d3w'] = $value;
|
||||
break;
|
||||
case 'B_1X2_2':
|
||||
$event['a3w'] = $value;
|
||||
break;
|
||||
|
||||
case 'B_12_1':
|
||||
$_bai_2way['h2w'] = $value;
|
||||
break;
|
||||
case 'B_12_2':
|
||||
$_bai_2way['a2w'] = $value;
|
||||
break;
|
||||
*/
|
||||
|
||||
if (strpos($name, '@') !== false) {
|
||||
$pos = strpos($name, '@');
|
||||
$market = substr($name, 0, $pos);
|
||||
|
||||
switch ($market) {
|
||||
// NIGERIA
|
||||
case 'B_OUN':
|
||||
$n_totals[$name] = $value;
|
||||
break;
|
||||
case 'B_1QOU':
|
||||
$n_totals_qt[$name] = $value;
|
||||
break;
|
||||
case 'B_H':
|
||||
$n_points[$name] = $value;
|
||||
break;
|
||||
case 'B_1QH':
|
||||
$n_points_qt[$name] = $value;
|
||||
break;
|
||||
|
||||
// COLOMBIA
|
||||
case 'B_OUHND':
|
||||
$c_totals[$name] = $value;
|
||||
break;
|
||||
case 'B_OUHND1P':
|
||||
$c_totals_qt[$name] = $value;
|
||||
break;
|
||||
case 'B_12HND':
|
||||
$c_points[$name] = $value;
|
||||
break;
|
||||
case 'B_12HND1P':
|
||||
$c_points_qt[$name] = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// COLUMBIA
|
||||
if ($c_totals) {
|
||||
PrinzipalHandicap::filter($_spreads['total'], 'B_OUHND@', $c_totals, ['over', 'under', 'total']);
|
||||
}
|
||||
if ($c_totals_qt) {
|
||||
PrinzipalHandicap::filter($_spreads['total_qt'], 'B_OUHND1P@', $c_totals_qt, ['over', 'under', 'total']);
|
||||
}
|
||||
if ($c_points) {
|
||||
PrinzipalHandicap::filter($_spreads['point'], 'B_12HND@', $c_points, ['hth1', 'hth2', 'hcap']);
|
||||
}
|
||||
if ($c_points_qt) {
|
||||
PrinzipalHandicap::filter($_spreads['point_qt'], 'B_12HND1P@', $c_points_qt, ['hth1', 'hth2', 'hcap']);
|
||||
}
|
||||
|
||||
// NIGERIA
|
||||
if ($n_totals) {
|
||||
PrinzipalHandicap::filter($_spreads['total'], 'B_OUN@', $n_totals, ['over', 'under', 'total']);
|
||||
}
|
||||
if ($n_totals_qt) {
|
||||
PrinzipalHandicap::filter($_spreads['total_qt'], 'B_1QOU@', $n_totals_qt, ['over', 'under', 'total']);
|
||||
}
|
||||
if ($n_points) {
|
||||
PrinzipalHandicap::filter($_spreads['point'], 'B_H@', $n_points, ['hth1', 'hth2', 'hcap']);
|
||||
}
|
||||
if ($n_points_qt) {
|
||||
PrinzipalHandicap::filter($_spreads['point_qt'], 'B_1QH@', $n_points_qt, ['hth1', 'hth2', 'hcap']);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user