feat: import
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace KTXM\ChronoManager\Import;
|
||||
|
||||
use KTXM\ChronoManager\Stream\ExpectedTotal;
|
||||
|
||||
final readonly class ImportCountEvent implements ImportEvent, ExpectedTotal {
|
||||
|
||||
public function __construct(
|
||||
public int $total,
|
||||
) {}
|
||||
|
||||
public function expectedTotal(): int {
|
||||
return $this->total;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{total: int}
|
||||
*/
|
||||
public function jsonSerialize(): array {
|
||||
return ['total' => $this->total];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user