[ci skip] style and phpdoc-related changes (rel #1295)
diff --git a/system/core/Controller.php b/system/core/Controller.php
index 4914148..9196958 100644
--- a/system/core/Controller.php
+++ b/system/core/Controller.php
@@ -42,6 +42,7 @@
 	/**
 	 * Reference to the global CI instance
 	 *
+	 * @static
 	 * @var	object
 	 */
 	private static $instance;
@@ -71,6 +72,7 @@
 	/**
 	 * Return the CI object
 	 *
+	 * @static
 	 * @return	object
 	 */
 	public static function &get_instance()
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 75e9360..5de2e5d 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -689,7 +689,7 @@
 	 */
 	public function get_package_paths($include_base = FALSE)
 	{
-		return $include_base === TRUE ? $this->_ci_library_paths : $this->_ci_model_paths;
+		return ($include_base === TRUE) ? $this->_ci_library_paths : $this->_ci_model_paths;
 	}
 
 	// --------------------------------------------------------------------
@@ -1005,7 +1005,7 @@
 			$path = strtolower($class).'/'.$class;
 			return $this->_ci_load_class($path, $params, $object_name);
 		}
-		else if (ucfirst($subdir) != $subdir)
+		elseif (ucfirst($subdir) != $subdir)
 		{
 			// Lowercase subdir failed - retry capitalized
 			$path = ucfirst($subdir).$class;
diff --git a/system/core/Output.php b/system/core/Output.php
index 052367e..aa0e05d 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -204,7 +204,8 @@
 	/**
 	 * Set Content Type Header
 	 *
-	 * @param	string	extension of the file we're outputting
+	 * @param	string	$mime_type	extension of the file we're outputting
+	 * @param	string	$charset = NULL
 	 * @return	void
 	 */
 	public function set_content_type($mime_type, $charset = NULL)
diff --git a/system/database/DB_cache.php b/system/database/DB_cache.php
index bdd9186..671147b 100644
--- a/system/database/DB_cache.php
+++ b/system/database/DB_cache.php
@@ -37,6 +37,12 @@
 	public $CI;
 	public $db;	// allows passing of db object so that multiple database connections and returned db objects can be supported
 
+	/**
+	 * Constructor
+	 *
+	 * @param	&$db
+	 * @return	void
+	 */
 	public function __construct(&$db)
 	{
 		// Assign the main CI object to $this->CI and load the file helper since we use it a lot
@@ -90,6 +96,7 @@
 	 * The URI being requested will become the name of the cache sub-folder.
 	 * An MD5 hash of the SQL statement will become the cache file name
 	 *
+	 * @param	string	$sql
 	 * @return	string
 	 */
 	public function read($sql)
@@ -111,6 +118,8 @@
 	/**
 	 * Write a query to a cache file
 	 *
+	 * @param	string	$sql
+	 * @param	object	$object
 	 * @return	bool
 	 */
 	public function write($sql, $object)
@@ -144,7 +153,9 @@
 	/**
 	 * Delete cache files within a particular directory
 	 *
-	 * @return	bool
+	 * @param	string	$segment_one = ''
+	 * @param	string	$segment_two = ''
+	 * @return	void
 	 */
 	public function delete($segment_one = '', $segment_two = '')
 	{
@@ -167,7 +178,7 @@
 	/**
 	 * Delete all existing cache files
 	 *
-	 * @return	bool
+	 * @return	void
 	 */
 	public function delete_all()
 	{
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index b7b19d2..7f1434f 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -310,8 +310,9 @@
 	 * FALSE upon failure, and if the $db_debug variable is set to TRUE
 	 * will raise an error.
 	 *
-	 * @param	string	An SQL query string
-	 * @param	array	An array of binding data
+	 * @param	string	$sql
+	 * @param	array	$binds = FALSE		An array of binding data
+	 * @param	bool	$return_object = NULL
 	 * @return	mixed
 	 */
 	public function query($sql, $binds = FALSE, $return_object = NULL)
@@ -514,6 +515,7 @@
 	 * If strict mode is disabled, each group is treated autonomously, meaning
 	 * a failure of one group will not affect any others
 	 *
+	 * @param	bool	$mode = TRUE
 	 * @return	void
 	 */
 	public function trans_strict($mode = TRUE)
@@ -526,6 +528,7 @@
 	/**
 	 * Start Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	void
 	 */
 	public function trans_start($test_mode = FALSE)
@@ -810,6 +813,7 @@
 	/**
 	 * Returns an array of table names
 	 *
+	 * @param	string	$constrain_by_prefix = FALSE
 	 * @return	array
 	 */
 	public function list_tables($constrain_by_prefix = FALSE)
@@ -864,6 +868,7 @@
 	/**
 	 * Determine if a particular table exists
 	 *
+	 * @param	string	$table_name
 	 * @return	bool
 	 */
 	public function table_exists($table_name)
@@ -1193,8 +1198,8 @@
 	/**
 	 * Enables a native PHP function to be run, using a platform agnostic wrapper.
 	 *
-	 * @param	string	the function name
-	 * @param	mixed	any parameters needed by the function
+	 * @param	string	$function	the function name
+	 * @param	mixed	$param,...	optional parameters needed by the function
 	 * @return	mixed
 	 */
 	public function call_function($function)
@@ -1258,6 +1263,8 @@
 	/**
 	 * Delete the cache files associated with a particular URI
 	 *
+	 * @param	string	$segment_one = ''
+	 * @param	string	$segment_two = ''
 	 * @return	bool
 	 */
 	public function cache_delete($segment_one = '', $segment_two = '')
diff --git a/system/database/DB_forge.php b/system/database/DB_forge.php
index 91f9d56..119d78d 100644
--- a/system/database/DB_forge.php
+++ b/system/database/DB_forge.php
@@ -37,7 +37,7 @@
 	public $fields		= array();
 	public $keys		= array();
 	public $primary_keys	= array();
-	public $db_char_set	=	'';
+	public $db_char_set	= '';
 
 	// Platform specific SQL strings
 	protected $_create_database	= 'CREATE DATABASE %s';
@@ -45,6 +45,11 @@
 	protected $_drop_table		= 'DROP TABLE IF EXISTS %s';
 	protected $_rename_table	= 'ALTER TABLE %s RENAME TO %s';
 
+	/**
+	 * Constructor
+	 *
+	 * @return	void
+	 */
 	public function __construct()
 	{
 		// Assign the main database object to $this->db
@@ -206,7 +211,8 @@
 	/**
 	 * Create Table
 	 *
-	 * @param	string	the table name
+	 * @param	string	$table = ''
+	 * @param	bool	$if_not_exists = FALSE
 	 * @return	bool
 	 */
 	public function create_table($table = '', $if_not_exists = FALSE)
@@ -378,9 +384,8 @@
 	/**
 	 * Column Modify
 	 *
-	 * @param	string	the table name
-	 * @param	string	the column name
-	 * @param	string	the column definition
+	 * @param	string	$table = ''
+	 * @param	string	$field = array()	column definition
 	 * @return	bool
 	 */
 	public function modify_column($table = '', $field = array())
diff --git a/system/database/DB_query_builder.php b/system/database/DB_query_builder.php
index a6e6e59..5fc3d18 100644
--- a/system/database/DB_query_builder.php
+++ b/system/database/DB_query_builder.php
@@ -182,15 +182,17 @@
 	// --------------------------------------------------------------------
 
 	/**
-	 * Processing Function for the four functions above:
+	 * Processing Function for the following functions:
 	 *
 	 *	select_max()
 	 *	select_min()
 	 *	select_avg()
 	 *	select_sum()
 	 *
-	 * @param	string	the field
-	 * @param	string	an alias
+	 *
+	 * @param	string	$select = ''	field name
+	 * @param	string	$alias = ''
+	 * @param	string	$type = 'MAX'
 	 * @return	object
 	 */
 	protected function _max_min_avg_sum($select = '', $alias = '', $type = 'MAX')
@@ -504,11 +506,12 @@
 	/**
 	 * Where_in
 	 *
-	 * Generates a WHERE field IN ('item', 'item') SQL query joined with
+	 * Generates a WHERE field IN('item', 'item') SQL query joined with
 	 * AND if appropriate
 	 *
-	 * @param	string	The field to search
-	 * @param	array	The values searched on
+	 * @param	string	$key = NULL	The field to search
+	 * @param	array	$values = NULL	The values searched on
+	 * @param	bool	$escape = NULL
 	 * @return	object
 	 */
 	public function where_in($key = NULL, $values = NULL, $escape = NULL)
@@ -519,13 +522,14 @@
 	// --------------------------------------------------------------------
 
 	/**
-	 * Where_in_or
+	 * Or_where_in
 	 *
-	 * Generates a WHERE field IN ('item', 'item') SQL query joined with
+	 * Generates a WHERE field IN('item', 'item') SQL query joined with
 	 * OR if appropriate
 	 *
-	 * @param	string	The field to search
-	 * @param	array	The values searched on
+	 * @param	string	$key = NULL	The field to search
+	 * @param	array	$values = NULL	The values searched on
+	 * @param	bool	$escape = NULL
 	 * @return	object
 	 */
 	public function or_where_in($key = NULL, $values = NULL, $escape = NULL)
@@ -538,11 +542,12 @@
 	/**
 	 * Where_not_in
 	 *
-	 * Generates a WHERE field NOT IN ('item', 'item') SQL query joined
+	 * Generates a WHERE field NOT IN('item', 'item') SQL query joined
 	 * with AND if appropriate
 	 *
-	 * @param	string	The field to search
-	 * @param	array	The values searched on
+	 * @param	string	$key = NULL	The field to search
+	 * @param	array	$values = NULL	The values searched on
+	 * @param	bool	$escape = NULL
 	 * @return	object
 	 */
 	public function where_not_in($key = NULL, $values = NULL, $escape = NULL)
@@ -553,13 +558,14 @@
 	// --------------------------------------------------------------------
 
 	/**
-	 * Where_not_in_or
+	 * Or_where_not_in
 	 *
-	 * Generates a WHERE field NOT IN ('item', 'item') SQL query joined
+	 * Generates a WHERE field NOT IN('item', 'item') SQL query joined
 	 * with OR if appropriate
 	 *
-	 * @param	string	The field to search
-	 * @param	array	The values searched on
+	 * @param	string	$key = NULL	The field to search
+	 * @param	array	$values = NULL	The values searched on
+	 * @param	bool	$escape = NULL
 	 * @return	object
 	 */
 	public function or_where_not_in($key = NULL, $values = NULL, $escape = NULL)
@@ -572,12 +578,13 @@
 	/**
 	 * Where_in
 	 *
-	 * Called by where_in, where_in_or, where_not_in, where_not_in_or
+	 * Called by where_in(), or_where_in(), where_not_in(), or_where_not_in()
 	 *
-	 * @param	string	The field to search
-	 * @param	array	The values searched on
-	 * @param	bool	If the statement would be IN or NOT IN
-	 * @param	string
+	 * @param	string	$key = NULL	The field to search
+	 * @param	array	$values = NULL	The values searched on
+	 * @param	bool	$not = FALSE	If the statement would be IN or NOT IN
+	 * @param	string	$type = 'AND '
+	 * @param	bool	$escape = NULL
 	 * @return	object
 	 */
 	protected function _where_in($key = NULL, $values = NULL, $not = FALSE, $type = 'AND ', $escape = NULL)
@@ -1174,9 +1181,10 @@
 	 *
 	 * Allows the where clause, limit and offset to be added directly
 	 *
-	 * @param	string	the where clause
-	 * @param	string	the limit clause
-	 * @param	string	the offset clause
+	 * @param	string	$table = ''
+	 * @param	string	$where = NULL
+	 * @param	int	$limit = NULL
+	 * @param	int	$offset = NULL
 	 * @return	object
 	 */
 	public function get_where($table = '', $where = NULL, $limit = NULL, $offset = NULL)
@@ -1535,9 +1543,10 @@
 	 *
 	 * Compiles an update string and runs the query
 	 *
-	 * @param	string	the table to retrieve the results from
-	 * @param	array	an associative array of update values
-	 * @param	mixed	the where clause
+	 * @param	string	$table = ''
+	 * @param	array	$set = NULL	an associative array of update values
+	 * @param	mixed	$where = NULL
+	 * @param	int	$limit = NULL
 	 * @return	object
 	 */
 	public function update($table = '', $set = NULL, $where = NULL, $limit = NULL)
@@ -1967,8 +1976,9 @@
 	 * Compile the SELECT statement
 	 *
 	 * Generates a query string based on which functions were used.
-	 * Should not be called directly.  The get() function calls it.
+	 * Should not be called directly.
 	 *
+	 * @param	bool	$select_override = FALSE
 	 * @return	string
 	 */
 	protected function _compile_select($select_override = FALSE)
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index e747044..76093f9 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -251,8 +251,8 @@
 	/**
 	 * Query result.  Acts as a wrapper function for the following functions.
 	 *
-	 * @param	mixed
-	 * @param	string	can be "object" or "array"
+	 * @param	mixed	$n = 0
+	 * @param	string	$type = 'object'	'object' or 'array'
 	 * @return	mixed
 	 */
 	public function row($n = 0, $type = 'object')
@@ -281,6 +281,8 @@
 	/**
 	 * Assigns an item into a particular column slot
 	 *
+	 * @param	mixed	$key
+	 * @param	mixed	$value
 	 * @return	void
 	 */
 	public function set_row($key, $value = NULL)
@@ -311,6 +313,8 @@
 	/**
 	 * Returns a single result row - custom object version
 	 *
+	 * @param	int	$n
+	 * @param	string	$type
 	 * @return	object
 	 */
 	public function custom_row_object($n, $type)
@@ -335,6 +339,7 @@
 	/**
 	 * Returns a single result row - object version
 	 *
+	 * @param	int	$n = 0
 	 * @return	object
 	 */
 	public function row_object($n = 0)
@@ -358,6 +363,7 @@
 	/**
 	 * Returns a single result row - array version
 	 *
+	 * @param	int	$n = 0
 	 * @return	array
 	 */
 	public function row_array($n = 0)
@@ -381,7 +387,8 @@
 	/**
 	 * Returns the "first" row
 	 *
-	 * @return	object
+	 * @param	string	$type = 'object'
+	 * @return	mixed
 	 */
 	public function first_row($type = 'object')
 	{
@@ -394,7 +401,8 @@
 	/**
 	 * Returns the "last" row
 	 *
-	 * @return	object
+	 * @param	string	$type = 'object'
+	 * @return	mixed
 	 */
 	public function last_row($type = 'object')
 	{
@@ -407,7 +415,8 @@
 	/**
 	 * Returns the "next" row
 	 *
-	 * @return	object
+	 * @param	string	$type = 'object'
+	 * @return	mixed
 	 */
 	public function next_row($type = 'object')
 	{
@@ -430,7 +439,8 @@
 	/**
 	 * Returns the "previous" row
 	 *
-	 * @return	object
+	 * @param	string	$type = 'object'
+	 * @return	mixed
 	 */
 	public function previous_row($type = 'object')
 	{
@@ -452,8 +462,8 @@
 	/**
 	 * Returns an unbuffered row and move pointer to next row
 	 *
-	 * @param	string	'array', 'object' or a custom class name
-	 * @return	mixed	either a result object or array
+	 * @param	string	$type = 'object'	'array', 'object' or a custom class name
+	 * @return	mixed
 	 */
 	public function unbuffered_row($type = 'object')
 	{
diff --git a/system/database/DB_utility.php b/system/database/DB_utility.php
index 6a3b407..8078e2b 100644
--- a/system/database/DB_utility.php
+++ b/system/database/DB_utility.php
@@ -41,6 +41,11 @@
 	protected $_optimize_table	= FALSE;
 	protected $_repair_table	= FALSE;
 
+	/**
+	 * Constructor
+	 *
+	 * @return	void
+	 */
 	public function __construct()
 	{
 		// Assign the main database object to $this->db
@@ -275,6 +280,7 @@
 	/**
 	 * Database Backup
 	 *
+	 * @param	array	$params = array()
 	 * @return	void
 	 */
 	public function backup($params = array())
diff --git a/system/database/drivers/cubrid/cubrid_driver.php b/system/database/drivers/cubrid/cubrid_driver.php
index 7f8f297..8e77d83 100644
--- a/system/database/drivers/cubrid/cubrid_driver.php
+++ b/system/database/drivers/cubrid/cubrid_driver.php
@@ -50,6 +50,12 @@
 	// CUBRID-specific properties
 	public $auto_commit = TRUE;
 
+	/**
+	 * Constructor
+	 *
+	 * @param	array	$params
+	 * @return	void
+	 */
 	public function __construct($params)
 	{
 		parent::__construct($params);
@@ -180,6 +186,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/cubrid/cubrid_result.php b/system/database/drivers/cubrid/cubrid_result.php
index 4a06a2d..360c50d 100644
--- a/system/database/drivers/cubrid/cubrid_result.php
+++ b/system/database/drivers/cubrid/cubrid_result.php
@@ -132,6 +132,7 @@
 	 * this internally before fetching results to make sure the
 	 * result set starts at zero
 	 *
+	 * @param	int	$n = 0
 	 * @return	bool
 	 */
 	protected function _data_seek($n = 0)
diff --git a/system/database/drivers/ibase/ibase_driver.php b/system/database/drivers/ibase/ibase_driver.php
index 96d6f65..c3be519 100644
--- a/system/database/drivers/ibase/ibase_driver.php
+++ b/system/database/drivers/ibase/ibase_driver.php
@@ -116,6 +116,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 3d6cffd..2063dad 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -50,12 +50,12 @@
 	// MSSQL-specific properties
 	protected $_quoted_identifier = TRUE;
 
-	/*
+	/**
 	 * Constructor
 	 *
 	 * Appends the port number to the hostname, if needed.
 	 *
-	 * @param	array
+	 * @param	array	$params
 	 * @return	void
 	 */
 	public function __construct($params)
@@ -152,6 +152,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php
index aeede3f..84d2814 100644
--- a/system/database/drivers/mssql/mssql_result.php
+++ b/system/database/drivers/mssql/mssql_result.php
@@ -133,6 +133,7 @@
 	 * this internally before fetching results to make sure the
 	 * result set starts at zero
 	 *
+	 * @param	int	$n = 0
 	 * @return	bool
 	 */
 	protected function _data_seek($n = 0)
diff --git a/system/database/drivers/mysql/mysql_driver.php b/system/database/drivers/mysql/mysql_driver.php
index ce9f730..f82e775 100644
--- a/system/database/drivers/mysql/mysql_driver.php
+++ b/system/database/drivers/mysql/mysql_driver.php
@@ -214,6 +214,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/mysql/mysql_result.php b/system/database/drivers/mysql/mysql_result.php
index 7fbb654..b3f669e 100644
--- a/system/database/drivers/mysql/mysql_result.php
+++ b/system/database/drivers/mysql/mysql_result.php
@@ -146,6 +146,7 @@
 	 * this internally before fetching results to make sure the
 	 * result set starts at zero
 	 *
+	 * @param	int	$n = 0
 	 * @return	bool
 	 */
 	protected function _data_seek($n = 0)
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index 91ab13a..6c4f875 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -196,6 +196,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php
index c1ec4da..f036302 100644
--- a/system/database/drivers/mysqli/mysqli_result.php
+++ b/system/database/drivers/mysqli/mysqli_result.php
@@ -132,6 +132,7 @@
 	 * this internally before fetching results to make sure the
 	 * result set starts at zero
 	 *
+	 * @param	int	$n = 0
 	 * @return	bool
 	 */
 	protected function _data_seek($n = 0)
diff --git a/system/database/drivers/oci8/oci8_driver.php b/system/database/drivers/oci8/oci8_driver.php
index 8e4f4ef..81d73d0 100644
--- a/system/database/drivers/oci8/oci8_driver.php
+++ b/system/database/drivers/oci8/oci8_driver.php
@@ -75,6 +75,12 @@
 	// throw off num_fields later
 	public $limit_used;
 
+	/**
+	 * Constructor
+	 *
+	 * @param	array	$params
+	 * @return	void
+	 */
 	public function __construct($params)
 	{
 		parent::__construct($params);
diff --git a/system/database/drivers/odbc/odbc_driver.php b/system/database/drivers/odbc/odbc_driver.php
index 741b741..063a04b 100644
--- a/system/database/drivers/odbc/odbc_driver.php
+++ b/system/database/drivers/odbc/odbc_driver.php
@@ -49,6 +49,12 @@
 
 	protected $_random_keyword;
 
+	/**
+	 * Constructor
+	 *
+	 * @param	array	$params
+	 * @return	void
+	 */
 	public function __construct($params)
 	{
 		parent::__construct($params);
@@ -62,6 +68,8 @@
 		}
 	}
 
+	// --------------------------------------------------------------------
+
 	/**
 	 * Non-persistent database connection
 	 *
@@ -102,6 +110,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index f4509b1..32a9e75 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -57,7 +57,7 @@
 	 *
 	 * Validates the DSN string and/or detects the subdriver
 	 *
-	 * @param	array
+	 * @param	array	$params
 	 * @return	void
 	 */
 	public function __construct($params)
@@ -183,6 +183,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/postgre/postgre_driver.php b/system/database/drivers/postgre/postgre_driver.php
index 19f384c..1b94749 100644
--- a/system/database/drivers/postgre/postgre_driver.php
+++ b/system/database/drivers/postgre/postgre_driver.php
@@ -51,6 +51,7 @@
 	 *
 	 * Creates a DSN string to be used for db_connect() and db_pconnect()
 	 *
+	 * @param	array	$params
 	 * @return	void
 	 */
 	public function __construct($params)
diff --git a/system/database/drivers/postgre/postgre_forge.php b/system/database/drivers/postgre/postgre_forge.php
index c434e95..1164d9b 100644
--- a/system/database/drivers/postgre/postgre_forge.php
+++ b/system/database/drivers/postgre/postgre_forge.php
@@ -39,7 +39,8 @@
 	/**
 	 * Process Fields
 	 *
-	 * @param	mixed	the fields
+	 * @param	mixed	$fields
+	 * @param	array	$primary_keys = array()
 	 * @return	string
 	 */
 	protected function _process_fields($fields, $primary_keys = array())
@@ -190,13 +191,10 @@
 	 * Generates a platform-specific query so that a table can be altered
 	 * Called by add_column(), drop_column(), and column_alter(),
 	 *
-	 * @param	string	the ALTER type (ADD, DROP, CHANGE)
-	 * @param	string	the column name
-	 * @param	string	the table name
-	 * @param	string	the column definition
-	 * @param	string	the default value
-	 * @param	bool	should 'NOT NULL' be added
-	 * @param	string	the field after which we should add the new field
+	 * @param	string	$alter_type	the ALTER type (ADD, DROP, CHANGE)
+	 * @param	string	$table		the table name
+	 * @param	string	$fields		the column definition
+	 * @param	string	$after_field = ''
 	 * @return	string
 	 */
 	protected function _alter_table($alter_type, $table, $fields, $after_field = '')
diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php
index eb9d647..458ae86 100644
--- a/system/database/drivers/postgre/postgre_result.php
+++ b/system/database/drivers/postgre/postgre_result.php
@@ -131,6 +131,7 @@
 	 * this internally before fetching results to make sure the
 	 * result set starts at zero
 	 *
+	 * @param	int	$n = 0
 	 * @return	bool
 	 */
 	protected function _data_seek($n = 0)
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php
index 2744a63..2fd3934 100644
--- a/system/database/drivers/sqlite/sqlite_driver.php
+++ b/system/database/drivers/sqlite/sqlite_driver.php
@@ -127,6 +127,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php
index eef9787..2148414 100644
--- a/system/database/drivers/sqlite/sqlite_result.php
+++ b/system/database/drivers/sqlite/sqlite_result.php
@@ -115,6 +115,7 @@
 	 * this internally before fetching results to make sure the
 	 * result set starts at zero
 	 *
+	 * @param	int	$n = 0
 	 * @return	bool
 	 */
 	protected function _data_seek($n = 0)
diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php
index d03be15..22c72b9 100644
--- a/system/database/drivers/sqlite3/sqlite3_driver.php
+++ b/system/database/drivers/sqlite3/sqlite3_driver.php
@@ -103,13 +103,12 @@
 	/**
 	 * Execute the query
 	 *
-	 * @param	string	an SQL query
+	 * @todo	Implement use of SQLite3::querySingle(), if needed
+	 * @param	string	$sql
 	 * @return	mixed	SQLite3Result object or bool
 	 */
 	protected function _execute($sql)
 	{
-		// TODO: Implement use of SQLite3::querySingle(), if needed
-
 		return $this->is_write_type($sql)
 			? $this->conn_id->exec($sql)
 			: $this->conn_id->query($sql);
@@ -120,6 +119,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/database/drivers/sqlite3/sqlite3_result.php b/system/database/drivers/sqlite3/sqlite3_result.php
index 117fb3c..35aecda 100644
--- a/system/database/drivers/sqlite3/sqlite3_result.php
+++ b/system/database/drivers/sqlite3/sqlite3_result.php
@@ -167,6 +167,7 @@
 	 * this internally before fetching results to make sure the
 	 * result set starts at zero
 	 *
+	 * @param	$n = 0	(ignored)
 	 * @return	array
 	 */
 	protected function _data_seek($n = 0)
diff --git a/system/database/drivers/sqlsrv/sqlsrv_driver.php b/system/database/drivers/sqlsrv/sqlsrv_driver.php
index 8f61522..32f1a59 100644
--- a/system/database/drivers/sqlsrv/sqlsrv_driver.php
+++ b/system/database/drivers/sqlsrv/sqlsrv_driver.php
@@ -53,6 +53,7 @@
 	/**
 	 * Non-persistent database connection
 	 *
+	 * @param	bool	$pooling = FALSE
 	 * @return	resource
 	 */
 	public function db_connect($pooling = FALSE)
@@ -144,6 +145,7 @@
 	/**
 	 * Begin Transaction
 	 *
+	 * @param	bool	$test_mode = FALSE
 	 * @return	bool
 	 */
 	public function trans_begin($test_mode = FALSE)
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index b592f3c..016a36c 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -390,19 +390,19 @@
 
 // ------------------------------------------------------------------------
 
-/**
- * Word Wrap
- *
- * Wraps text at the specified character. Maintains the integrity of words.
- * Anything placed between {unwrap}{/unwrap} will not be word wrapped, nor
- * will URLs.
- *
- * @param	string	the text string
- * @param	int	the number of characters to wrap at
- * @return	string
- */
 if ( ! function_exists('word_wrap'))
 {
+	/**
+	 * Word Wrap
+	 *
+	 * Wraps text at the specified character. Maintains the integrity of words.
+	 * Anything placed between {unwrap}{/unwrap} will not be word wrapped, nor
+	 * will URLs.
+	 *
+	 * @param	string	$str		the text string
+	 * @param	int	$charlim = 76	the number of characters to wrap at
+	 * @return	string
+	 */
 	function word_wrap($str, $charlim = 76)
 	{
 		// Set the character limit
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index 9dbba06..96bedd0 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -60,9 +60,8 @@
 	/**
 	 * Auto Typography Wrapper Function
 	 *
-	 * @param	string
-	 * @param	bool	whether to allow javascript event handlers
-	 * @param	bool	whether to reduce multiple instances of double newlines to two
+	 * @param	string	$str
+	 * @param	bool	$reduce_linebreaks = FALSE	whether to reduce multiple instances of double newlines to two
 	 * @return	string
 	 */
 	function auto_typography($str, $reduce_linebreaks = FALSE)
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index 769d892..5d642b9 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -172,7 +172,8 @@
 	/**
 	 * Array of methods and properties for the parent class(es)
 	 *
-	 * @var array
+	 * @static
+	 * @var	array
 	 */
 	protected static $_reflections = array();
 
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index c1130e9..83b442f 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -94,6 +94,7 @@
 	 *
 	 * The constructor can be passed an array of config values
 	 *
+	 * @param	array	$config = array()
 	 * @return	void
 	 */
 	public function __construct($config = array())
@@ -188,8 +189,9 @@
 	/**
 	 * Set FROM
 	 *
-	 * @param	string	From
-	 * @param	string	Return-Path
+	 * @param	string	$from
+	 * @param	string	$name
+	 * @param	string	$return_path = NULL	Return-Path
 	 * @return	object
 	 */
 	public function from($from, $name = '', $return_path = NULL)
@@ -405,7 +407,10 @@
 	/**
 	 * Assign file attachments
 	 *
-	 * @param	string
+	 * @param	string	$filename
+	 * @param	string	$disposition = 'attachment'
+	 * @param	string	$newname = NULL
+	 * @param	string	$mime = ''
 	 * @return	object
 	 */
 	public function attach($filename, $disposition = '', $newname = NULL, $mime = '')
@@ -1256,6 +1261,7 @@
 	/**
 	 * Send Email
 	 *
+	 * @param	bool	$auto_clear = TRUE
 	 * @return	bool
 	 */
 	public function send($auto_clear = TRUE)
@@ -1368,6 +1374,7 @@
 	/**
 	 * Strip line-breaks via callback
 	 *
+	 * @param	string	$matches
 	 * @return	string
 	 */
 	protected function _remove_nl_callback($matches)
@@ -1535,7 +1542,6 @@
 	/**
 	 * SMTP Connect
 	 *
-	 * @param	string
 	 * @return	string
 	 */
 	protected function _smtp_connect()
@@ -1710,11 +1716,12 @@
 	/**
 	 * Send SMTP data
 	 *
+	 * @param	string	$data
 	 * @return	bool
 	 */
 	protected function _send_data($data)
 	{
-		if ( ! fwrite($this->_smtp_connect, $data . $this->newline))
+		if ( ! fwrite($this->_smtp_connect, $data.$this->newline))
 		{
 			$this->_set_error_message('lang:email_smtp_data_failure', $data);
 			return FALSE;
@@ -1786,7 +1793,8 @@
 	/**
 	 * Set Message
 	 *
-	 * @param	string
+	 * @param	string	$msg
+	 * @param	string	$val = ''
 	 * @return	void
 	 */
 	protected function _set_error_message($msg, $val = '')
diff --git a/system/libraries/Ftp.php b/system/libraries/Ftp.php
index 76f5e15..ae85fdf 100644
--- a/system/libraries/Ftp.php
+++ b/system/libraries/Ftp.php
@@ -44,6 +44,12 @@
 	public $debug		= FALSE;
 	public $conn_id		= FALSE;
 
+	/**
+	 * Constructor
+	 *
+	 * @param	array	$config = array()
+	 * @return	void
+	 */
 	public function __construct($config = array())
 	{
 		if (count($config) > 0)
@@ -474,6 +480,7 @@
 	/**
 	 * FTP List files in the specified directory
 	 *
+	 * @param	string	$path = '.'
 	 * @return	array
 	 */
 	public function list_files($path = '.')
diff --git a/system/libraries/Javascript.php b/system/libraries/Javascript.php
index 5c8b092..60309cd 100644
--- a/system/libraries/Javascript.php
+++ b/system/libraries/Javascript.php
@@ -38,6 +38,12 @@
 
 	protected $_javascript_location = 'js';
 
+	/**
+	 * Constructor
+	 *
+	 * @param	array	$params = array()
+	 * @return	void
+	 */
 	public function __construct($params = array())
 	{
 		$defaults = array('js_library_driver' => 'jquery', 'autoload' => TRUE);
@@ -312,8 +318,7 @@
 	 *
 	 * Outputs a javascript library mouseup event
 	 *
-	 * @param	string	The element to attach the event to
-	 * @param	string	The code to execute
+	 * @param	string	$js	Code to execute
 	 * @return	string
 	 */
 	public function ready($js)
@@ -394,9 +399,10 @@
 	 *
 	 * Outputs a javascript library animate event
 	 *
-	 * @param	string	- element
-	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
-	 * @param	string	- Javascript callback function
+	 * @param	string	$element = 'this'
+	 * @param	array	$params = array()
+	 * @param	mixed	$speed			'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	$extra
 	 * @return	string
 	 */
 	public function animate($element = 'this', $params = array(), $speed = '', $extra = '')
@@ -546,10 +552,11 @@
 	 *
 	 * Outputs a javascript library toggle class event
 	 *
-	 * @param	string	- element
+	 * @param	string	$element = 'this'
+	 * @param	string	$class = ''
 	 * @return	string
 	 */
-	public function toggleClass($element = 'this', $class='')
+	public function toggleClass($element = 'this', $class = '')
 	{
 		return $this->js->_toggleClass($element, $class);
 	}
@@ -579,7 +586,8 @@
 	 *
 	 * gather together all script needing to be output
 	 *
-	 * @param	string	The element to attach the event to
+	 * @param	string	$view_var = 'script_foot'
+	 * @param	bool	$script_tags = TRUE
 	 * @return	string
 	 */
 	public function compile($view_var = 'script_foot', $script_tags = TRUE)
@@ -587,6 +595,8 @@
 		$this->js->_compile($view_var, $script_tags);
 	}
 
+	// --------------------------------------------------------------------
+
 	/**
 	 * Clear Compile
 	 *
@@ -606,7 +616,8 @@
 	 *
 	 * Outputs a <script> tag with the source as an external js file
 	 *
-	 * @param	string	The element to attach the event to
+	 * @param	string	$external_file = ''
+	 * @param	bool	$relative = FALSE
 	 * @return	string
 	 */
 	public function external($external_file = '', $relative = FALSE)
@@ -799,7 +810,8 @@
 	 *
 	 * Ensures a standard json value and escapes values
 	 *
-	 * @param	mixed
+	 * @param	mixed	$result
+	 * @param	bool	$is_key = FALSE
 	 * @return	string
 	 */
 	protected function _prep_args($result, $is_key = FALSE)
diff --git a/system/libraries/Trackback.php b/system/libraries/Trackback.php
index 9a680dc..7bd7cba 100644
--- a/system/libraries/Trackback.php
+++ b/system/libraries/Trackback.php
@@ -45,6 +45,11 @@
 	public $response		= '';
 	public $error_msg		= array();
 
+	/**
+	 * Constructor
+	 *
+	 * @return	void
+	 */
 	public function __construct()
 	{
 		log_message('debug', 'Trackback Class Initialized');
diff --git a/system/libraries/Unit_test.php b/system/libraries/Unit_test.php
index c2c0175..7b99dee 100644
--- a/system/libraries/Unit_test.php
+++ b/system/libraries/Unit_test.php
@@ -38,13 +38,18 @@
  */
 class CI_Unit_test {
 
-	public $active					= TRUE;
-	public $results				= array();
-	public $strict					= FALSE;
-	protected $_template				= NULL;
-	protected $_template_rows			= NULL;
+	public $active			= TRUE;
+	public $results			= array();
+	public $strict			= FALSE;
+	protected $_template		= NULL;
+	protected $_template_rows	= NULL;
 	protected $_test_items_visible	= array();
 
+	/**
+	 * Constructor
+	 *
+	 * @return	void
+	 */
 	public function __construct()
 	{
 		// These are the default items visible when a test is run.
@@ -86,9 +91,10 @@
 	 *
 	 * Runs the supplied tests
 	 *
-	 * @param	mixed
-	 * @param	mixed
-	 * @param	string
+	 * @param	mixed	$test
+	 * @param	mixed	$expected = TRUE
+	 * @param	string	$test_name = 'undefined'
+	 * @param	string	$notes = ''
 	 * @return	string
 	 */
 	public function run($test, $expected = TRUE, $test_name = 'undefined', $notes = '')
@@ -134,6 +140,7 @@
 	 *
 	 * Displays a table with the test data
 	 *
+	 * @param	array	 $result = array()
 	 * @return	string
 	 */
 	public function report($result = array())
@@ -213,6 +220,7 @@
 	 *
 	 * Returns the raw result data
 	 *
+	 * @param	array	$results = array()
 	 * @return	array
 	 */
 	public function result($results = array())
@@ -345,14 +353,22 @@
 }
 
 /**
- * Helper functions to test boolean true/false
+ * Helper function to test boolean TRUE
  *
+ * @param	mixed	$test
  * @return	bool
  */
 function is_true($test)
 {
 	return ($test === TRUE);
 }
+
+/**
+ * Helper function to test boolean FALSE
+ *
+ * @param	mixed	$test
+ * @return	bool
+ */
 function is_false($test)
 {
 	return ($test === FALSE);
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index d381440..76bbc24 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -154,6 +154,7 @@
 	/**
 	 * Perform the file upload
 	 *
+	 * @param	string	$field = 'userfile'
 	 * @return	bool
 	 */
 	public function do_upload($field = 'userfile')
@@ -790,7 +791,8 @@
 	/**
 	 * Limit the File Name Length
 	 *
-	 * @param	string
+	 * @param	string	$filename
+	 * @param	int	$length
 	 * @return	string
 	 */
 	public function limit_filename_length($filename, $length)
diff --git a/system/libraries/Xmlrpc.php b/system/libraries/Xmlrpc.php
index dc5d27f..3ed050a 100755
--- a/system/libraries/Xmlrpc.php
+++ b/system/libraries/Xmlrpc.php
@@ -170,8 +170,10 @@
 	/**
 	 * Parse server URL
 	 *
-	 * @param	string	url
-	 * @param	int	port
+	 * @param	string	$url
+	 * @param	int	$port = 80
+	 * @param	string	$proxy = FALSE
+	 * @param	int	$proxy_port = 8080
 	 * @return	void
 	 */
 	public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080)
@@ -395,9 +397,11 @@
 	/**
 	 * Constructor
 	 *
-	 * @param	string
-	 * @param	object
-	 * @param	int
+	 * @param	string	$path
+	 * @param	object	$server
+	 * @param	int	$port = 80
+	 * @param	string	$proxy = FALSE
+	 * @param	int	$proxy_port = 8080
 	 * @return	void
 	 */
 	public function __construct($path, $server, $port = 80, $proxy = FALSE, $proxy_port = 8080)
diff --git a/system/libraries/javascript/Jquery.php b/system/libraries/javascript/Jquery.php
index 44c16b5..8739d14 100644
--- a/system/libraries/javascript/Jquery.php
+++ b/system/libraries/javascript/Jquery.php
@@ -34,7 +34,6 @@
  * @author		EllisLab Dev Team
  * @link		http://codeigniter.com/user_guide/libraries/javascript.html
  */
-
 class CI_Jquery extends CI_Javascript {
 
 	protected $_javascript_folder = 'js';
@@ -45,6 +44,12 @@
 	public $jquery_table_sorter_pager_active = FALSE;
 	public $jquery_ajax_img = '';
 
+	/**
+	 * Constructor
+	 *
+	 * @param	array	$params
+	 * @return	void
+	 */
 	public function __construct($params)
 	{
 		$this->CI =& get_instance();
@@ -101,15 +106,12 @@
 	 *
 	 * @param	string	The element to attach the event to
 	 * @param	string	The code to execute
-	 * @param	boolean	whether or not to return false
+	 * @param	bool	whether or not to return false
 	 * @return	string
 	 */
 	protected function _click($element = 'this', $js = '', $ret_false = TRUE)
 	{
-		if ( ! is_array($js))
-		{
-			$js = array($js);
-		}
+		is_array($js) OR $js = array($js);
 
 		if ($ret_false)
 		{
@@ -307,11 +309,10 @@
 	 *
 	 * Outputs script directly
 	 *
-	 * @param	string	The element to attach the event to
-	 * @param	string	The code to execute
-	 * @return	string
+	 * @param	array	$array_js = array()
+	 * @return	void
 	 */
-	protected function _output($array_js = '')
+	protected function _output($array_js = array())
 	{
 		if ( ! is_array($array_js))
 		{
@@ -381,10 +382,11 @@
 	 *
 	 * Outputs a jQuery addClass event
 	 *
-	 * @param	string	- element
+	 * @param	string	$element = 'this'
+	 * @param	string	$class = ''
 	 * @return	string
 	 */
-	protected function _addClass($element = 'this', $class='')
+	protected function _addClass($element = 'this', $class = '')
 	{
 		$element = $this->_prep_element($element);
 		return '$('.$element.').addClass("'.$class.'");';
@@ -397,9 +399,10 @@
 	 *
 	 * Outputs a jQuery animate event
 	 *
-	 * @param	string	- element
-	 * @param	string	- One of 'slow', 'normal', 'fast', or time in milliseconds
-	 * @param	string	- Javascript callback function
+	 * @param	string	$element = 'this'
+	 * @param	array	$params = array()
+	 * @param	string	$speed = ''		'slow', 'normal', 'fast', or time in milliseconds
+	 * @param	string	$extra = ''
 	 * @return	string
 	 */
 	protected function _animate($element = 'this', $params = array(), $speed = '', $extra = '')
@@ -511,10 +514,11 @@
 	 *
 	 * Outputs a jQuery remove class event
 	 *
-	 * @param	string	- element
+	 * @param	string	$element = 'this'
+	 * @param	string	$class = ''
 	 * @return	string
 	 */
-	protected function _removeClass($element = 'this', $class='')
+	protected function _removeClass($element = 'this', $class = '')
 	{
 		$element = $this->_prep_element($element);
 		return '$('.$element.').removeClass("'.$class.'");';
@@ -618,10 +622,11 @@
 	 *
 	 * Outputs a jQuery toggle class event
 	 *
-	 * @param	string	- element
+	 * @param	string	$element = 'this'
+	 * @param	string	$class = ''
 	 * @return	string
 	 */
-	protected function _toggleClass($element = 'this', $class='')
+	protected function _toggleClass($element = 'this', $class = '')
 	{
 		$element = $this->_prep_element($element);
 		return '$('.$element.').toggleClass("'.$class.'");';
@@ -703,8 +708,9 @@
 	/**
 	 * Zebra tables
 	 *
-	 * @param	string	table name
-	 * @param	string	plugin location
+	 * @param	string	$class = ''
+	 * @param	string	$odd = 'odd'
+	 * @param	string	$hover = ''
 	 * @return	string
 	 */
 	protected function _zebraTables($class = '', $odd = 'odd', $hover = '')
@@ -731,7 +737,8 @@
 	 *
 	 * http://www.malsup.com/jquery/corner/
 	 *
-	 * @param	string	target
+	 * @param	string	$element = ''
+	 * @param	string	$corner_style = ''
 	 * @return	string
 	 */
 	public function corner($element = '', $corner_style = '')
@@ -750,10 +757,12 @@
 	// --------------------------------------------------------------------
 
 	/**
-	 * modal window
+	 * Modal window
 	 *
 	 * Load a thickbox modal window
 	 *
+	 * @param	string	$src
+	 * @param	bool	$relative = FALSE
 	 * @return	void
 	 */
 	public function modal($src, $relative = FALSE)
@@ -768,6 +777,8 @@
 	 *
 	 * Load an Effect library
 	 *
+	 * @param	string	$src
+	 * @param	bool	$relative = FALSE
 	 * @return	void
 	 */
 	public function effect($src, $relative = FALSE)
@@ -782,6 +793,8 @@
 	 *
 	 * Load a plugin library
 	 *
+	 * @param	string	$src
+	 * @param	bool	$relative = FALSE
 	 * @return	void
 	 */
 	public function plugin($src, $relative = FALSE)
@@ -796,12 +809,15 @@
 	 *
 	 * Load a user interface library
 	 *
+	 * @param	string	$src
+	 * @param	bool	$relative = FALSE
 	 * @return	void
 	 */
 	public function ui($src, $relative = FALSE)
 	{
 		$this->jquery_code_for_load[] = $this->external($src, $relative);
 	}
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -809,11 +825,12 @@
 	 *
 	 * Creates a jQuery sortable
 	 *
-	 * @return	void
+	 * @param	string	$element
+	 * @param	array	$options = array()
+	 * @return	string
 	 */
 	public function sortable($element, $options = array())
 	{
-
 		if (count($options) > 0)
 		{
 			$sort_options = array();
@@ -880,7 +897,9 @@
 	 * As events are specified, they are stored in an array
 	 * This funciton compiles them all for output on a page
 	 *
-	 * @return	string
+	 * @param	string	$view_var = 'script_foot'
+	 * @param	bool	$script_tags = TRUE
+	 * @return	void
 	 */
 	protected function _compile($view_var = 'script_foot', $script_tags = TRUE)
 	{
@@ -902,7 +921,6 @@
 		$output = ($script_tags === FALSE) ? $script : $this->inline($script);
 
 		$this->CI->load->vars(array($view_var => $output));
-
 	}
 
 	// --------------------------------------------------------------------
@@ -926,14 +944,12 @@
 	 *
 	 * A wrapper for writing document.ready()
 	 *
-	 * @return	string
+	 * @param	array	$js
+	 * @return	void
 	 */
 	protected function _document_ready($js)
 	{
-		if ( ! is_array($js))
-		{
-			$js = array($js);
-		}
+		is_array($js) OR $js = array($js);
 
 		foreach ($js as $script)
 		{
@@ -948,7 +964,8 @@
 	 *
 	 * Outputs the script tag that loads the jquery.js file into an HTML document
 	 *
-	 * @param	string
+	 * @param	string	$library_src = ''
+	 * @param	bool	$relative = FALSE
 	 * @return	string
 	 */
 	public function script($library_src = '', $relative = FALSE)
diff --git a/tests/mocks/core/lang.php b/tests/mocks/core/lang.php
index 1b99aed..27ea3fa 100644
--- a/tests/mocks/core/lang.php
+++ b/tests/mocks/core/lang.php
@@ -2,12 +2,12 @@
 
 class Mock_Core_Lang extends CI_Lang {
 
-	function line($line = '')
+	public function line($line = '')
 	{
 		return FALSE;
 	}
 
-	function load($langfile, $idiom = '', $return = false, $add_suffix = true, $alt_path = '')
+	public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
 	{
 		return;
 	}
diff --git a/tests/mocks/libraries/session.php b/tests/mocks/libraries/session.php
index 9d6feee..c6e194f 100644
--- a/tests/mocks/libraries/session.php
+++ b/tests/mocks/libraries/session.php
@@ -4,6 +4,7 @@
  * Mock library to add testing features to Session driver library
  */
 class Mock_Libraries_Session extends CI_Session {
+
 	/**
 	 * Simulate new page load
 	 */
@@ -19,18 +20,18 @@
  * Mock cookie driver to overload cookie setting
  */
 class Mock_Libraries_Session_cookie extends CI_Session_cookie {
+
 	/**
 	 * Overload _setcookie to manage $_COOKIE values, since actual cookies can't be set in unit testing
 	 */
-	protected function _setcookie($name, $value = '', $expire = 0, $path = '', $domain = '', $secure = false,
-	$httponly = false)
+	protected function _setcookie($name, $value = '', $expire = 0, $path = '', $domain = '', $secure = FALSE, $httponly = FALSE)
 	{
-		if (empty($value) || $expire <= time()) {
-			// Clear cookie
+		if (empty($value) OR $expire <= time())
+		{
 			unset($_COOKIE[$name]);
 		}
-		else {
-			// Set cookie
+		else
+		{
 			$_COOKIE[$name] = $value;
 		}
 	}
@@ -39,5 +40,4 @@
 /**
  * Mock native driver (just for consistency in loading)
  */
-class Mock_Libraries_Session_native extends CI_Session_native { }
-
+class Mock_Libraries_Session_native extends CI_Session_native { }
\ No newline at end of file
diff --git a/user_guide_src/source/libraries/user_agent.rst b/user_guide_src/source/libraries/user_agent.rst
index 855ece2..97abd22 100644
--- a/user_guide_src/source/libraries/user_agent.rst
+++ b/user_guide_src/source/libraries/user_agent.rst
@@ -72,7 +72,7 @@
 	{
 	    echo 'You are using Safari.';
 	}
-	else if ($this->agent->is_browser())
+	elseif ($this->agent->is_browser())
 	{
 	    echo 'You are using a browser.';
 	}
@@ -94,7 +94,7 @@
 	{
 	    $this->load->view('iphone/home');
 	}
-	else if ($this->agent->is_mobile())
+	elseif ($this->agent->is_mobile())
 	{
 	    $this->load->view('mobile/home');
 	}