public function toArray()
    {
        $state = [
            $this->key,
            $this->current ? $this->current->copy() : null,
            $this->validationResult,
        ];

        $result = iterator_to_array($this);

        [
            $this->key,
            $this->current,
            $this->validationResult
        ] = $state;

        return $result;
    }