public function enqueue($data): bool {
        if (null === $data) {
            return false;
        }
        if ($this->isFull()) {
            return false;
        }
        $this->head = $this->head % $this->size;
        $this->elements[$this->head] = $data;
        $this->head++;
        return true;
    }