This commit is contained in:
salam committed 2026-10-04 15:25:03 +02:00
1 parent 9bcd4432c6
commit 6f92f9e1d5
1209 files changed
+220940

No files matched your search

@@ -0,0 +1,46 @@
<?php
namespace App\Filament\Widgets\Boxes\Helper;
class ExpectationCollecting
{
public static function sort(array &$result, string $type, int $home_id, int $away_id, float $val_home, float $val_away, object $match)
{
if ($home_id == $match->home_id) {
$result[$type.'_home_made_total'][] = $val_home;
$result[$type.'_home_made_home'][] = $val_home;
$result[$type.'_home_got_total'][] = $val_away;
$result[$type.'_home_got_home'][] = $val_away;
} elseif ($away_id == $match->home_id) {
$result[$type.'_home_made_total'][] = $val_away;
$result[$type.'_home_got_total'][] = $val_away;
} elseif ($home_id == $match->away_id) {
$result[$type.'_home_made_total'][] = $val_away;
$result[$type.'_home_got_total'][] = $val_away;
} elseif ($away_id == $match->away_id) {
$result[$type.'_home_made_total'][] = $val_home;
$result[$type.'_home_made_home'][] = $val_home;
$result[$type.'_home_got_total'][] = $val_away;
$result[$type.'_home_got_home'][] = $val_home;
}
if ($away_id == $match->away_id) {
$result[$type.'_away_made_total'][] = $val_away;
$result[$type.'_away_made_home'][] = $val_away;
$result[$type.'_away_got_total'][] = $val_home;
$result[$type.'_away_got_home'][] = $val_home;
} elseif ($home_id == $match->away_id) {
$result[$type.'_away_made_total'][] = $val_home;
$result[$type.'_away_got_total'][] = $val_home;
} elseif ($away_id == $match->home_id) {
$result[$type.'_away_made_total'][] = $val_home;
$result[$type.'_away_got_total'][] = $val_home;
} elseif ($home_id == $match->home_id) {
$result[$type.'_away_made_total'][] = $val_away;
$result[$type.'_away_made_home'][] = $val_away;
$result[$type.'_away_got_total'][] = $val_home;
$result[$type.'_away_got_home'][] = $val_away;
}
}
}