Merge upstream branch
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 66f21c1..f1ba364 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -25,8 +25,6 @@
  * @filesource
  */
 
-// ------------------------------------------------------------------------
-
 /**
  * CodeIgniter Date Helpers
  *
@@ -44,8 +42,7 @@
  *
  * Returns time() or its GMT equivalent based on the config file preference
  *
- * @access	public
- * @return	integer
+ * @return	int
  */
 if ( ! function_exists('now'))
 {
@@ -85,10 +82,9 @@
  * have to worry about escaping your text letters that
  * match the date codes.
  *
- * @access	public
  * @param	string
- * @param	integer
- * @return	integer
+ * @param	int
+ * @return	int
  */
 if ( ! function_exists('mdate'))
 {
@@ -118,9 +114,8 @@
  *
  * Returns a date formatted according to the submitted standard.
  *
- * @access	public
  * @param	string	the chosen format
- * @param	integer	Unix timestamp
+ * @param	int	Unix timestamp
  * @return	string
  */
 if ( ! function_exists('standard_date'))
@@ -157,10 +152,9 @@
  * Returns a span of seconds in this format:
  *	10 days 14 hours 36 minutes 47 seconds
  *
- * @access	public
- * @param	integer	a number of seconds
- * @param	integer	Unix timestamp
- * @param	integer	a number of display units
+ * @param	int	a number of seconds
+ * @param	int	Unix timestamp
+ * @param	int	a number of display units
  * @return	string
  */
 if ( ! function_exists('timespan'))
@@ -273,10 +267,9 @@
  * Takes a month/year as input and returns the number of days
  * for the given month/year. Takes leap years into consideration.
  *
- * @access	public
- * @param	integer a numeric month
- * @param	integer	a numeric year
- * @return	integer
+ * @param	int	a numeric month
+ * @param	int	a numeric year
+ * @return	int
  */
 if ( ! function_exists('days_in_month'))
 {
@@ -294,7 +287,7 @@
 
 		if ($month == 2)
 		{
-			if ($year % 400 == 0 OR ($year % 4 == 0 AND $year % 100 != 0))
+			if ($year % 400 == 0 OR ($year % 4 == 0 && $year % 100 != 0))
 			{
 				return 29;
 			}
@@ -310,9 +303,8 @@
 /**
  * Converts a local Unix timestamp to GMT
  *
- * @access	public
- * @param	integer Unix timestamp
- * @return	integer
+ * @param	int	Unix timestamp
+ * @return	int
  */
 if ( ! function_exists('local_to_gmt'))
 {
@@ -343,11 +335,10 @@
  * at the local value based on the timezone and DST setting
  * submitted
  *
- * @access	public
- * @param	integer Unix timestamp
+ * @param	int	Unix timestamp
  * @param	string	timezone
  * @param	bool	whether DST is active
- * @return	integer
+ * @return	int
  */
 if ( ! function_exists('gmt_to_local'))
 {
@@ -374,9 +365,8 @@
 /**
  * Converts a MySQL Timestamp to Unix
  *
- * @access	public
- * @param	integer Unix timestamp
- * @return	integer
+ * @param	int	Unix timestamp
+ * @return	int
  */
 if ( ! function_exists('mysql_to_unix'))
 {
@@ -409,8 +399,7 @@
  *
  * Formats Unix timestamp to the following prototype: 2006-08-21 11:35 PM
  *
- * @access	public
- * @param	integer Unix timestamp
+ * @param	int	Unix timestamp
  * @param	bool	whether to show seconds
  * @param	string	format: us or euro
  * @return	string
@@ -451,9 +440,8 @@
  *
  * Reverses the above process
  *
- * @access	public
  * @param	string	format: us or euro
- * @return	integer
+ * @return	int
  */
 if ( ! function_exists('human_to_unix'))
 {
@@ -499,12 +487,12 @@
 		{
 			$ampm = strtolower($split['2']);
 
-			if (substr($ampm, 0, 1) == 'p' AND $hour < 12)
+			if (substr($ampm, 0, 1) === 'p' && $hour < 12)
 			{
 				$hour = $hour + 12;
 			}
 
-			if (substr($ampm, 0, 1) == 'a' AND $hour == 12)
+			if (substr($ampm, 0, 1) === 'a' && $hour == 12)
 			{
 				$hour =  '00';
 			}
@@ -525,10 +513,9 @@
  * Turns many "reasonably-date-like" strings into something
  * that is actually useful. This only works for dates after unix epoch.
  *
- * @access  public
- * @param   string  The terribly formatted date-like string
- * @param   string  Date format to return (same as php date function)
- * @return  string
+ * @param	string	The terribly formatted date-like string
+ * @param	string	Date format to return (same as php date function)
+ * @return	string
  */
 if ( ! function_exists('nice_date'))
 {
@@ -593,7 +580,6 @@
  *
  * Generates a drop-down menu of timezones.
  *
- * @access	public
  * @param	string	timezone
  * @param	string	classname
  * @param	string	menu name
@@ -634,10 +620,9 @@
 /**
  * Timezones
  *
- * Returns an array of timezones.  This is a helper function
+ * Returns an array of timezones. This is a helper function
  * for various other ones in this library
  *
- * @access	public
  * @param	string	timezone
  * @return	string
  */
@@ -698,7 +683,7 @@
 
 		$tz = ($tz == 'GMT') ? 'UTC' : $tz;
 
-		return ( ! isset($zones[$tz])) ? 0 : $zones[$tz];
+		return isset($zones[$tz]) ? $zones[$tz] : 0;
 	}
 }
 
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php
index d7ca13e..4044ace 100644
--- a/system/helpers/directory_helper.php
+++ b/system/helpers/directory_helper.php
@@ -85,4 +85,4 @@
 }
 
 /* End of file directory_helper.php */
-/* Location: ./system/helpers/directory_helper.php */
+/* Location: ./system/helpers/directory_helper.php */
\ No newline at end of file
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index 485806b..feeaf57 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -199,8 +199,8 @@
  *
  * Takes multiple words separated by the separator and changes them to spaces
  *
- * @param	string $str
- * @param 	string $separator
+ * @param	string	$str
+ * @param 	string	$separator
  * @return	str
  */
 if ( ! function_exists('humanize'))
@@ -214,19 +214,21 @@
 /**
  * Checks if the given word has a plural version.
  *
- * @param   string  the word to check
- * @return  bool    if the word is countable
+ * @param	string	the word to check
+ * @return	bool	if the word is countable
  */
 if ( ! function_exists('is_countable'))
 {
 	function is_countable($word)
 	{
-		return ! (in_array(strtolower(strval($word)), array(
-			'equipment', 'information', 'rice', 'money',
-			'species', 'series', 'fish', 'meta'
-		)));
+		return ! in_array(strtolower(strval($word)),
+					array(
+						'equipment', 'information', 'rice', 'money',
+						'species', 'series', 'fish', 'meta'
+					)
+			);
 	}
 }
 
 /* End of file inflector_helper.php */
-/* Location: ./system/helpers/inflector_helper.php */
+/* Location: ./system/helpers/inflector_helper.php */
\ No newline at end of file
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index 8c7adea..d6f134c 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.php
@@ -124,4 +124,4 @@
 }
 
 /* End of file security_helper.php */
-/* Location: ./system/helpers/security_helper.php */
+/* Location: ./system/helpers/security_helper.php */
\ No newline at end of file
diff --git a/user_guide_src/source/general/styleguide.rst b/user_guide_src/source/general/styleguide.rst
index c97f238..2b91d1c 100644
--- a/user_guide_src/source/general/styleguide.rst
+++ b/user_guide_src/source/general/styleguide.rst
@@ -94,7 +94,7 @@
 
 	class Super_class {
 
-		function __construct()
+		public function __construct()
 		{
 
 		}
diff --git a/user_guide_src/source/general/views.rst b/user_guide_src/source/general/views.rst
index dc65f6c..9b7c9da 100644
--- a/user_guide_src/source/general/views.rst
+++ b/user_guide_src/source/general/views.rst
@@ -49,7 +49,7 @@
 	<?php
 	class Blog extends CI_Controller {
 
-		function index()
+		public function index()
 		{
 			$this->load->view('blogview');
 		}
@@ -74,14 +74,14 @@
 
 	class Page extends CI_Controller {
 
-	   function index()
-	   {
-	      $data['page_title'] = 'Your title';
-	      $this->load->view('header');
-	      $this->load->view('menu');
-	      $this->load->view('content', $data);
-	      $this->load->view('footer');
-	   }
+		public function index()
+		{
+			$data['page_title'] = 'Your title';
+			$this->load->view('header');
+			$this->load->view('menu');
+			$this->load->view('content', $data);
+			$this->load->view('footer');
+		}
 
 	}
 	?>
@@ -126,7 +126,7 @@
 	<?php
 	class Blog extends CI_Controller {
 
-		function index()
+		public function index()
 		{
 			$data['title'] = "My Real Title";
 			$data['heading'] = "My Real Heading";
@@ -164,7 +164,7 @@
 	<?php
 	class Blog extends CI_Controller {
 
-		function index()
+		public function index()
 		{
 			$data['todo_list'] = array('Clean House', 'Call Mom', 'Run Errands');
 
diff --git a/user_guide_src/source/libraries/file_uploading.rst b/user_guide_src/source/libraries/file_uploading.rst
index 90efca9..d573fc7 100644
--- a/user_guide_src/source/libraries/file_uploading.rst
+++ b/user_guide_src/source/libraries/file_uploading.rst
@@ -90,24 +90,24 @@
 
 	class Upload extends CI_Controller {
 
-		function __construct()
+		public function __construct()
 		{
 			parent::__construct();
 			$this->load->helper(array('form', 'url'));
 		}
 
-		function index()
+		public function index()
 		{
 			$this->load->view('upload_form', array('error' => ' ' ));
 		}
 
-		function do_upload()
+		public function do_upload()
 		{
-			$config['upload_path'] = './uploads/';
-			$config['allowed_types'] = 'gif|jpg|png';
-			$config['max_size']	= '100';
-			$config['max_width']  = '1024';
-			$config['max_height']  = '768';
+			$config['upload_path']		= './uploads/';
+			$config['allowed_types']	= 'gif|jpg|png';
+			$config['max_size']		= 100;
+			$config['max_width']		= 1024;
+			$config['max_height']		= 768;
 
 			$this->load->library('upload', $config);
 
diff --git a/user_guide_src/source/libraries/form_validation.rst b/user_guide_src/source/libraries/form_validation.rst
index 5d7368c..3e8855f 100644
--- a/user_guide_src/source/libraries/form_validation.rst
+++ b/user_guide_src/source/libraries/form_validation.rst
@@ -123,7 +123,7 @@
 
 	class Form extends CI_Controller {
 
-		function index()
+		public function index()
 		{
 			$this->load->helper(array('form', 'url'));
 
@@ -219,7 +219,7 @@
 
 	class Form extends CI_Controller {
 
-		function index()
+		public function index()
 		{
 			$this->load->helper(array('form', 'url'));
 
diff --git a/user_guide_src/source/libraries/xmlrpc.rst b/user_guide_src/source/libraries/xmlrpc.rst
index 3b94576..dfb8811 100644
--- a/user_guide_src/source/libraries/xmlrpc.rst
+++ b/user_guide_src/source/libraries/xmlrpc.rst
@@ -184,10 +184,10 @@
 
 	class My_blog extends CI_Controller {
 
-	    function new_post($request)
-	    {
+		public function new_post($request)
+		{
 
-	    }
+		}
 	}
 
 The $request variable is an object compiled by the Server, which
@@ -304,7 +304,7 @@
 
 	class Xmlrpc_client extends CI_Controller {
 
-		function index()
+		public function index()
 		{
 			$this->load->helper('url');
 			$server_url = site_url('xmlrpc_server');
@@ -345,7 +345,7 @@
 
 	class Xmlrpc_server extends CI_Controller {
 
-		function index()
+		public function index()
 		{
 			$this->load->library('xmlrpc');
 			$this->load->library('xmlrpcs');
@@ -357,15 +357,17 @@
 		}
 
 
-		function process($request)
+		public function process($request)
 		{
 			$parameters = $request->output_parameters();
 
 			$response = array(
-								array(
-										'you_said'  => $parameters['0'],
-										'i_respond' => 'Not bad at all.'),
-								'struct');
+						array(
+							'you_said'  => $parameters[0],
+							'i_respond' => 'Not bad at all.'
+						),
+						'struct'
+					);
 
 			return $this->xmlrpc->send_response($response);
 		}
@@ -419,9 +421,9 @@
 ::
 
 	$parameters = $request->output_parameters();
-	$name = $parameters['0']['name'];
-	$size = $parameters['1']['size'];
-	$size = $parameters['1']['shape'];
+	$name = $parameters[0]['name'];
+	$size = $parameters[1]['size'];
+	$size = $parameters[1]['shape'];
 
 **************************
 XML-RPC Function Reference