data = $data; } /** * @return string */ public function getKey(): string { return (string)( $this->data[ self::KEY ] ?? '' ); } /** * @return float|int|null */ public function getDeliverAtTime() { $seconds = $this->data[ self::DELAY_SECONDS ] ?? null; if ($seconds) { return (int)( ( time() + $seconds ) * 1000 ); } return null; } }