From eb26d37d9d9132a4ad5a2eea5f9334177c285fc5 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 6 Feb 2019 10:48:39 +0000 Subject: [PATCH] fixed wrong use of cascaded ternary operators in some files --- codepot/src/codepot/models/issuemodel.php | 3 +-- codepot/src/codepot/models/logmodel.php | 3 +-- codepot/src/codepot/models/projectmodel.php | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index 4a0302a2..800971b0 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -92,8 +92,7 @@ class IssueModel extends Model } $result = $query->result(); - $num = empty($result)? 0: - isset($result[0]->COUNT)? $result[0]->COUNT: $result[0]->count; + $num = empty($result)? 0: (isset($result[0]->COUNT)? $result[0]->COUNT: $result[0]->count); $this->db->trans_commit(); return $num; diff --git a/codepot/src/codepot/models/logmodel.php b/codepot/src/codepot/models/logmodel.php index ec71dcd6..ed2924ed 100644 --- a/codepot/src/codepot/models/logmodel.php +++ b/codepot/src/codepot/models/logmodel.php @@ -33,8 +33,7 @@ class LogModel extends Model $result = $query->result(); - $num = empty($result)? 0: - isset($result[0]->COUNT)? $result[0]->COUNT: $result[0]->count; + $num = empty($result)? 0: (isset($result[0]->COUNT)? $result[0]->COUNT: $result[0]->count); $this->db->trans_complete (); if ($this->db->trans_status() === FALSE) return FALSE; diff --git a/codepot/src/codepot/models/projectmodel.php b/codepot/src/codepot/models/projectmodel.php index 8a76e7ad..6d0d4b44 100644 --- a/codepot/src/codepot/models/projectmodel.php +++ b/codepot/src/codepot/models/projectmodel.php @@ -91,8 +91,7 @@ class ProjectModel extends Model $result = $query->result(); - $num = empty($result)? 0: - isset($result[0]->COUNT)? $result[0]->COUNT: $result[0]->count; + $num = empty($result)? 0: (isset($result[0]->COUNT)? $result[0]->COUNT: $result[0]->count); $this->db->trans_complete (); if ($this->db->trans_status() === FALSE) return FALSE;