Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Applied fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
cpatrick authored and StyleCIBot committed Jan 29, 2016
1 parent 2d811d9 commit 3b2380f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/tracker/models/pdo/SubmissionModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ public function getOrCreateSubmission($producerDao, $uuid)
* @return Tracker_SubmissionDao submission | false
*/
public function getLatestSubmissionByProducerDateAndBranch($producerDao, $date = false, $branch = 'master',
$onlyOneDay = true) {
$onlyOneDay = true)
{
if ($date) {
$queryTime = date('Y-m-d H:i:s', strtotime($date));
} else {
Expand All @@ -182,14 +183,15 @@ public function getLatestSubmissionByProducerDateAndBranch($producerDao, $date =
}
$sql = $sql->where('tracker_submission.producer_id = ?', $producerDao->getKey())
->where('branch = ?', $branch)
->order('tracker_submission.submit_time','DSC')
->order('tracker_submission.submit_time', 'DSC')
->limit(1);
$res = $this->database->fetchAll($sql);
if (count($res) === 1) {
$submissionDao = $this->initDao('Submission', $res[0], $this->moduleName);
} else {
$submissionDao = false;
}

return $submissionDao;
}

Expand All @@ -199,7 +201,8 @@ public function getLatestSubmissionByProducerDateAndBranch($producerDao, $date =
* @param bool $key whether to only retrieve key trends
* @return array trend DAOs
*/
public function getTrends($submissionDao, $key = true) {
public function getTrends($submissionDao, $key = true)
{
if ($key) {
$sql = $this->database->select()->setIntegrityCheck(false)->from('tracker_trend')->join(
'tracker_scalar',
Expand Down

0 comments on commit 3b2380f

Please sign in to comment.