provider = $provider; $this->score = max(0.0, min(1.0, $score)); $this->attributes = $attributes; } public function getProvider(): string { return $this->provider; } public function getScore(): float { return $this->score; } public function getAttributes(): array { return $this->attributes; } public function toArray(): array { return [ 'provider' => $this->provider, 'score' => $this->score, 'attributes' => $this->attributes, ]; } }