label; } /** * Set the information label * * @param string $label * @return $this */ protected function setLabel(string $label): static { $this->label = $label; return $this; } /** * Get the information value * * @return mixed */ public function getValue(): mixed { return $this->value; } /** * Set the information value * * @param mixed $value * @return $this */ public function setValue(mixed $value): static { $this->value = $value; return $this; } /** * Get a human-readable message * * @return string */ public function getMessage(): string { return $this->getLabel() . ": " . $this->getValue(); } /** * Check if the $insight object is equal with the current object * * @param InsightInterface $insight * @return bool */ public function isEqual(InsightInterface $insight): bool { return $insight instanceof InformationInterface && $this->getLabel() === $insight->getLabel() && $this->getValue() === $insight->getValue(); } /** * @return array */ public function jsonSerialize(): array { return array_merge(parent::jsonSerialize(), [ "label" => $this->getLabel(), "value" => $this->getValue() ]); } }