feature test su institution
This commit is contained in:
28
backend/app/Etl/ImportSummary.php
Normal file
28
backend/app/Etl/ImportSummary.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user