protected function popState()
    {
        if (count($this->states) === 0) {
            throw new RuntimeException('Cannot pop state without a previous state');
        }

        $this->state = array_pop($this->states);
    }