protected function searchUrlPatterns(\stdClass $json, array $patterns)
    {
        $errors = array();
        foreach ($json->packages as $package) {
            if (!isset($package->source)) {
                $this->verbose('Source not found in "' . $package->name . "\"\n", OutputInterface::VERBOSITY_VERBOSE);
                $url = '';
            }else{
                $url = $package->source->url;
            }

            if (!$this->doesUrlMatchToAtLeastOnePattern($url, $patterns)) {
                $errors[$package->name] = $url;
            }
        }

        return $errors;
    }