2013-10-08 08:21:46 +02:00
|
|
|
<?php
|
|
|
|
|
2016-07-19 20:28:11 +02:00
|
|
|
namespace PHPCensor\Model;
|
2013-10-08 08:21:46 +02:00
|
|
|
|
2018-03-09 19:00:53 +01:00
|
|
|
use PHPCensor\Model\Base\BuildMeta as BaseBuildMeta;
|
|
|
|
use PHPCensor\Store\BuildStore;
|
2018-03-04 08:30:34 +01:00
|
|
|
use PHPCensor\Store\Factory;
|
2013-10-08 08:21:46 +02:00
|
|
|
|
2018-03-09 19:00:53 +01:00
|
|
|
class BuildMeta extends BaseBuildMeta
|
2013-10-08 08:21:46 +02:00
|
|
|
{
|
2017-02-16 13:45:50 +01:00
|
|
|
/**
|
2018-03-09 19:00:53 +01:00
|
|
|
* @return Build|null
|
2017-02-16 13:45:50 +01:00
|
|
|
*/
|
|
|
|
public function getBuild()
|
|
|
|
{
|
2018-03-03 18:27:48 +01:00
|
|
|
$buildId = $this->getBuildId();
|
|
|
|
if (empty($buildId)) {
|
2017-02-16 13:45:50 +01:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2018-03-09 19:00:53 +01:00
|
|
|
/** @var BuildStore $buildStore */
|
|
|
|
$buildStore = Factory::getStore('Build');
|
|
|
|
|
|
|
|
return $buildStore->getById($buildId);
|
2017-02-16 13:45:50 +01:00
|
|
|
}
|
2013-10-08 08:21:46 +02:00
|
|
|
}
|