29 lines
503 B
PHP
29 lines
503 B
PHP
<?php
|
|
|
|
namespace App\Etl;
|
|
|
|
/**
|
|
* Esito di un import: conteggi e avvisi non bloccanti (da stampare nel comando).
|
|
*/
|
|
class ImportSummary
|
|
{
|
|
public int $created = 0;
|
|
|
|
public int $updated = 0;
|
|
|
|
public int $skipped = 0;
|
|
|
|
/** @var list<string> */
|
|
public array $warnings = [];
|
|
|
|
public function warn(string $message): void
|
|
{
|
|
$this->warnings[] = $message;
|
|
}
|
|
|
|
public function total(): int
|
|
{
|
|
return $this->created + $this->updated + $this->skipped;
|
|
}
|
|
}
|