qualityScore = max(0.0, min(1.0, $qualityScore)); $this->providerScore = max(0.0, min(1.0, $providerScore)); $this->metrics = $metrics; } public function getQualityScore(): float { return $this->qualityScore; } public function getProviderScore(): float { return $this->providerScore; } public function getCombinedScore(): float { return round(($this->qualityScore * 0.7) + ($this->providerScore * 0.3), 4); } public function getMetrics(): array { return $this->metrics; } public function compare(self $other): int { return $this->getCombinedScore() <=> $other->getCombinedScore(); } }