protected function setData(array $data) : Frame
    {
        $this->file     = $data['file']     ?? '';
        $this->line     = $data['line']     ?? 0;
        $this->class    = $data['class']    ?? '';
        $this->function = $data['function'] ?? '';
        $this->type     = $data['type']     ?? '';
        $this->args     = $data['args']     ?? [];

        // If we're dealing with a class, try to get its namespace and short name.
        if ($this->class) {
            $parts = explode('\\', $this->class);

            $this->shortClass = array_pop($parts);
            $this->namespace  = implode('\\', $parts);
        } else {
            // Otherwise initialize with zero-values.
            $this->shortClass = '';
            $this->namespace  = '';
        }

        return $this;
    }