value = $state['value']; $this->renewedAt = $state['renewedAt']; } /** @param array{value: string, renewedAt: int} $state */ public static function fromState(array $state): self { return new self($state); } public function value(): string { return $this->value; } public function renewedAt(): int { return $this->renewedAt; } public function renewed(string $replacementValue, int $renewedAt): self { return new self(array( 'value' => $replacementValue, 'renewedAt' => $renewedAt, )); } }