value = $value; } else { throw new InvalidArgumentException('FixedWidthValue can only contain fixed width types, got '.$type); } } /** * @psalm-api * * @psalm-return FixedWidthType */ public function getValue() { return $this->value; } public function getDisplaySize(): ?string { return null; } public function getDisplayValue(): ?string { if ('boolean' === $this->type) { return ((bool) $this->value) ? 'true' : 'false'; } if ('integer' === $this->type || 'double' === $this->type) { return (string) $this->value; } return null; } }