for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Conveyor package.
*
* (c) Jeroen Fiege <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webcreate\Conveyor\Repository;
class Version
{
/**
* @var string
protected $name;
protected $build;
* @param string|null $name
* @param string|null $build
public function __construct($name = null , $build = null)
if (null !== $name) {
$this->setName($name);
}
if (null !== $build) {
$this->setBuild($build);
* @return null|string
public function getBuild()
return $this->build;
* @param string $build
* @return $this
public function setBuild($build)
$this->build = (string) $build;
return $this;
public function getName()
return $this->name;
* @param string $name
public function setName($name)
$this->name = (string) $name;
* @return string
public function getUID()
return sprintf('%s:%s', $this->name, $this->build);
public function __toString()
return $this->getUID();
* @param Version $version
* @return bool
public function equals(Version $version)
return (
$this->name === $version->getName()
&& $this->build === $version->getBuild()
);