Перевод на доменную архитектуру
This commit is contained in:
20
app/Domain/Reports/Models/PatientCollection.php
Normal file
20
app/Domain/Reports/Models/PatientCollection.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user