Fixed debug build from GUI for environments

This commit is contained in:
Dmitry Khomutov 2017-04-01 11:32:39 +07:00
commit a3ef15b488
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
5 changed files with 69 additions and 48 deletions

View file

@ -570,7 +570,6 @@ class Build extends Model
/**
* Set the values of Extra / extra.
*
* @param $name string
* @param $values mixed
*/
public function setExtraValues($values)
@ -583,6 +582,26 @@ class Build extends Model
$this->setExtra(json_encode($extra));
}
/**
* Return a value from the build's "extra" JSON array.
* @param null $key
* @return mixed|null|string
*/
public function getExtra($key = null)
{
$data = json_decode($this->data['extra'], true);
if (is_null($key)) {
$rtn = $data;
} elseif (isset($data[$key])) {
$rtn = $data[$key];
} else {
$rtn = null;
}
return $rtn;
}
/**
* Get the Project model for this Build by Id.
*
@ -801,26 +820,6 @@ class Build extends Model
return $config;
}
/**
* Return a value from the build's "extra" JSON array.
* @param null $key
* @return mixed|null|string
*/
public function getExtra($key = null)
{
$data = json_decode($this->data['extra'], true);
if (is_null($key)) {
$rtn = $data;
} elseif (isset($data[$key])) {
$rtn = $data[$key];
} else {
$rtn = null;
}
return $rtn;
}
/**
* Returns the commit message for this build.
* @return string