12-05-2026 Frontend dev
This commit is contained in:
parent
405df0a122
commit
5b8bdf4182
779 changed files with 480564 additions and 6241 deletions
69
app/Services/Import/ImportResult.php
Normal file
69
app/Services/Import/ImportResult.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
|
||||
namespace App\Services\Import;
|
||||
|
||||
final class ImportResult
|
||||
{
|
||||
private int $imported = 0;
|
||||
|
||||
private int $skipped = 0;
|
||||
|
||||
private int $updated = 0;
|
||||
|
||||
private int $failed = 0;
|
||||
|
||||
/** @var string[] */
|
||||
private array $errors = [];
|
||||
|
||||
public function incrementImported(): void
|
||||
{
|
||||
$this->imported++;
|
||||
}
|
||||
|
||||
public function incrementSkipped(): void
|
||||
{
|
||||
$this->skipped++;
|
||||
}
|
||||
|
||||
public function incrementUpdated(): void
|
||||
{
|
||||
$this->updated++;
|
||||
}
|
||||
|
||||
public function addError(string $message): void
|
||||
{
|
||||
$this->failed++;
|
||||
$this->errors[] = $message;
|
||||
}
|
||||
|
||||
public function imported(): int
|
||||
{
|
||||
return $this->imported;
|
||||
}
|
||||
|
||||
public function skipped(): int
|
||||
{
|
||||
return $this->skipped;
|
||||
}
|
||||
|
||||
public function updated(): int
|
||||
{
|
||||
return $this->updated;
|
||||
}
|
||||
|
||||
public function failed(): int
|
||||
{
|
||||
return $this->failed;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
public function errors(): array
|
||||
{
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
public function summary(): string
|
||||
{
|
||||
return "Importiert: {$this->imported} | Übersprungen: {$this->skipped} | Aktualisiert: {$this->updated} | Fehler: {$this->failed}";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue