22 lines
529 B
PHP
22 lines
529 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Application\Usecase\Employees\FindAll;
|
|
|
|
use Shared\DDD\Usecase\Output as UsecaseOutput;
|
|
|
|
final readonly class Output implements UsecaseOutput
|
|
{
|
|
public function __construct(
|
|
/** @var PaginatedEmployee[] */
|
|
public array $employees = [],
|
|
public int $total = 0,
|
|
public int $page = 1,
|
|
public int $perPage = 10,
|
|
) {
|
|
foreach ($this->employees as $employee) {
|
|
assert($employee instanceof PaginatedEmployee);
|
|
}
|
|
}
|
|
}
|