From 9f1edfaee3c17b1b5d48d0e519297adfa2982964 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 14 Aug 2011 13:57:52 -0500 Subject: [PATCH] refactoring comments and code. --- system/auth.php | 2 +- system/cache.php | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/system/auth.php b/system/auth.php index 65e6c009..8c2ff3ab 100644 --- a/system/auth.php +++ b/system/auth.php @@ -111,7 +111,7 @@ public static function login($username, $password) * The user's ID will be stored in the session and the user will be considered * "logged in" on subsequent requests to the application. * - * Note: The user given to this method should be an object having a "id" property. + * Note: The user given to this method should be an object having an "id" property. * * @param object $user * @return void diff --git a/system/cache.php b/system/cache.php index 437f5275..615e706b 100644 --- a/system/cache.php +++ b/system/cache.php @@ -6,6 +6,7 @@ class Cache { * All of the active cache drivers. * * @var Cache\Driver + * @see driver */ public static $drivers = array(); @@ -20,10 +21,7 @@ class Cache { */ public static function driver($driver = null) { - if (is_null($driver)) - { - $driver = Config::get('cache.driver'); - } + if (is_null($driver)) $driver = Config::get('cache.driver'); if ( ! array_key_exists($driver, static::$drivers)) { @@ -56,11 +54,6 @@ public static function driver($driver = null) */ public static function get($key, $default = null, $driver = null) { - if (is_null($driver)) - { - $driver = Config::get('cache.driver'); - } - if (is_null($item = static::driver($driver)->get($key))) { return is_callable($default) ? call_user_func($default) : $default;