Code style fixes.

This commit is contained in:
Dmitry Khomutov 2017-11-05 21:48:36 +07:00
commit 4e68eb7180
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
89 changed files with 942 additions and 251 deletions

View file

@ -9,8 +9,19 @@ use PHPCensor\Store;
class BuildErrorStore extends Store
{
protected $tableName = 'build_error';
protected $modelName = '\PHPCensor\Model\BuildError';
/**
* @var string
*/
protected $tableName = 'build_error';
/**
* @var string
*/
protected $modelName = '\PHPCensor\Model\BuildError';
/**
* @var string
*/
protected $primaryKey = 'id';
/**

View file

@ -10,14 +10,19 @@ use b8\Database;
*/
class BuildErrorWriter
{
/** @var int */
/**
* @var integer
*/
protected $buildId;
/** @var array */
/**
* @var array
*/
protected $errors = [];
/**
* @var int
* @var integer
*
* @see https://stackoverflow.com/questions/40361164/pdoexception-sqlstatehy000-general-error-7-number-of-parameters-must-be-bet
*/
protected $bufferSize;
@ -46,10 +51,10 @@ class BuildErrorWriter
*
* @param string $plugin
* @param string $message
* @param int $severity
* @param integer $severity
* @param string $file
* @param int $lineStart
* @param int $lineEnd
* @param integer $lineStart
* @param integer $lineEnd
* @param \DateTime $createdDate
*/
public function write(

View file

@ -9,8 +9,19 @@ use b8\Exception\HttpException;
class BuildMetaStore extends Store
{
/**
* @var string
*/
protected $tableName = 'build_meta';
/**
* @var string
*/
protected $modelName = '\PHPCensor\Model\BuildMeta';
/**
* @var string
*/
protected $primaryKey = 'id';
/**
@ -96,9 +107,9 @@ class BuildMetaStore extends Store
/**
* Only used by an upgrade migration to move errors from build_meta to build_error
*
* @param $limit
*
*
* @param integer $limit
*
* @return array
*/
public function getErrorsForUpgrade($limit)

View file

@ -12,8 +12,19 @@ use PHPCensor\Store;
*/
class BuildStore extends Store
{
/**
* @var string
*/
protected $tableName = 'build';
/**
* @var string
*/
protected $modelName = '\PHPCensor\Model\Build';
/**
* @var string
*/
protected $primaryKey = 'id';
/**
@ -226,8 +237,10 @@ class BuildStore extends Store
/**
* Return an array of the latest builds for all projects.
* @param int $limit_by_project
* @param int $limit_all
*
* @param integer $limit_by_project
* @param integer $limit_all
*
* @return array
*/
public function getAllProjectsLatestBuilds($limit_by_project = 5, $limit_all = 10)
@ -312,10 +325,10 @@ class BuildStore extends Store
/**
* Return an array of builds for a given project and commit ID.
*
*
* @param integer $projectId
* @param string $commitId
*
*
* @return array
*/
public function getByProjectAndCommit($projectId, $commitId)

View file

@ -9,8 +9,19 @@ use b8\Exception\HttpException;
class EnvironmentStore extends Store
{
/**
* @var string
*/
protected $tableName = 'environment';
/**
* @var string
*/
protected $modelName = '\PHPCensor\Model\Environment';
/**
* @var string
*/
protected $primaryKey = 'id';
/**

View file

@ -9,8 +9,19 @@ use PHPCensor\Model\ProjectGroup;
class ProjectGroupStore extends Store
{
/**
* @var string
*/
protected $tableName = 'project_group';
/**
* @var string
*/
protected $modelName = '\PHPCensor\Model\ProjectGroup';
/**
* @var string
*/
protected $primaryKey = 'id';
/**

View file

@ -12,8 +12,19 @@ use b8\Exception\HttpException;
*/
class ProjectStore extends Store
{
/**
* @var string
*/
protected $tableName = 'project';
/**
* @var string
*/
protected $modelName = '\PHPCensor\Model\Project';
/**
* @var string
*/
protected $primaryKey = 'id';
/**
@ -60,7 +71,12 @@ class ProjectStore extends Store
/**
* Get a single Project by Ids.
* @param int[]
*
* @param integer[] $values
* @param string $useConnection
*
* @throws HttpException
*
* @return Project[]
*/
public function getByIds($values, $useConnection = 'read')

View file

@ -12,8 +12,19 @@ use PHPCensor\Model\User;
*/
class UserStore extends Store
{
/**
* @var string
*/
protected $tableName = 'user';
/**
* @var string
*/
protected $modelName = '\PHPCensor\Model\User';
/**
* @var string
*/
protected $primaryKey = 'id';
/**