ldc-cocotte/app/Cqs/Actions/Employee/ImportEmployeesOutput.php

24 lines
486 B
PHP
Raw Permalink Normal View History

<?php
declare(strict_types=1);
namespace App\Cqs\Actions\Employee;
use Webmozart\Assert\Assert;
final readonly class ImportEmployeesOutput
{
/**
* @param array<int, string> $errors
*/
public function __construct(
public int $insertedCount,
public int $updatedCount,
public array $errors
) {
Assert::greaterThanEq($insertedCount, 0);
Assert::greaterThanEq($updatedCount, 0);
Assert::allString($errors);
}
}