public function getNormalizedURI()
 {
     $vcs = $this->getRepository()->getVersionControlSystem();
     $map = array(PhabricatorRepositoryType::REPOSITORY_TYPE_GIT => PhabricatorRepositoryURINormalizer::TYPE_GIT, PhabricatorRepositoryType::REPOSITORY_TYPE_SVN => PhabricatorRepositoryURINormalizer::TYPE_SVN, PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL => PhabricatorRepositoryURINormalizer::TYPE_MERCURIAL);
     $type = $map[$vcs];
     $display = (string) $this->getDisplayURI();
     $normal_uri = new PhabricatorRepositoryURINormalizer($type, $display);
     return $normal_uri->getNormalizedURI();
 }
 private function getNormalizedURIs()
 {
     $normalized_uris = array();
     // Since we don't know which type of repository this URI is in the general
     // case, just generate all the normalizations. We could refine this in some
     // cases: if the query specifies VCS types, or the URI is a git-style URI
     // or an `svn+ssh` URI, we could deduce how to normalize it. However, this
     // would be more complicated and it's not clear if it matters in practice.
     $types = PhabricatorRepositoryURINormalizer::getAllURITypes();
     foreach ($this->uris as $uri) {
         foreach ($types as $type) {
             $normalized_uri = new PhabricatorRepositoryURINormalizer($type, $uri);
             $normalized_uris[] = $normalized_uri->getNormalizedURI();
         }
     }
     return array_unique($normalized_uris);
 }