Naneau\SemVer\Version::cleanCopy PHP Method

cleanCopy() public method

Create a new Version that discards the entity information of build and originalVersionString
public cleanCopy ( ) : Version
return Version
    public function cleanCopy()
    {
        $version = new Version();
        $version->setMajor($this->getMajor());
        $version->setMinor($this->getMinor());
        $version->setPatch($this->getPatch());
        if ($this->hasPreRelease()) {
            $version->preRelease = clone $this->getPreRelease();
        }
        return $version;
    }