public function makeValid(): array {
        if ($this->isValid()) {
            return array($this);
        }

        $ret = array();
        foreach ($this->resources as $uri => $res) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array($uri => $res);
            $tmp->classes   = array();
            $ret[]          = $tmp;
        }
        foreach ($this->classes as $class) {
            $tmp            = clone($this);
            $tmp->uri       = '';
            $tmp->resources = array();
            $tmp->classes   = array($class => $class);
            $ret[]          = $tmp;
        }
        return $ret;
    }