summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-12-27 18:49:03 +0100
committerGitHub <noreply@github.com>2017-12-27 18:49:03 +0100
commit3b470a6934a030c4bc57ac4c070539b5dd3e13b9 (patch)
tree5cca7a57a296006e09773b553a8159cc37316445 /system
parentfbae310a44e5d6fb3f962d148c80a60cd38c884a (diff)
parent7774e3846c525ff65c6d9b86aacb1cc3bc229e3e (diff)
Merge pull request #5367 from carusogabriel/clean-elses
Clean elses
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_forge.php6
-rw-r--r--system/database/DB_result.php9
-rw-r--r--system/libraries/Email.php12
-rw-r--r--system/libraries/Encryption.php6
-rw-r--r--system/libraries/Session/Session.php6
-rw-r--r--system/libraries/Upload.php6
-rw-r--r--system/libraries/Xmlrpcs.php18
7 files changed, 22 insertions, 41 deletions
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..40b8fbb74 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,8 @@ 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);
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index f115d9f40..6d192a6e2 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -941,10 +941,8 @@ class CI_Email {
{
return 'plain-attach';
}
- else
- {
- return 'plain';
- }
+
+ return 'plain';
}
// --------------------------------------------------------------------
@@ -2209,10 +2207,8 @@ class CI_Email {
usleep(250000);
continue;
}
- else
- {
- $timestamp = 0;
- }
+
+ $timestamp = 0;
}
if ($result === FALSE)
diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php
index c3ddf60ed..4f4f72057 100644
--- a/system/libraries/Encryption.php
+++ b/system/libraries/Encryption.php
@@ -682,10 +682,8 @@ class CI_Encryption {
{
return FALSE;
}
- else
- {
- $params['mode'] = $this->_modes[$this->_driver][$params['mode']];
- }
+
+ $params['mode'] = $this->_modes[$this->_driver][$params['mode']];
}
if (isset($params['hmac']) && $params['hmac'] === FALSE)
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 3e4865cd1..406b9a219 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -222,10 +222,8 @@ class CI_Session {
{
return $prefix.$class;
}
- else
- {
- log_message('debug', 'Session: '.$prefix.$class.".php found but it doesn't declare class ".$prefix.$class.'.');
- }
+
+ log_message('debug', 'Session: '.$prefix.$class.".php found but it doesn't declare class ".$prefix.$class.'.');
}
return 'CI_'.$class;
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 9e8389480..c6771b584 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -678,10 +678,8 @@ class CI_Upload {
$this->set_error('upload_bad_filename', 'debug');
return FALSE;
}
- else
- {
- return $new_filename;
- }
+
+ return $new_filename;
}
// --------------------------------------------------------------------
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index 0274f13b6..7f760a088 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -402,15 +402,11 @@ class CI_Xmlrpcs extends CI_Xmlrpc {
{
return get_instance()->{$method_parts[1]}($m);
}
- else
- {
- return $this->object->{$method_parts[1]}($m);
- }
- }
- else
- {
- return call_user_func($this->methods[$methName]['function'], $m);
+
+ return $this->object->{$method_parts[1]}($m);
}
+
+ return call_user_func($this->methods[$methName]['function'], $m);
}
// --------------------------------------------------------------------
@@ -499,10 +495,8 @@ class CI_Xmlrpcs extends CI_Xmlrpc {
return new XML_RPC_Response(new XML_RPC_Values($docstring, 'string'));
}
- else
- {
- return new XML_RPC_Response(0, $this->xmlrpcerr['introspect_unknown'], $this->xmlrpcstr['introspect_unknown']);
- }
+
+ return new XML_RPC_Response(0, $this->xmlrpcerr['introspect_unknown'], $this->xmlrpcstr['introspect_unknown']);
}
// --------------------------------------------------------------------