key; } /** * @return array> */ public function toArray(): array { $array = [ 'buckets_path' => $this->bucketsPath, 'window' => $this->window, 'script' => $this->script, ]; if ($this->shift !== null) { $array['shift'] = $this->shift; } if ($this->gapPolicy !== null) { $array['gap_policy'] = $this->gapPolicy; } return [ 'moving_fn' => $array, ]; } }