Better docblock type hinting for stores.
This commit is contained in:
parent
cccf0b9869
commit
d060227fbd
10 changed files with 105 additions and 50 deletions
|
|
@ -22,9 +22,14 @@ use PHPCI\Model\Build;
|
|||
*/
|
||||
class BuildStatusController extends \PHPCI\Controller
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Store\ProjectStore
|
||||
*/
|
||||
protected $projectStore;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->_projectStore = Store\Factory::getStore('Project');
|
||||
$this->projectStore = Store\Factory::getStore('Project');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -32,9 +37,9 @@ class BuildStatusController extends \PHPCI\Controller
|
|||
*/
|
||||
public function image($projectId)
|
||||
{
|
||||
$branch = $this->getParam('branch', 'master');
|
||||
$project = $this->_projectStore->getById($projectId);
|
||||
$status = 'ok';
|
||||
$branch = $this->getParam('branch', 'master');
|
||||
$project = $this->projectStore->getById($projectId);
|
||||
$status = 'ok';
|
||||
|
||||
if (isset($project) && $project instanceof Project) {
|
||||
$build = $project->getLatestBuild($branch, array(2,3));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue