Перевод на доменную архитектуру
This commit is contained in:
23
app/Domain/Reports/Models/MetricResultCollection.php
Normal file
23
app/Domain/Reports/Models/MetricResultCollection.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Reports\Models;
|
||||
|
||||
use App\Domain\Reports\ValueObjects\MetrikaConfig;
|
||||
|
||||
final readonly class MetricResultCollection
|
||||
{
|
||||
/**
|
||||
* @param array<int|string, int|float|string|null> $metrics
|
||||
*/
|
||||
public function __construct(
|
||||
public array $metrics = [],
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @return array<int, int|float|string|null>
|
||||
*/
|
||||
public function normalized(): array
|
||||
{
|
||||
return MetrikaConfig::normalizeMetrics($this->metrics);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user