Files
nuhodds_fi4/app/Console/Commands/Grapper/Logifuture/Icehockey.php
T
2026-01-07 13:24:56 +01:00

77 lines
2.2 KiB
PHP

<?php
namespace App\Console\Commands\Grapper\Logifuture;
class Icehockey
{
public static function get(&$event, &$_spreads, $match)
{
$n_totals = [];
$n_points = [];
$c_totals = [];
$c_points = [];
foreach ($match['odds'] as $name => $value) {
switch ($name) {
case 'IH_1X2_1':
$event['h3w'] = (float) $value;
break;
case 'IH_1X2_X':
$event['d3w'] = (float) $value;
break;
case 'IH_1X2_2':
$event['a3w'] = (float) $value;
break;
case 'IH_12_1':
case 'IH_12OTAP_1':
$event['h2w'] = (float) $value;
break;
case 'IH_12_2':
case 'IH_12OTAP_2':
$event['a2w'] = (float) $value;
break;
}
if (strpos($name, '@') !== false) {
$pos = strpos($name, '@');
$market = substr($name, 0, $pos);
switch ($market) {
// NIGERIA
case 'IH_TF':
$n_totals[$name] = $value;
break;
case 'IH_HR1':
$n_points[$name] = $value;
break;
// COLOMBIA
case 'IH_OUHND':
$c_totals[$name] = $value;
break;
case 'IH_12HND':
$c_points[$name] = $value;
break;
}
}
}
// COLUMBIA
if ($c_totals) {
Filter::prinz($_spreads['total'], 'IH_OUHND@', $c_totals, ['over', 'under', 'total']);
}
if ($c_points) {
Filter::prinz($_spreads['point'], 'IH_12HND@', $c_points, ['hth1', 'hth2', 'hcap']);
}
// NIGERIA
if ($n_totals) {
Filter::prinz($_spreads['total'], 'IH_TF@', $n_totals, ['over', 'under', 'total']);
}
if ($n_points) {
Filter::prinz($_spreads['point'], 'IH_HR1@', $n_points, ['hth1', 'hth2', 'hcap']);
}
}
}