/**
  * Increment the version number
  * @param  string                         $what One of 'major', 'minor', 'patch' or 'prerelease'
  * @return \vierbergenlars\SemVer\version
  * @throws LogicException                When an invalid increment value is given
  */
 public function inc($what)
 {
     $this->version->inc($what);
     return $this;
 }
Exemple #2
0
function inc($version, $release, $loose = false)
{
    try {
        $s = new SemVer($version, $loose);
        return (string) $s->inc($release)->version;
    } catch (\Exception $e) {
        return null;
    }
}