21 lines
455 B
PHP
21 lines
455 B
PHP
<?php
|
|
|
|
namespace App\Domain\Reports\Models;
|
|
|
|
final readonly class PatientCollection
|
|
{
|
|
/**
|
|
* @param array<int, array<string, mixed>> $items
|
|
* @param array<string, mixed> $metadata
|
|
*/
|
|
public function __construct(
|
|
public array $items = [],
|
|
public array $metadata = [],
|
|
) {}
|
|
|
|
public function metadata(string $key, mixed $default = null): mixed
|
|
{
|
|
return $this->metadata[$key] ?? $default;
|
|
}
|
|
}
|