Code style fixes
This commit is contained in:
parent
0868eb9c69
commit
6891b8a75f
87 changed files with 598 additions and 603 deletions
|
|
@ -17,7 +17,7 @@ class BuildBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $sleepable = array();
|
||||
public static $sleepable = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
|
@ -32,155 +32,155 @@ class BuildBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $data = array(
|
||||
'id' => null,
|
||||
'project_id' => null,
|
||||
'commit_id' => null,
|
||||
'status' => null,
|
||||
'log' => null,
|
||||
'branch' => null,
|
||||
'created' => null,
|
||||
'started' => null,
|
||||
'finished' => null,
|
||||
protected $data = [
|
||||
'id' => null,
|
||||
'project_id' => null,
|
||||
'commit_id' => null,
|
||||
'status' => null,
|
||||
'log' => null,
|
||||
'branch' => null,
|
||||
'created' => null,
|
||||
'started' => null,
|
||||
'finished' => null,
|
||||
'committer_email' => null,
|
||||
'commit_message' => null,
|
||||
'extra' => null,
|
||||
);
|
||||
'commit_message' => null,
|
||||
'extra' => null,
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $getters = array(
|
||||
protected $getters = [
|
||||
// Direct property getters:
|
||||
'id' => 'getId',
|
||||
'project_id' => 'getProjectId',
|
||||
'commit_id' => 'getCommitId',
|
||||
'status' => 'getStatus',
|
||||
'log' => 'getLog',
|
||||
'branch' => 'getBranch',
|
||||
'created' => 'getCreated',
|
||||
'started' => 'getStarted',
|
||||
'finished' => 'getFinished',
|
||||
'id' => 'getId',
|
||||
'project_id' => 'getProjectId',
|
||||
'commit_id' => 'getCommitId',
|
||||
'status' => 'getStatus',
|
||||
'log' => 'getLog',
|
||||
'branch' => 'getBranch',
|
||||
'created' => 'getCreated',
|
||||
'started' => 'getStarted',
|
||||
'finished' => 'getFinished',
|
||||
'committer_email' => 'getCommitterEmail',
|
||||
'commit_message' => 'getCommitMessage',
|
||||
'extra' => 'getExtra',
|
||||
'commit_message' => 'getCommitMessage',
|
||||
'extra' => 'getExtra',
|
||||
|
||||
// Foreign key getters:
|
||||
'Project' => 'getProject',
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $setters = array(
|
||||
protected $setters = [
|
||||
// Direct property setters:
|
||||
'id' => 'setId',
|
||||
'project_id' => 'setProjectId',
|
||||
'commit_id' => 'setCommitId',
|
||||
'status' => 'setStatus',
|
||||
'log' => 'setLog',
|
||||
'branch' => 'setBranch',
|
||||
'created' => 'setCreated',
|
||||
'started' => 'setStarted',
|
||||
'finished' => 'setFinished',
|
||||
'id' => 'setId',
|
||||
'project_id' => 'setProjectId',
|
||||
'commit_id' => 'setCommitId',
|
||||
'status' => 'setStatus',
|
||||
'log' => 'setLog',
|
||||
'branch' => 'setBranch',
|
||||
'created' => 'setCreated',
|
||||
'started' => 'setStarted',
|
||||
'finished' => 'setFinished',
|
||||
'committer_email' => 'setCommitterEmail',
|
||||
'commit_message' => 'setCommitMessage',
|
||||
'extra' => 'setExtra',
|
||||
'commit_message' => 'setCommitMessage',
|
||||
'extra' => 'setExtra',
|
||||
|
||||
// Foreign key setters:
|
||||
'Project' => 'setProject',
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $columns = array(
|
||||
'id' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'primary_key' => true,
|
||||
public $columns = [
|
||||
'id' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'primary_key' => true,
|
||||
'auto_increment' => true,
|
||||
'default' => null,
|
||||
],
|
||||
'project_id' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'default' => null,
|
||||
),
|
||||
'project_id' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
],
|
||||
'commit_id' => [
|
||||
'type' => 'varchar',
|
||||
'length' => 50,
|
||||
'default' => null,
|
||||
),
|
||||
'commit_id' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 50,
|
||||
],
|
||||
'status' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'default' => null,
|
||||
),
|
||||
'status' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'default' => null,
|
||||
),
|
||||
'log' => array(
|
||||
'type' => 'mediumtext',
|
||||
],
|
||||
'log' => [
|
||||
'type' => 'mediumtext',
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
'branch' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 50,
|
||||
'default' => null,
|
||||
],
|
||||
'branch' => [
|
||||
'type' => 'varchar',
|
||||
'length' => 50,
|
||||
'default' => 'master',
|
||||
),
|
||||
'created' => array(
|
||||
'type' => 'datetime',
|
||||
],
|
||||
'created' => [
|
||||
'type' => 'datetime',
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
'started' => array(
|
||||
'type' => 'datetime',
|
||||
'default' => null,
|
||||
],
|
||||
'started' => [
|
||||
'type' => 'datetime',
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
'finished' => array(
|
||||
'type' => 'datetime',
|
||||
'default' => null,
|
||||
],
|
||||
'finished' => [
|
||||
'type' => 'datetime',
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
'committer_email' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 512,
|
||||
'default' => null,
|
||||
],
|
||||
'committer_email' => [
|
||||
'type' => 'varchar',
|
||||
'length' => 512,
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
'commit_message' => array(
|
||||
'type' => 'text',
|
||||
'default' => null,
|
||||
],
|
||||
'commit_message' => [
|
||||
'type' => 'text',
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
'extra' => array(
|
||||
'type' => 'text',
|
||||
'default' => null,
|
||||
],
|
||||
'extra' => [
|
||||
'type' => 'text',
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
);
|
||||
'default' => null,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $indexes = array(
|
||||
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
||||
'project_id' => array('columns' => 'project_id'),
|
||||
'idx_status' => array('columns' => 'status'),
|
||||
);
|
||||
public $indexes = [
|
||||
'PRIMARY' => ['unique' => true, 'columns' => 'id'],
|
||||
'project_id' => ['columns' => 'project_id'],
|
||||
'idx_status' => ['columns' => 'status'],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $foreignKeys = array(
|
||||
'build_ibfk_1' => array(
|
||||
'local_col' => 'project_id',
|
||||
'update' => 'CASCADE',
|
||||
'delete' => 'CASCADE',
|
||||
'table' => 'project',
|
||||
'col' => 'id'
|
||||
),
|
||||
);
|
||||
public $foreignKeys = [
|
||||
'build_ibfk_1' => [
|
||||
'local_col' => 'project_id',
|
||||
'update' => 'CASCADE',
|
||||
'delete' => 'CASCADE',
|
||||
'table' => 'project',
|
||||
'col' => 'id'
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the value of Id / id.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class BuildErrorBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $sleepable = array();
|
||||
public static $sleepable = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
|
@ -32,131 +32,131 @@ class BuildErrorBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $data = array(
|
||||
'id' => null,
|
||||
'build_id' => null,
|
||||
'plugin' => null,
|
||||
'file' => null,
|
||||
'line_start' => null,
|
||||
'line_end' => null,
|
||||
'severity' => null,
|
||||
'message' => null,
|
||||
protected $data = [
|
||||
'id' => null,
|
||||
'build_id' => null,
|
||||
'plugin' => null,
|
||||
'file' => null,
|
||||
'line_start' => null,
|
||||
'line_end' => null,
|
||||
'severity' => null,
|
||||
'message' => null,
|
||||
'created_date' => null,
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $getters = array(
|
||||
protected $getters = [
|
||||
// Direct property getters:
|
||||
'id' => 'getId',
|
||||
'build_id' => 'getBuildId',
|
||||
'plugin' => 'getPlugin',
|
||||
'file' => 'getFile',
|
||||
'line_start' => 'getLineStart',
|
||||
'line_end' => 'getLineEnd',
|
||||
'severity' => 'getSeverity',
|
||||
'message' => 'getMessage',
|
||||
'id' => 'getId',
|
||||
'build_id' => 'getBuildId',
|
||||
'plugin' => 'getPlugin',
|
||||
'file' => 'getFile',
|
||||
'line_start' => 'getLineStart',
|
||||
'line_end' => 'getLineEnd',
|
||||
'severity' => 'getSeverity',
|
||||
'message' => 'getMessage',
|
||||
'created_date' => 'getCreatedDate',
|
||||
|
||||
// Foreign key getters:
|
||||
'Build' => 'getBuild',
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $setters = array(
|
||||
protected $setters = [
|
||||
// Direct property setters:
|
||||
'id' => 'setId',
|
||||
'build_id' => 'setBuildId',
|
||||
'plugin' => 'setPlugin',
|
||||
'file' => 'setFile',
|
||||
'line_start' => 'setLineStart',
|
||||
'line_end' => 'setLineEnd',
|
||||
'severity' => 'setSeverity',
|
||||
'message' => 'setMessage',
|
||||
'id' => 'setId',
|
||||
'build_id' => 'setBuildId',
|
||||
'plugin' => 'setPlugin',
|
||||
'file' => 'setFile',
|
||||
'line_start' => 'setLineStart',
|
||||
'line_end' => 'setLineEnd',
|
||||
'severity' => 'setSeverity',
|
||||
'message' => 'setMessage',
|
||||
'created_date' => 'setCreatedDate',
|
||||
|
||||
// Foreign key setters:
|
||||
'Build' => 'setBuild',
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $columns = array(
|
||||
'id' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'primary_key' => true,
|
||||
public $columns = [
|
||||
'id' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'primary_key' => true,
|
||||
'auto_increment' => true,
|
||||
'default' => null,
|
||||
],
|
||||
'build_id' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'default' => null,
|
||||
),
|
||||
'build_id' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
],
|
||||
'plugin' => [
|
||||
'type' => 'varchar',
|
||||
'length' => 100,
|
||||
'default' => null,
|
||||
),
|
||||
'plugin' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 100,
|
||||
'default' => null,
|
||||
),
|
||||
'file' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 250,
|
||||
],
|
||||
'file' => [
|
||||
'type' => 'varchar',
|
||||
'length' => 250,
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
'line_start' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'default' => null,
|
||||
],
|
||||
'line_start' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
),
|
||||
'line_end' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'default' => null,
|
||||
],
|
||||
'line_end' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'nullable' => true,
|
||||
'default' => null,
|
||||
],
|
||||
'severity' => [
|
||||
'type' => 'tinyint',
|
||||
'length' => 3,
|
||||
'default' => null,
|
||||
),
|
||||
'severity' => array(
|
||||
'type' => 'tinyint',
|
||||
'length' => 3,
|
||||
],
|
||||
'message' => [
|
||||
'type' => 'varchar',
|
||||
'length' => 250,
|
||||
'default' => null,
|
||||
),
|
||||
'message' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 250,
|
||||
],
|
||||
'created_date' => [
|
||||
'type' => 'datetime',
|
||||
'default' => null,
|
||||
),
|
||||
'created_date' => array(
|
||||
'type' => 'datetime',
|
||||
'default' => null,
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $indexes = array(
|
||||
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
||||
'build_id' => array('columns' => 'build_id, created_date'),
|
||||
);
|
||||
public $indexes = [
|
||||
'PRIMARY' => ['unique' => true, 'columns' => 'id'],
|
||||
'build_id' => ['columns' => 'build_id, created_date'],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $foreignKeys = array(
|
||||
'build_error_ibfk_1' => array(
|
||||
'local_col' => 'build_id',
|
||||
'update' => 'CASCADE',
|
||||
'delete' => 'CASCADE',
|
||||
'table' => 'build',
|
||||
'col' => 'id'
|
||||
),
|
||||
);
|
||||
public $foreignKeys = [
|
||||
'build_error_ibfk_1' => [
|
||||
'local_col' => 'build_id',
|
||||
'update' => 'CASCADE',
|
||||
'delete' => 'CASCADE',
|
||||
'table' => 'build',
|
||||
'col' => 'id'
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the value of Id / id.
|
||||
|
|
@ -165,7 +165,7 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getId()
|
||||
{
|
||||
$rtn = $this->data['id'];
|
||||
$rtn = $this->data['id'];
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getBuildId()
|
||||
{
|
||||
$rtn = $this->data['build_id'];
|
||||
$rtn = $this->data['build_id'];
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
|
@ -189,7 +189,7 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getPlugin()
|
||||
{
|
||||
$rtn = $this->data['plugin'];
|
||||
$rtn = $this->data['plugin'];
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
|
@ -201,7 +201,7 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getFile()
|
||||
{
|
||||
$rtn = $this->data['file'];
|
||||
$rtn = $this->data['file'];
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
|
@ -213,7 +213,7 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getLineStart()
|
||||
{
|
||||
$rtn = $this->data['line_start'];
|
||||
$rtn = $this->data['line_start'];
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
|
@ -225,7 +225,7 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getLineEnd()
|
||||
{
|
||||
$rtn = $this->data['line_end'];
|
||||
$rtn = $this->data['line_end'];
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getSeverity()
|
||||
{
|
||||
$rtn = $this->data['severity'];
|
||||
$rtn = $this->data['severity'];
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
|
@ -249,7 +249,7 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
$rtn = $this->data['message'];
|
||||
$rtn = $this->data['message'];
|
||||
|
||||
return $rtn;
|
||||
}
|
||||
|
|
@ -261,10 +261,10 @@ class BuildErrorBase extends Model
|
|||
*/
|
||||
public function getCreatedDate()
|
||||
{
|
||||
$rtn = $this->data['created_date'];
|
||||
$rtn = $this->data['created_date'];
|
||||
|
||||
if (!empty($rtn)) {
|
||||
$rtn = new \DateTime($rtn);
|
||||
$rtn = new \DateTime($rtn);
|
||||
}
|
||||
|
||||
return $rtn;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class BuildMetaBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $sleepable = array();
|
||||
public static $sleepable = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
|
@ -32,106 +32,104 @@ class BuildMetaBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $data = array(
|
||||
'id' => null,
|
||||
protected $data = [
|
||||
'id' => null,
|
||||
'project_id' => null,
|
||||
'build_id' => null,
|
||||
'meta_key' => null,
|
||||
'build_id' => null,
|
||||
'meta_key' => null,
|
||||
'meta_value' => null,
|
||||
);
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $getters = array(
|
||||
protected $getters = [
|
||||
// Direct property getters:
|
||||
'id' => 'getId',
|
||||
'id' => 'getId',
|
||||
'project_id' => 'getProjectId',
|
||||
'build_id' => 'getBuildId',
|
||||
'meta_key' => 'getMetaKey',
|
||||
'build_id' => 'getBuildId',
|
||||
'meta_key' => 'getMetaKey',
|
||||
'meta_value' => 'getMetaValue',
|
||||
|
||||
// Foreign key getters:
|
||||
'Project' => 'getProject',
|
||||
'Build' => 'getBuild',
|
||||
);
|
||||
'Project' => 'getProject',
|
||||
'Build' => 'getBuild',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $setters = array(
|
||||
protected $setters = [
|
||||
// Direct property setters:
|
||||
'id' => 'setId',
|
||||
'id' => 'setId',
|
||||
'project_id' => 'setProjectId',
|
||||
'build_id' => 'setBuildId',
|
||||
'meta_key' => 'setMetaKey',
|
||||
'build_id' => 'setBuildId',
|
||||
'meta_key' => 'setMetaKey',
|
||||
'meta_value' => 'setMetaValue',
|
||||
|
||||
// Foreign key setters:
|
||||
'Project' => 'setProject',
|
||||
'Build' => 'setBuild',
|
||||
);
|
||||
'Project' => 'setProject',
|
||||
'Build' => 'setBuild',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $columns = array(
|
||||
'id' => array(
|
||||
'type' => 'int',
|
||||
'length' => 10,
|
||||
'primary_key' => true,
|
||||
public $columns = [
|
||||
'id' => [
|
||||
'type' => 'int',
|
||||
'length' => 10,
|
||||
'primary_key' => true,
|
||||
'auto_increment' => true,
|
||||
'default' => null,
|
||||
],
|
||||
'project_id' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'default' => null,
|
||||
),
|
||||
'project_id' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
],
|
||||
'build_id' => [
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
'default' => null,
|
||||
),
|
||||
'build_id' => array(
|
||||
'type' => 'int',
|
||||
'length' => 11,
|
||||
],
|
||||
'meta_key' => [
|
||||
'type' => 'varchar',
|
||||
'length' => 250,
|
||||
'default' => null,
|
||||
),
|
||||
'meta_key' => array(
|
||||
'type' => 'varchar',
|
||||
'length' => 250,
|
||||
],
|
||||
'meta_value' => [
|
||||
'type' => 'mediumtext',
|
||||
'default' => null,
|
||||
),
|
||||
'meta_value' => array(
|
||||
'type' => 'mediumtext',
|
||||
'default' => null,
|
||||
),
|
||||
);
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $indexes = array(
|
||||
'PRIMARY' => array('unique' => true, 'columns' => 'id'),
|
||||
'idx_meta_id' => array('unique' => true, 'columns' => 'build_id, meta_key'),
|
||||
'project_id' => array('columns' => 'project_id'),
|
||||
);
|
||||
public $indexes = [
|
||||
'PRIMARY' => ['unique' => true, 'columns' => 'id'],
|
||||
'idx_meta_id' => ['unique' => true, 'columns' => 'build_id, meta_key'],
|
||||
'project_id' => ['columns' => 'project_id'],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $foreignKeys = array(
|
||||
'build_meta_ibfk_1' => array(
|
||||
'local_col' => 'project_id',
|
||||
'update' => 'CASCADE',
|
||||
'delete' => 'CASCADE',
|
||||
'table' => 'project',
|
||||
'col' => 'id'
|
||||
),
|
||||
'fk_meta_build_id' => array(
|
||||
'local_col' => 'build_id',
|
||||
'update' => 'CASCADE',
|
||||
'delete' => 'CASCADE',
|
||||
'table' => 'build',
|
||||
'col' => 'id'
|
||||
),
|
||||
);
|
||||
public $foreignKeys = [
|
||||
'build_meta_ibfk_1' => [
|
||||
'local_col' => 'project_id',
|
||||
'update' => 'CASCADE',
|
||||
'delete' => 'CASCADE',
|
||||
'table' => 'project',
|
||||
'col' => 'id'
|
||||
],
|
||||
'fk_meta_build_id' => [
|
||||
'local_col' => 'build_id',
|
||||
'update' => 'CASCADE',
|
||||
'delete' => 'CASCADE',
|
||||
'table' => 'build',
|
||||
'col' => 'id'
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Get the value of Id / id.
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class ProjectBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $sleepable = array();
|
||||
public static $sleepable = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class ProjectGroupBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $sleepable = array();
|
||||
public static $sleepable = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class UserBase extends Model
|
|||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $sleepable = array();
|
||||
public static $sleepable = [];
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
|
|
|||
|
|
@ -80,17 +80,17 @@ class GithubBuild extends RemoteGitBuild
|
|||
|
||||
$phpciUrl = \b8\Config::getInstance()->get('phpci.url');
|
||||
|
||||
$params = array(
|
||||
'state' => $status,
|
||||
'target_url' => $phpciUrl . '/build/view/' . $this->getId(),
|
||||
$params = [
|
||||
'state' => $status,
|
||||
'target_url' => $phpciUrl . '/build/view/' . $this->getId(),
|
||||
'description' => $description,
|
||||
'context' => 'PHPCI',
|
||||
);
|
||||
'context' => 'PHPCI',
|
||||
];
|
||||
|
||||
$headers = array(
|
||||
$headers = [
|
||||
'Authorization: token ' . $token,
|
||||
'Content-Type: application/x-www-form-urlencoded'
|
||||
);
|
||||
];
|
||||
|
||||
$http->setHeaders($headers);
|
||||
$http->request('POST', $url, json_encode($params));
|
||||
|
|
@ -141,7 +141,7 @@ class GithubBuild extends RemoteGitBuild
|
|||
$branch = $this->getBranch();
|
||||
|
||||
if ($this->getExtra('build_type') == 'pull_request') {
|
||||
$matches = array();
|
||||
$matches = [];
|
||||
preg_match('/[\/:]([a-zA-Z0-9_\-]+\/[a-zA-Z0-9_\-]+)/', $this->getExtra('remote_url'), $matches);
|
||||
|
||||
$reference = $matches[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue