NextProducer
This trait used to produce incremented Version.
Table of Contents
Methods
- getNextMajorVersion() : Version
- Produces the next major version.
- getNextMinorVersion() : Version
- Produces the next minor version.
- getNextPatchVersion() : Version
- Produces the next patch version.
- getNextPreReleaseVersion() : Version
- Produces the next pre-release version.
- inc() : Version
- Increases the version by its Inc::MAJOR, Inc::MINOR, Inc::PATCH, or Inc::PRE_RELEASE segment.
Methods
getNextMajorVersion()
Produces the next major version.
public
getNextMajorVersion([null|string $preRelease = null ]) : Version
Parameters
- $preRelease : null|string = null
-
the pre-release part
Tags
Return values
Version —the next major version
getNextMinorVersion()
Produces the next minor version.
public
getNextMinorVersion([null|string $preRelease = null ]) : Version
Parameters
- $preRelease : null|string = null
-
the pre-release part
Tags
Return values
Version —the next minor version
getNextPatchVersion()
Produces the next patch version.
public
getNextPatchVersion([null|string $preRelease = null ]) : Version
Parameters
- $preRelease : null|string = null
-
the pre-release part
Tags
Return values
Version —the next patch version
getNextPreReleaseVersion()
Produces the next pre-release version.
public
getNextPreReleaseVersion([null|string $preRelease = null ]) : Version
Parameters
- $preRelease : null|string = null
-
the pre-release part
Tags
Return values
Version —the next pre-release version
inc()
Increases the version by its Inc::MAJOR, Inc::MINOR, Inc::PATCH, or Inc::PRE_RELEASE segment.
public
inc(int $by[, null|string $preRelease = null ]) : Version
Returns a new version while the original remains unchanged.
Parameters
- $by : int
-
determines by which part the Version should be incremented
- $preRelease : null|string = null
-
the optional pre-release part
Tags
Return values
Version —the incremented version