/**
  * {@inheritDoc}
  */
 public function getTags()
 {
     if ($this->gitDriver) {
         return $this->gitDriver->getTags();
     }
     if (null === $this->tags) {
         $tagsData = JsonFile::parseJson($this->getContents($this->getScheme() . '://api.github.com/repos/' . $this->owner . '/' . $this->repository . '/tags'));
         $this->tags = array();
         foreach ($tagsData as $tag) {
             $this->tags[$tag['name']] = $tag['commit']['sha'];
         }
     }
     return $this->tags;
 }
 /**
  * {@inheritDoc}
  */
 public function getTags()
 {
     if ($this->gitDriver) {
         return $this->gitDriver->getTags();
     }
     if (null === $this->tags) {
         $resource = $this->getScheme() . '://api.bitbucket.org/1.0/repositories/' . $this->owner . '/' . $this->repository . '/tags';
         $tagsData = JsonFile::parseJson($this->getContentsWithOAuthCredentials($resource), $resource);
         $this->tags = array();
         foreach ($tagsData as $tag => $data) {
             $this->tags[$tag] = $data['raw_node'];
         }
     }
     return $this->tags;
 }
 /**
  * {@inheritDoc}
  */
 public function getTags()
 {
     if ($this->gitDriver) {
         return $this->gitDriver->getTags();
     }
     if (null === $this->tags) {
         $resource = $this->getApiUrl() . '/repos/' . $this->owner . '/' . $this->repository . '/tags';
         $tagsData = JsonFile::parseJson($this->getContents($resource), $resource);
         $this->tags = array();
         foreach ($tagsData as $tag) {
             $this->tags[$tag['name']] = $tag['commit']['sha'];
         }
     }
     return $this->tags;
 }
 /**
  * {@inheritDoc}
  */
 public function getTags()
 {
     if (null === $this->tags) {
         $this->tags = parent::getTags();
         // Remove invalid tags.
         foreach ($this->tags as $tag => $hash) {
             if (!$this->getVersion($tag)) {
                 unset($this->tags[$tag]);
             }
         }
     }
     $tags = [];
     foreach ($this->tags as $tag => $hash) {
         if ($version = $this->getVersion($tag)) {
             $tags[$version->getSemVer()] = $hash;
         }
     }
     return $tags;
 }