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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue