Code style fixes

This commit is contained in:
Dmitry Khomutov 2016-04-20 21:39:48 +06:00
commit 0868eb9c69
63 changed files with 1413 additions and 1494 deletions

View file

@ -57,7 +57,7 @@ class BuildStatusController extends \PHPCI\Controller
}
if (isset($project) && $project instanceof Project) {
$build = $project->getLatestBuild($branch, array(2,3));
$build = $project->getLatestBuild($branch, [2,3]);
if (isset($build) && $build instanceof Build && $build->getStatus() != 2) {
$status = 'failed';
@ -92,7 +92,7 @@ class BuildStatusController extends \PHPCI\Controller
$branchList = $this->buildStore->getBuildBranches($projectId);
if (!$branchList) {
$branchList = array($project->getBranch());
$branchList = [$project->getBranch()];
}
foreach ($branchList as $branch) {
@ -191,9 +191,9 @@ class BuildStatusController extends \PHPCI\Controller
*/
protected function getLatestBuilds($projectId)
{
$criteria = array('project_id' => $projectId);
$order = array('id' => 'DESC');
$builds = $this->buildStore->getWhere($criteria, 10, 0, array(), $order);
$criteria = ['project_id' => $projectId];
$order = ['id' => 'DESC'];
$builds = $this->buildStore->getWhere($criteria, 10, 0, [], $order);
foreach ($builds['items'] as &$build) {
$build = BuildFactory::getBuild($build);