From 058a127a6a5e15f39def341e67a7cd6418882c34 Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Wed, 20 Dec 2017 14:50:39 -0200 Subject: Clean elses --- system/database/DB_forge.php | 6 ++---- system/database/DB_result.php | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'system/database') diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php index 31fae43cf..dbf76fd13 100644 --- a/system/database/DB_forge.php +++ b/system/database/DB_forge.php @@ -382,10 +382,8 @@ abstract class CI_DB_forge { { return TRUE; } - else - { - $if_not_exists = FALSE; - } + + $if_not_exists = FALSE; } $sql = ($if_not_exists) diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 98d8876a7..821a0ea07 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -163,10 +163,8 @@ class CI_DB_result { { return $this->result_object(); } - else - { - return $this->custom_result_object($type); - } + + return $this->custom_result_object($type); } // -------------------------------------------------------------------- @@ -336,7 +334,7 @@ class CI_DB_result { if ($type === 'object') return $this->row_object($n); elseif ($type === 'array') return $this->row_array($n); - else return $this->custom_row_object($n, $type); + return $this->custom_row_object($n, $type); } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From 7774e3846c525ff65c6d9b86aacb1cc3bc229e3e Mon Sep 17 00:00:00 2001 From: Gabriel Caruso Date: Wed, 20 Dec 2017 17:53:55 -0200 Subject: Add extra line before return --- system/database/DB_result.php | 1 + 1 file changed, 1 insertion(+) (limited to 'system/database') diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 821a0ea07..40b8fbb74 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -334,6 +334,7 @@ class CI_DB_result { if ($type === 'object') return $this->row_object($n); elseif ($type === 'array') return $this->row_array($n); + return $this->custom_row_object($n, $type); } -- cgit v1.2.3-24-g4f1b