This commit is contained in:
salam committed 2026-06-06 12:01:53 +02:00
1 parent 57c695c247
commit d4dfb9748c
19 files changed
+269 -7252

No files matched your search

+4 -4
View File
@@ -7,10 +7,10 @@ use Illuminate\Database\Eloquent\Model;
class Sport extends Model
{
public static function map($field, $reverse = false, $limit = [])
public static function map(string $field, $reverse = false, $limit = [])
{
if (! in_array($field, ['bapi', 'bwin', 'b365', 'logi', 'magl'])) {
Notice::note('Sport::map wrong option! Possible options: bapi, bwin, b365, logi, magl', 'r', 1);
if (! in_array($field, ['bapi', 'bwin', 'b365', 'logi', 'magl', 'sofascore'])) {
Notice::note('Sport::map wrong option! Possible options: bapi, bwin, b365, logi, magl, sofascore', 'r', 1);
}
if ($reverse) {
@@ -33,7 +33,7 @@ class Sport extends Model
return Sport::query()->where('is_active', 1)->pluck('id')->toArray();
}
public static function getSportForClient($client_id)
public static function getSportForClient(int $client_id)
{
$sports = Client::where('id', $client_id)->value('sport');