isDev() public method

Return whether the version is dev or not.
public isDev ( ) : string
return string
コード例 #1
0
 public function test_it_detects_dev_version()
 {
     $this->SUT = new Version('v1.0.0.0', 'v1.0.0', 'v1.0.0');
     $this->assertFalse($this->SUT->isDev());
     $this->SUT = new Version('v.1.0.9999999.9999999-dev', 'dev-master', 'dev-master 1234abc');
     $this->assertTrue($this->SUT->isDev());
     $this->SUT = new Version('dev-fix/issue', 'dev-fix/issue', 'dev-fix/issue 1234abc');
     $this->assertTrue($this->SUT->isDev());
 }
コード例 #2
0
 /**
  * Get the version to use for the compare url.
  *
  * For dev versions, it returns the commit short hash in full pretty version.
  *
  * @param Version $version
  *
  * @return string
  */
 protected function getCompareVersion(Version $version)
 {
     if ($version->isDev()) {
         return substr($version->getFullPretty(), strlen($version->getPretty()) + 1);
     }
     return $version->getPretty();
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function generateReleaseUrl($sourceUrl, Version $version)
 {
     if ($version->isDev()) {
         return false;
     }
     return sprintf('%s/releases/tag/%s', $this->generateBaseUrl($sourceUrl), $version->getPretty());
 }
コード例 #4
0
 /**
  * Return whether the version is dev or not.
  *
  * @param Version $version
  *
  * @return string
  *
  * @deprecated since v1.4, will be removed in v2.0. Use $version->isDev() instead.
  */
 protected function isDevVersion(Version $version)
 {
     return $version->isDev();
 }