field = trim($field); $this->value = $value; $this->provider = trim($provider) ?: 'unknown'; $this->confidence = max(0.0, min(1.0, $confidence)); $this->quality = max(0.0, min(1.0, $quality)); $this->observedAt = $observedAt; } public function getField(): string { return $this->field; } public function getValue() { return $this->value; } public function getProvider(): string { return $this->provider; } public function getConfidence(): float { return $this->confidence; } public function getQuality(): float { return $this->quality; } public function getObservedAt(): ?\DateTimeImmutable { return $this->observedAt; } }