From 2f4f0c412b9591f96ae57517357323411dee48c6 Mon Sep 17 00:00:00 2001 From: salam Date: Thu, 17 Sep 2026 20:22:03 +0200 Subject: [PATCH] wip --- app/Filament/Widgets/PlayerPropsDrop.php | 65 +++++++------ composer.lock | 116 ++++++++++++----------- 2 files changed, 91 insertions(+), 90 deletions(-) diff --git a/app/Filament/Widgets/PlayerPropsDrop.php b/app/Filament/Widgets/PlayerPropsDrop.php index 252cdb65..d64af99f 100644 --- a/app/Filament/Widgets/PlayerPropsDrop.php +++ b/app/Filament/Widgets/PlayerPropsDrop.php @@ -96,7 +96,6 @@ class PlayerPropsDrop extends Widget $this->match_id = $match_id; } $this->dispatch('update-players', players: $this->players); - } #[On('team-update')] @@ -297,9 +296,9 @@ class PlayerPropsDrop extends Widget foreach ($this->calculationVariables as $row) { if ($copystring == '') { $keys = array_keys($row); - $copystring .= implode(';', $keys)."\n"; + $copystring .= implode(';', $keys) . "\n"; } - $copystring .= implode(';', $row)."\n"; + $copystring .= implode(';', $row) . "\n"; } $this->js("navigator.clipboard.writeText(`$copystring`)"); @@ -319,7 +318,7 @@ class PlayerPropsDrop extends Widget return; } $header = ['name', 'foot', 'events', 'average min', 'position', 'on field', 'gls', 'fls', 'ofs', 'snt', 'tsh', 'crd']; - $copystring = implode(';', $header)."\n"; + $copystring = implode(';', $header) . "\n"; foreach ($this->players as $row) { $tmp = []; $tmp[] = $row['name']; @@ -339,7 +338,7 @@ class PlayerPropsDrop extends Widget $tmp[] = $row['tsh']; $tmp[] = $row['crd']; - $copystring .= implode(';', $tmp)."\n"; + $copystring .= implode(';', $tmp) . "\n"; } $this->js("navigator.clipboard.writeText(`$copystring`)"); @@ -408,7 +407,7 @@ class PlayerPropsDrop extends Widget "shots_on_target" => 3 "shots_off_target" => 2 "total_shots" => 4 - */ + */ $ss_player_id = $val->ss_player_id; $position = $val->details->position; @@ -454,8 +453,8 @@ class PlayerPropsDrop extends Widget $bettypes = ['goals', 'cards', 'fouls', 'offsides', 'total_shots', 'shots_on_target']; foreach ($bettypes as $bettype) { - $asp_statistica = (float) SofaScorePlayerPosition::where('ss_code', $position)->value('exp_'.$bettype); - $tmp['asp_statistica_'.$bettype] = $asp_statistica; + $asp_statistica = (float) SofaScorePlayerPosition::where('ss_code', $position)->value('exp_' . $bettype); + $tmp['asp_statistica_' . $bettype] = $asp_statistica; switch ($bettype) { case 'goals': @@ -464,8 +463,8 @@ class PlayerPropsDrop extends Widget } else { $asp_gioco = $val->goals / $val->total_min * 90; } - $tmp['asp_gioco_'.$bettype] = $asp_gioco; - $tmp['asp_teorica_'.$bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); + $tmp['asp_gioco_' . $bettype] = $asp_gioco; + $tmp['asp_teorica_' . $bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); break; case 'cards': if ($val->total_min < $this->y_value) { @@ -473,8 +472,8 @@ class PlayerPropsDrop extends Widget } else { $asp_gioco = $val->cards / $val->total_min * 90; } - $tmp['asp_gioco_'.$bettype] = $asp_gioco; - $tmp['asp_teorica_'.$bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); + $tmp['asp_gioco_' . $bettype] = $asp_gioco; + $tmp['asp_teorica_' . $bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); break; case 'fouls': if ($val->total_min < $this->y_value) { @@ -482,8 +481,8 @@ class PlayerPropsDrop extends Widget } else { $asp_gioco = $val->fouls / $val->total_min * 90; } - $tmp['asp_gioco_'.$bettype] = $asp_gioco; - $tmp['asp_teorica_'.$bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); + $tmp['asp_gioco_' . $bettype] = $asp_gioco; + $tmp['asp_teorica_' . $bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); break; case 'offsides': if ($val->total_min < $this->y_value) { @@ -491,8 +490,8 @@ class PlayerPropsDrop extends Widget } else { $asp_gioco = $val->offsides / $val->total_min * 90; } - $tmp['asp_gioco_'.$bettype] = $asp_gioco; - $tmp['asp_teorica_'.$bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); + $tmp['asp_gioco_' . $bettype] = $asp_gioco; + $tmp['asp_teorica_' . $bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); break; case 'total_shots': if ($val->total_min < $this->y_value) { @@ -500,8 +499,8 @@ class PlayerPropsDrop extends Widget } else { $asp_gioco = $val->total_shots / $val->total_min * 90; } - $tmp['asp_gioco_'.$bettype] = $asp_gioco; - $tmp['asp_teorica_'.$bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); + $tmp['asp_gioco_' . $bettype] = $asp_gioco; + $tmp['asp_teorica_' . $bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); break; case 'shots_on_target': if ($val->total_min < $this->y_value) { @@ -509,8 +508,8 @@ class PlayerPropsDrop extends Widget } else { $asp_gioco = $val->shots_on_target / $val->total_min * 90; } - $tmp['asp_gioco_'.$bettype] = $asp_gioco; - $tmp['asp_teorica_'.$bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); + $tmp['asp_gioco_' . $bettype] = $asp_gioco; + $tmp['asp_teorica_' . $bettype] = ($this->x_value * $asp_gioco + $asp_statistica) / (1 + $this->x_value); break; } } @@ -531,7 +530,7 @@ class PlayerPropsDrop extends Widget $bettypes = ['goals', 'cards', 'fouls', 'offsides', 'total_shots', 'shots_on_target']; foreach ($bettypes as $bettype) { - $total_bettype = array_sum(array_column($results, 'asp_teorica_'.$bettype)); + $total_bettype = array_sum(array_column($results, 'asp_teorica_' . $bettype)); foreach ($results as $key => $value) { switch ($bettype) { @@ -542,38 +541,38 @@ class PlayerPropsDrop extends Widget $asp_team_riferimento = (float) $asp_team * $count_player / 10; $results[$key]['asp_riferimento_goals'] = $asp_team_riferimento; - $results[$key]['asp_total_'.$bettype] = $total_bettype; - $results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype; + $results[$key]['asp_player_' . $bettype] = $value['asp_teorica_' . $bettype] * $asp_team_riferimento / $total_bettype; + $results[$key]['asp_total_' . $bettype] = $total_bettype; break; case 'cards': $asp_team_riferimento = (float) $asp_team_all[$team_home_away]['crd'] * $count_player / 10; $results[$key]['asp_team_riferimento_card'] = $asp_team_riferimento; - $results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype; - $results[$key]['asp_total_'.$bettype] = $total_bettype; + $results[$key]['asp_total_' . $bettype] = $total_bettype; + $results[$key]['asp_player_' . $bettype] = $value['asp_teorica_' . $bettype] * $asp_team_riferimento / $total_bettype; break; case 'fouls': $asp_team_riferimento = (float) $asp_team_all[$team_home_away]['fls'] * $count_player / 10; $results[$key]['asp_team_riferimento_fouls'] = $asp_team_riferimento; - $results[$key]['asp_total_'.$bettype] = $total_bettype; - $results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype; + $results[$key]['asp_total_' . $bettype] = $total_bettype; + $results[$key]['asp_player_' . $bettype] = $value['asp_teorica_' . $bettype] * $asp_team_riferimento / $total_bettype; break; case 'offsides': $asp_team_riferimento = (float) $asp_team_all[$team_home_away]['ofs'] * $count_player / 10; $results[$key]['asp_team_riferimento_offside'] = $asp_team_riferimento; - $results[$key]['asp_total_'.$bettype] = $total_bettype; - $results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype; + $results[$key]['asp_total_' . $bettype] = $total_bettype; + $results[$key]['asp_player_' . $bettype] = $value['asp_teorica_' . $bettype] * $asp_team_riferimento / $total_bettype; break; case 'total_shots': $asp_team_riferimento = (float) $asp_team_all[$team_home_away]['tsh'] * $count_player / 10; $results[$key]['asp_team_riferimento_tsh'] = $asp_team_riferimento; - $results[$key]['asp_total_'.$bettype] = $total_bettype; - $results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype; + $results[$key]['asp_total_' . $bettype] = $total_bettype; + $results[$key]['asp_player_' . $bettype] = $value['asp_teorica_' . $bettype] * $asp_team_riferimento / $total_bettype; break; case 'shots_on_target': $asp_team_riferimento = (float) $asp_team_all[$team_home_away]['snt'] * $count_player / 10; $results[$key]['asp_team_riferimento_snt'] = $asp_team_riferimento; - $results[$key]['asp_total_'.$bettype] = $total_bettype; - $results[$key]['asp_player_'.$bettype] = $value['asp_teorica_'.$bettype] * $asp_team_riferimento / $total_bettype; + $results[$key]['asp_total_' . $bettype] = $total_bettype; + $results[$key]['asp_player_' . $bettype] = $value['asp_teorica_' . $bettype] * $asp_team_riferimento / $total_bettype; break; } } diff --git a/composer.lock b/composer.lock index 4bce2162..5ab4f725 100644 --- a/composer.lock +++ b/composer.lock @@ -1584,16 +1584,16 @@ }, { "name": "filament/actions", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "2a85c76d75854c5a633ea162ae541af6f9205f21" + "reference": "d52683c6624d7adbae5979dc5474632b3299f47f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/2a85c76d75854c5a633ea162ae541af6f9205f21", - "reference": "2a85c76d75854c5a633ea162ae541af6f9205f21", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/d52683c6624d7adbae5979dc5474632b3299f47f", + "reference": "d52683c6624d7adbae5979dc5474632b3299f47f", "shasum": "" }, "require": { @@ -1629,20 +1629,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2026-09-07T18:43:33+00:00" + "time": "2026-09-15T16:56:37+00:00" }, { "name": "filament/filament", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "1c2d8ed04959da6da7b54bcd6e6b75aeb50ab19a" + "reference": "42dd202c91244526b01d94488ab16529f9e8511c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/1c2d8ed04959da6da7b54bcd6e6b75aeb50ab19a", - "reference": "1c2d8ed04959da6da7b54bcd6e6b75aeb50ab19a", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/42dd202c91244526b01d94488ab16529f9e8511c", + "reference": "42dd202c91244526b01d94488ab16529f9e8511c", "shasum": "" }, "require": { @@ -1687,20 +1687,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2026-09-08T10:21:33+00:00" + "time": "2026-09-15T16:56:51+00:00" }, { "name": "filament/forms", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "74b5cda7693267a55af24d314944c667d4669fab" + "reference": "3e162d96ff679b05e9e61c919a0d19a3923b979b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/74b5cda7693267a55af24d314944c667d4669fab", - "reference": "74b5cda7693267a55af24d314944c667d4669fab", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/3e162d96ff679b05e9e61c919a0d19a3923b979b", + "reference": "3e162d96ff679b05e9e61c919a0d19a3923b979b", "shasum": "" }, "require": { @@ -1737,20 +1737,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2026-09-08T10:24:44+00:00" + "time": "2026-09-15T16:59:23+00:00" }, { "name": "filament/infolists", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "6ebe9b6831c82ca8eab131e41317648d0482fce0" + "reference": "02616ec1a7ebf84ad72e82d5fe3464156d16628b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/6ebe9b6831c82ca8eab131e41317648d0482fce0", - "reference": "6ebe9b6831c82ca8eab131e41317648d0482fce0", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/02616ec1a7ebf84ad72e82d5fe3464156d16628b", + "reference": "02616ec1a7ebf84ad72e82d5fe3464156d16628b", "shasum": "" }, "require": { @@ -1782,20 +1782,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2026-09-07T18:43:33+00:00" + "time": "2026-09-15T17:00:55+00:00" }, { "name": "filament/notifications", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", - "reference": "a42cb3e6b217a5478bf974dbe4880daed2033cfd" + "reference": "56f89733b1e220ebb1d24d5ea032947c4655dab4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/notifications/zipball/a42cb3e6b217a5478bf974dbe4880daed2033cfd", - "reference": "a42cb3e6b217a5478bf974dbe4880daed2033cfd", + "url": "https://api.github.com/repos/filamentphp/notifications/zipball/56f89733b1e220ebb1d24d5ea032947c4655dab4", + "reference": "56f89733b1e220ebb1d24d5ea032947c4655dab4", "shasum": "" }, "require": { @@ -1829,20 +1829,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2026-09-07T18:43:33+00:00" + "time": "2026-09-15T16:57:16+00:00" }, { "name": "filament/query-builder", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/query-builder.git", - "reference": "311c5015b529043e229beeb1c8a54b95f2180f00" + "reference": "69402125ced6ee48d8ecd7ef895784fa46fb0423" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/query-builder/zipball/311c5015b529043e229beeb1c8a54b95f2180f00", - "reference": "311c5015b529043e229beeb1c8a54b95f2180f00", + "url": "https://api.github.com/repos/filamentphp/query-builder/zipball/69402125ced6ee48d8ecd7ef895784fa46fb0423", + "reference": "69402125ced6ee48d8ecd7ef895784fa46fb0423", "shasum": "" }, "require": { @@ -1875,11 +1875,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2026-09-07T18:43:22+00:00" + "time": "2026-09-15T16:57:17+00:00" }, { "name": "filament/schemas", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/schemas.git", @@ -1924,16 +1924,16 @@ }, { "name": "filament/support", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "1feb02e2535bdcab7e6acbf9e56ca1f5411ed24a" + "reference": "706ea6c6fee863b32ec3c249b2269e10cb307a78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/1feb02e2535bdcab7e6acbf9e56ca1f5411ed24a", - "reference": "1feb02e2535bdcab7e6acbf9e56ca1f5411ed24a", + "url": "https://api.github.com/repos/filamentphp/support/zipball/706ea6c6fee863b32ec3c249b2269e10cb307a78", + "reference": "706ea6c6fee863b32ec3c249b2269e10cb307a78", "shasum": "" }, "require": { @@ -1979,20 +1979,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2026-09-07T18:43:52+00:00" + "time": "2026-09-15T17:01:46+00:00" }, { "name": "filament/tables", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "758e62c4f4690a1e1faedd7348e18c44b8145488" + "reference": "a6d1f24ce6cafcf4ef270ac90a383e3601935996" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/758e62c4f4690a1e1faedd7348e18c44b8145488", - "reference": "758e62c4f4690a1e1faedd7348e18c44b8145488", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/a6d1f24ce6cafcf4ef270ac90a383e3601935996", + "reference": "a6d1f24ce6cafcf4ef270ac90a383e3601935996", "shasum": "" }, "require": { @@ -2025,11 +2025,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2026-09-07T18:44:28+00:00" + "time": "2026-09-15T17:01:34+00:00" }, { "name": "filament/widgets", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -5644,16 +5644,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "5.9.0", + "version": "5.10.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "05e99ebf61238a70227b4d9cc02d0030d34f6339" + "reference": "eb18727acf6b1f4cc67145a52ab04f9fd4c28d53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/05e99ebf61238a70227b4d9cc02d0030d34f6339", - "reference": "05e99ebf61238a70227b4d9cc02d0030d34f6339", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/eb18727acf6b1f4cc67145a52ab04f9fd4c28d53", + "reference": "eb18727acf6b1f4cc67145a52ab04f9fd4c28d53", "shasum": "" }, "require": { @@ -5682,6 +5682,7 @@ "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^2.0 || ^3.0", "ext-intl": "*", + "ext-openssl": "*", "friendsofphp/php-cs-fixer": "^3.2", "mitoteam/jpgraph": "^10.5", "mpdf/mpdf": "^8.1.1", @@ -5691,11 +5692,12 @@ "phpstan/phpstan-phpunit": "^1.0 || ^2.0", "phpunit/phpunit": "^10.5 || ^11.0", "squizlabs/php_codesniffer": "^3.7", - "tecnickcom/tcpdf": "^6.5" + "tecnickcom/tcpdf": ">=6.8.0 <7.0.0" }, "suggest": { "dompdf/dompdf": "Option for rendering PDF with PDF Writer", "ext-intl": "PHP Internationalization Functions, required for NumberFormat Wizard and StringHelper::setLocale()", + "ext-openssl": "Handline Agile-encrypted Xlsx spreadsheets", "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", "mpdf/mpdf": "Option for rendering PDF with PDF Writer", "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" @@ -5747,9 +5749,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/5.9.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/5.10.0" }, - "time": "2026-07-12T19:17:39+00:00" + "time": "2026-09-17T03:54:50+00:00" }, { "name": "phpoption/phpoption", @@ -6571,20 +6573,20 @@ }, { "name": "ramsey/uuid", - "version": "4.9.3", + "version": "4.9.4", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "1df15849d00943a67d677dc9cfd80795f038c9f8" + "reference": "75d73f48d02797c2c285a7e9f348fadc0102ffe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/1df15849d00943a67d677dc9cfd80795f038c9f8", - "reference": "1df15849d00943a67d677dc9cfd80795f038c9f8", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/75d73f48d02797c2c285a7e9f348fadc0102ffe2", + "reference": "75d73f48d02797c2c285a7e9f348fadc0102ffe2", "shasum": "" }, "require": { - "brick/math": ">=0.8.16 <=0.18", + "brick/math": "^0.8.16 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14 || ^0.15 || ^0.16 || ^0.17 || ^0.18 || ^0.19 || ^0.20 || ^1.0", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" }, @@ -6643,9 +6645,9 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.9.3" + "source": "https://github.com/ramsey/uuid/tree/4.9.4" }, - "time": "2026-06-18T03:57:49+00:00" + "time": "2026-09-16T11:39:30+00:00" }, { "name": "ryangjchandler/blade-capture-directive", @@ -10595,7 +10597,7 @@ }, { "name": "filament/upgrade", - "version": "v5.8.1", + "version": "v5.8.2", "source": { "type": "git", "url": "https://github.com/filamentphp/upgrade.git",