summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/Session.php
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-07-24 17:50:01 +0200
committerdchill42 <dchill42@gmail.com>2012-07-24 17:50:01 +0200
commit77ee3fdac34d317b600a269e0b845588c88fa4c5 (patch)
tree4f1d9a33c60bfde22bb376af30c7b2cd34801fdc /system/libraries/Session/Session.php
parent42b77a9a1a5d4ec7ceb94b421b12af9c442769ba (diff)
Cleaned up bangs and lowercase booleans, and fixed userdata return on not found to NULL
Diffstat (limited to 'system/libraries/Session/Session.php')
-rwxr-xr-xsystem/libraries/Session/Session.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 474ca9c7a..9c887d88e 100755
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -69,12 +69,12 @@ class CI_Session extends CI_Driver_Library {
$drivers = (isset($params[$key])) ? $params[$key] : $CI->config->item($key);
if ($drivers)
{
- if (!is_array($drivers)) $drivers = array($drivers);
+ if ( ! is_array($drivers)) $drivers = array($drivers);
// Add driver names to valid list
foreach ($drivers as $driver)
{
- if (!in_array(strtolower($driver), array_map('strtolower', $this->valid_drivers)))
+ if ( ! in_array(strtolower($driver), array_map('strtolower', $this->valid_drivers)))
{
$this->valid_drivers[] = $driver;
}
@@ -84,8 +84,8 @@ class CI_Session extends CI_Driver_Library {
// Get driver to load
$key = 'sess_driver';
$driver = (isset($params[$key])) ? $params[$key] : $CI->config->item($key);
- if (!$driver) $driver = 'cookie';
- if (!in_array('session_'.strtolower($driver), array_map('strtolower', $this->valid_drivers)))
+ if ( ! $driver) $driver = 'cookie';
+ if ( ! in_array('session_'.strtolower($driver), array_map('strtolower', $this->valid_drivers)))
{
$this->valid_drivers[] = 'Session_'.$driver;
}
@@ -182,7 +182,7 @@ class CI_Session extends CI_Driver_Library {
public function userdata($item)
{
// Return value or FALSE if not found
- return (!isset($this->userdata[$item])) ? FALSE : $this->userdata[$item];
+ return ( ! isset($this->userdata[$item])) ? NULL : $this->userdata[$item];
}
/**
@@ -193,7 +193,7 @@ class CI_Session extends CI_Driver_Library {
public function all_userdata()
{
// Return entire array
- return (!isset($this->userdata)) ? FALSE : $this->userdata;
+ return ( ! isset($this->userdata)) ? NULL : $this->userdata;
}
/**
@@ -362,7 +362,7 @@ class CI_Session extends CI_Driver_Library {
// Get or create expiration list
$expirations = $this->userdata(self::EXPIRATION_KEY);
- if (!$expirations)
+ if ( ! $expirations)
{
$expirations = array();
}
@@ -392,7 +392,7 @@ class CI_Session extends CI_Driver_Library {
{
// Get expirations list
$expirations = $this->userdata(self::EXPIRATION_KEY);
- if (!$expirations || !count($expirations))
+ if ( ! $expirations || ! count($expirations))
{
// Nothing to do
return;
@@ -482,7 +482,7 @@ class CI_Session extends CI_Driver_Library {
{
// Get expirations list
$expirations = $this->userdata(self::EXPIRATION_KEY);
- if (!$expirations || !count($expirations))
+ if ( ! $expirations || ! count($expirations))
{
// Nothing to do
return;