fixed import

This commit is contained in:
salam committed 2026-11-01 13:45:25 +01:00
1 parent 5ac208191b
commit e6ecd7ff8a
2 files changed
+2 -10

No files matched your search

@@ -7,8 +7,6 @@ use Illuminate\Support\Carbon;
use Illuminate\Support\LazyCollection; use Illuminate\Support\LazyCollection;
use Spatie\SimpleExcel\SimpleExcelReader; use Spatie\SimpleExcel\SimpleExcelReader;
use function PHPUnit\Framework\isEmpty;
class ImportFixtures class ImportFixtures
{ {
public static function run(string $filePath): void public static function run(string $filePath): void
@@ -22,10 +20,6 @@ class ImportFixtures
$row = array_values($row); $row = array_values($row);
if (isEmpty($row[1])) {
return false;
}
/* /*
0 => 1 0 => 1
1 => 87 1 => 87
+2 -4
View File
@@ -7,8 +7,6 @@ use Illuminate\Support\Carbon;
use Illuminate\Support\LazyCollection; use Illuminate\Support\LazyCollection;
use Spatie\SimpleExcel\SimpleExcelReader; use Spatie\SimpleExcel\SimpleExcelReader;
use function PHPUnit\Framework\isEmpty;
class ImportPlayer class ImportPlayer
{ {
public static function run(string $filePath): void public static function run(string $filePath): void
@@ -100,10 +98,10 @@ class ImportPlayer
$update_array = []; $update_array = [];
foreach ($fieldnames as $key => $name) { foreach ($fieldnames as $key => $name) {
if ($key == 1) { if ($key == 1) {
if (isEmpty($row[$key])) { $match_id = (int) $row[$key];
if (! $match_id) {
return false; return false;
} }
$match_id = (int) $row[$key];
} elseif ($key == 2) { } elseif ($key == 2) {
$ss_player_id = (int) $row[$key]; $ss_player_id = (int) $row[$key];
} elseif ($key == 3) { } elseif ($key == 3) {