GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — develop (#141)
by Gwenaël
14:16 queued 08:27
created
system/core/Security.php 3 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -53,22 +53,22 @@  discard block
 block discarded – undo
53 53
 	 *
54 54
 	 * @var	array
55 55
 	 */
56
-	public $filename_bad_chars =	array(
56
+	public $filename_bad_chars = array(
57 57
 		'../', '<!--', '-->', '<', '>',
58 58
 		"'", '"', '&', '$', '#',
59 59
 		'{', '}', '[', ']', '=',
60 60
 		';', '?', '%20', '%22',
61
-		'%3c',		// <
62
-		'%253c',	// <
63
-		'%3e',		// >
64
-		'%0e',		// >
65
-		'%28',		// (
66
-		'%29',		// )
67
-		'%2528',	// (
68
-		'%26',		// &
69
-		'%24',		// $
70
-		'%3f',		// ?
71
-		'%3b',		// ;
61
+		'%3c', // <
62
+		'%253c', // <
63
+		'%3e', // >
64
+		'%0e', // >
65
+		'%28', // (
66
+		'%29', // )
67
+		'%2528', // (
68
+		'%26', // &
69
+		'%24', // $
70
+		'%3f', // ?
71
+		'%3b', // ;
72 72
 		'%3d'		// =
73 73
 	);
74 74
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 *
108 108
 	 * @var	int
109 109
 	 */
110
-	protected $_csrf_expire =	7200;
110
+	protected $_csrf_expire = 7200;
111 111
 
112 112
 	/**
113 113
 	 * CSRF Token name
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	 *
117 117
 	 * @var	string
118 118
 	 */
119
-	protected $_csrf_token_name =	'ci_csrf_token';
119
+	protected $_csrf_token_name = 'ci_csrf_token';
120 120
 
121 121
 	/**
122 122
 	 * CSRF Cookie name
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
 	 *
126 126
 	 * @var	string
127 127
 	 */
128
-	protected $_csrf_cookie_name =	'ci_csrf_token';
128
+	protected $_csrf_cookie_name = 'ci_csrf_token';
129 129
 
130 130
 	/**
131 131
 	 * List of never allowed strings
132 132
 	 *
133 133
 	 * @var	array
134 134
 	 */
135
-	protected $_never_allowed_str =	array(
135
+	protected $_never_allowed_str = array(
136 136
 		'document.cookie'	=> '[removed]',
137 137
 		'document.write'	=> '[removed]',
138 138
 		'.parentNode'		=> '[removed]',
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 	 */
796 796
 	protected function _sanitize_naughty_html($matches)
797 797
 	{
798
-		static $naughty_tags    = array(
798
+		static $naughty_tags = array(
799 799
 			'alert', 'prompt', 'confirm', 'applet', 'audio', 'basefont', 'base', 'behavior', 'bgsound',
800 800
 			'blink', 'body', 'embed', 'expression', 'form', 'frameset', 'frame', 'head', 'html', 'ilayer',
801 801
 			'iframe', 'input', 'button', 'select', 'isindex', 'layer', 'link', 'meta', 'keygen', 'object',
Please login to merge, or discard this patch.
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -225,10 +225,12 @@  discard block
 block discarded – undo
225 225
 
226 226
 		// Do the tokens exist in both the _POST and _COOKIE arrays?
227 227
 		if ( ! isset($_POST[$this->_csrf_token_name], $_COOKIE[$this->_csrf_cookie_name])
228
-			OR $_POST[$this->_csrf_token_name] !== $_COOKIE[$this->_csrf_cookie_name]) // Do the tokens match?
228
+			OR $_POST[$this->_csrf_token_name] !== $_COOKIE[$this->_csrf_cookie_name]) {
229
+			// Do the tokens match?
229 230
 		{
230 231
 			$this->csrf_show_error();
231 232
 		}
233
+		}
232 234
 
233 235
 		// We kill this since we're done and we don't want to polute the _POST array
234 236
 		unset($_POST[$this->_csrf_token_name]);
@@ -421,8 +423,7 @@  discard block
 block discarded – undo
421 423
 			// closing tags every so often so we skip those and only
422 424
 			// do the long opening tags.
423 425
 			$str = preg_replace('/<\?(php)/i', '&lt;?\\1', $str);
424
-		}
425
-		else
426
+		} else
426 427
 		{
427 428
 			$str = str_replace(array('<?', '?'.'>'), array('&lt;?', '?&gt;'), $str);
428 429
 		}
@@ -599,8 +600,7 @@  discard block
 block discarded – undo
599 600
 			{
600 601
 				// The cast is required to avoid TypeError
601 602
 				return random_bytes((int) $length);
602
-			}
603
-			catch (Exception $e)
603
+			} catch (Exception $e)
604 604
 			{
605 605
 				// If random_bytes() can't do the job, we can't either ...
606 606
 				// There's no point in using fallbacks.
@@ -854,8 +854,7 @@  discard block
 block discarded – undo
854 854
 				)
855 855
 				{
856 856
 					$attributes[] = 'xss=removed';
857
-				}
858
-				else
857
+				} else
859 858
 				{
860 859
 					$attributes[] = $attribute[0][0];
861 860
 				}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -1237,6 +1237,7 @@
 block discarded – undo
1237 1237
 	 * Valid Email
1238 1238
 	 *
1239 1239
 	 * @param	string
1240
+	 * @param string $str
1240 1241
 	 * @return	bool
1241 1242
 	 */
1242 1243
 	public function valid_email($str)
Please login to merge, or discard this patch.
system/core/URI.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function __construct()
100 100
 	{
101
-		$this->config =& load_class('Config', 'core');
101
+		$this->config = & load_class('Config', 'core');
102 102
 
103 103
 		// If query strings are enabled, we don't need to parse any segments.
104 104
 		// However, they don't make sense under CLI.
@@ -558,11 +558,11 @@  discard block
 block discarded – undo
558 558
 
559 559
 		if ($where === 'trailing')
560 560
 		{
561
-			$leading	= '';
561
+			$leading = '';
562 562
 		}
563 563
 		elseif ($where === 'leading')
564 564
 		{
565
-			$trailing	= '';
565
+			$trailing = '';
566 566
 		}
567 567
 
568 568
 		return $leading.$this->$which($n).$trailing;
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -110,8 +110,7 @@  discard block
 block discarded – undo
110 110
 			if (is_cli())
111 111
 			{
112 112
 				$uri = $this->_parse_argv();
113
-			}
114
-			else
113
+			} else
115 114
 			{
116 115
 				$protocol = $this->config->item('uri_protocol');
117 116
 				empty($protocol) && $protocol = 'REQUEST_URI';
@@ -212,8 +211,7 @@  discard block
 block discarded – undo
212 211
 			if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0)
213 212
 			{
214 213
 				$uri = (string) substr($uri, strlen($_SERVER['SCRIPT_NAME']));
215
-			}
216
-			elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
214
+			} elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
217 215
 			{
218 216
 				$uri = (string) substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
219 217
 			}
@@ -226,8 +224,7 @@  discard block
 block discarded – undo
226 224
 			$query = explode('?', $query, 2);
227 225
 			$uri = $query[0];
228 226
 			$_SERVER['QUERY_STRING'] = isset($query[1]) ? $query[1] : '';
229
-		}
230
-		else
227
+		} else
231 228
 		{
232 229
 			$_SERVER['QUERY_STRING'] = $query;
233 230
 		}
@@ -259,8 +256,7 @@  discard block
 block discarded – undo
259 256
 		if (trim($uri, '/') === '')
260 257
 		{
261 258
 			return '';
262
-		}
263
-		elseif (strncmp($uri, '/', 1) === 0)
259
+		} elseif (strncmp($uri, '/', 1) === 0)
264 260
 		{
265 261
 			$uri = explode('?', $uri, 2);
266 262
 			$_SERVER['QUERY_STRING'] = isset($uri[1]) ? $uri[1] : '';
@@ -456,8 +452,7 @@  discard block
 block discarded – undo
456 452
 			if ($i % 2)
457 453
 			{
458 454
 				$retval[$lastval] = $seg;
459
-			}
460
-			else
455
+			} else
461 456
 			{
462 457
 				$retval[$seg] = NULL;
463 458
 				$lastval = $seg;
@@ -559,8 +554,7 @@  discard block
 block discarded – undo
559 554
 		if ($where === 'trailing')
560 555
 		{
561 556
 			$leading	= '';
562
-		}
563
-		elseif ($where === 'leading')
557
+		} elseif ($where === 'leading')
564 558
 		{
565 559
 			$trailing	= '';
566 560
 		}
Please login to merge, or discard this patch.
system/core/Utf8.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@  discard block
 block discarded – undo
67 67
 		{
68 68
 			define('UTF8_ENABLED', TRUE);
69 69
 			log_message('debug', 'UTF-8 Support Enabled');
70
-		}
71
-		else
70
+		} else
72 71
 		{
73 72
 			define('UTF8_ENABLED', FALSE);
74 73
 			log_message('debug', 'UTF-8 Support Disabled');
@@ -94,8 +93,7 @@  discard block
 block discarded – undo
94 93
 			if (MB_ENABLED)
95 94
 			{
96 95
 				$str = mb_convert_encoding($str, 'UTF-8', 'UTF-8');
97
-			}
98
-			elseif (ICONV_ENABLED)
96
+			} elseif (ICONV_ENABLED)
99 97
 			{
100 98
 				$str = @iconv('UTF-8', 'UTF-8//IGNORE', $str);
101 99
 			}
@@ -137,8 +135,7 @@  discard block
 block discarded – undo
137 135
 		if (MB_ENABLED)
138 136
 		{
139 137
 			return mb_convert_encoding($str, 'UTF-8', $encoding);
140
-		}
141
-		elseif (ICONV_ENABLED)
138
+		} elseif (ICONV_ENABLED)
142 139
 		{
143 140
 			return @iconv($encoding, 'UTF-8', $str);
144 141
 		}
Please login to merge, or discard this patch.
system/core/compat/hash.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -73,13 +73,11 @@  discard block
 block discarded – undo
73 73
 		{
74 74
 			trigger_error('hash_equals(): Expected known_string to be a string, '.strtolower(gettype($known_string)).' given', E_USER_WARNING);
75 75
 			return FALSE;
76
-		}
77
-		elseif ( ! is_string($user_string))
76
+		} elseif ( ! is_string($user_string))
78 77
 		{
79 78
 			trigger_error('hash_equals(): Expected user_string to be a string, '.strtolower(gettype($user_string)).' given', E_USER_WARNING);
80 79
 			return FALSE;
81
-		}
82
-		elseif (($length = strlen($known_string)) !== strlen($user_string))
80
+		} elseif (($length = strlen($known_string)) !== strlen($user_string))
83 81
 		{
84 82
 			return FALSE;
85 83
 		}
@@ -135,8 +133,7 @@  discard block
 block discarded – undo
135 133
 			if (is_string($iterations) && is_numeric($iterations))
136 134
 			{
137 135
 				$iterations = (int) $iterations;
138
-			}
139
-			else
136
+			} else
140 137
 			{
141 138
 				trigger_error('hash_pbkdf2() expects parameter 4 to be long, '.$type.' given', E_USER_WARNING);
142 139
 				return NULL;
@@ -159,8 +156,7 @@  discard block
 block discarded – undo
159 156
 			if (is_string($length) && is_numeric($length))
160 157
 			{
161 158
 				$length = (int) $length;
162
-			}
163
-			else
159
+			} else
164 160
 			{
165 161
 				trigger_error('hash_pbkdf2() expects parameter 5 to be long, '.$type.' given', E_USER_WARNING);
166 162
 				return NULL;
Please login to merge, or discard this patch.
system/core/compat/password.php 2 patches
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -113,18 +113,15 @@  discard block
 block discarded – undo
113 113
 		{
114 114
 			trigger_error('password_hash(): Provided salt is too short: '.$saltlen.' expecting 22', E_USER_WARNING);
115 115
 			return NULL;
116
-		}
117
-		elseif ( ! isset($options['salt']))
116
+		} elseif ( ! isset($options['salt']))
118 117
 		{
119 118
 			if (defined('MCRYPT_DEV_URANDOM'))
120 119
 			{
121 120
 				$options['salt'] = mcrypt_create_iv(16, MCRYPT_DEV_URANDOM);
122
-			}
123
-			elseif (function_exists('openssl_random_pseudo_bytes'))
121
+			} elseif (function_exists('openssl_random_pseudo_bytes'))
124 122
 			{
125 123
 				$options['salt'] = openssl_random_pseudo_bytes(16);
126
-			}
127
-			elseif (DIRECTORY_SEPARATOR === '/' && (is_readable($dev = '/dev/arandom') OR is_readable($dev = '/dev/urandom')))
124
+			} elseif (DIRECTORY_SEPARATOR === '/' && (is_readable($dev = '/dev/arandom') OR is_readable($dev = '/dev/urandom')))
128 125
 			{
129 126
 				if (($fp = fopen($dev, 'rb')) === FALSE)
130 127
 				{
@@ -147,16 +144,14 @@  discard block
 block discarded – undo
147 144
 				}
148 145
 
149 146
 				fclose($fp);
150
-			}
151
-			else
147
+			} else
152 148
 			{
153 149
 				log_message('error', 'compat/password: No CSPRNG available.');
154 150
 				return FALSE;
155 151
 			}
156 152
 
157 153
 			$options['salt'] = str_replace('+', '.', rtrim(base64_encode($options['salt']), '='));
158
-		}
159
-		elseif ( ! preg_match('#^[a-zA-Z0-9./]+$#D', $options['salt']))
154
+		} elseif ( ! preg_match('#^[a-zA-Z0-9./]+$#D', $options['salt']))
160 155
 		{
161 156
 			$options['salt'] = str_replace('+', '.', rtrim(base64_encode($options['salt']), '='));
162 157
 		}
@@ -189,8 +184,7 @@  discard block
 block discarded – undo
189 184
 		if ($algo !== $info['algo'])
190 185
 		{
191 186
 			return TRUE;
192
-		}
193
-		elseif ($algo === 1)
187
+		} elseif ($algo === 1)
194 188
 		{
195 189
 			$options['cost'] = isset($options['cost']) ? (int) $options['cost'] : 10;
196 190
 			return ($info['options']['cost'] !== $options['cost']);
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,40 +1,40 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CodeIgniter
4
- *
5
- * An open source application development framework for PHP
6
- *
7
- * This content is released under the MIT License (MIT)
8
- *
9
- * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
10
- *
11
- * Permission is hereby granted, free of charge, to any person obtaining a copy
12
- * of this software and associated documentation files (the "Software"), to deal
13
- * in the Software without restriction, including without limitation the rights
14
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- * copies of the Software, and to permit persons to whom the Software is
16
- * furnished to do so, subject to the following conditions:
17
- *
18
- * The above copyright notice and this permission notice shall be included in
19
- * all copies or substantial portions of the Software.
20
- *
21
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
- * THE SOFTWARE.
28
- *
29
- * @package	CodeIgniter
30
- * @author	EllisLab Dev Team
31
- * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
32
- * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
33
- * @license	http://opensource.org/licenses/MIT	MIT License
34
- * @link	http://codeigniter.com
35
- * @since	Version 3.0.0
36
- * @filesource
37
- */
3
+	 * CodeIgniter
4
+	 *
5
+	 * An open source application development framework for PHP
6
+	 *
7
+	 * This content is released under the MIT License (MIT)
8
+	 *
9
+	 * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
10
+	 *
11
+	 * Permission is hereby granted, free of charge, to any person obtaining a copy
12
+	 * of this software and associated documentation files (the "Software"), to deal
13
+	 * in the Software without restriction, including without limitation the rights
14
+	 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+	 * copies of the Software, and to permit persons to whom the Software is
16
+	 * furnished to do so, subject to the following conditions:
17
+	 *
18
+	 * The above copyright notice and this permission notice shall be included in
19
+	 * all copies or substantial portions of the Software.
20
+	 *
21
+	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+	 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+	 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+	 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+	 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+	 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+	 * THE SOFTWARE.
28
+	 *
29
+	 * @package	CodeIgniter
30
+	 * @author	EllisLab Dev Team
31
+	 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
32
+	 * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
33
+	 * @license	http://opensource.org/licenses/MIT	MIT License
34
+	 * @link	http://codeigniter.com
35
+	 * @since	Version 3.0.0
36
+	 * @filesource
37
+	 */
38 38
 defined('BASEPATH') OR exit('No direct script access allowed');
39 39
 
40 40
 /**
Please login to merge, or discard this patch.
system/core/compat/standard.php 2 patches
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -74,12 +74,10 @@  discard block
 block discarded – undo
74 74
 			if ($type === 'double')
75 75
 			{
76 76
 				$column_key = (int) $column_key;
77
-			}
78
-			elseif ($type === 'object' && method_exists($column_key, '__toString'))
77
+			} elseif ($type === 'object' && method_exists($column_key, '__toString'))
79 78
 			{
80 79
 				$column_key = (string) $column_key;
81
-			}
82
-			else
80
+			} else
83 81
 			{
84 82
 				trigger_error('array_column(): The column key should be either a string or an integer', E_USER_WARNING);
85 83
 				return FALSE;
@@ -91,12 +89,10 @@  discard block
 block discarded – undo
91 89
 			if ($type === 'double')
92 90
 			{
93 91
 				$index_key = (int) $index_key;
94
-			}
95
-			elseif ($type === 'object' && method_exists($index_key, '__toString'))
92
+			} elseif ($type === 'object' && method_exists($index_key, '__toString'))
96 93
 			{
97 94
 				$index_key = (string) $index_key;
98
-			}
99
-			else
95
+			} else
100 96
 			{
101 97
 				trigger_error('array_column(): The index key should be either a string or an integer', E_USER_WARNING);
102 98
 				return FALSE;
@@ -109,12 +105,10 @@  discard block
 block discarded – undo
109 105
 			if ($column_key === NULL)
110 106
 			{
111 107
 				$value = $a;
112
-			}
113
-			elseif (is_array($a) && array_key_exists($column_key, $a))
108
+			} elseif (is_array($a) && array_key_exists($column_key, $a))
114 109
 			{
115 110
 				$value = $a[$column_key];
116
-			}
117
-			else
111
+			} else
118 112
 			{
119 113
 				continue;
120 114
 			}
@@ -122,8 +116,7 @@  discard block
 block discarded – undo
122 116
 			if ($index_key === NULL OR ! array_key_exists($index_key, $a))
123 117
 			{
124 118
 				$result[] = $value;
125
-			}
126
-			else
119
+			} else
127 120
 			{
128 121
 				$result[$a[$index_key]] = $value;
129 122
 			}
@@ -158,8 +151,7 @@  discard block
 block discarded – undo
158 151
 			if ($type === 'object' && method_exists($data, '__toString'))
159 152
 			{
160 153
 				$data = (string) $data;
161
-			}
162
-			else
154
+			} else
163 155
 			{
164 156
 				trigger_error('hex2bin() expects parameter 1 to be string, '.$type.' given', E_USER_WARNING);
165 157
 				return NULL;
@@ -170,8 +162,7 @@  discard block
 block discarded – undo
170 162
 		{
171 163
 			trigger_error('Hexadecimal input string must have an even length', E_USER_WARNING);
172 164
 			return FALSE;
173
-		}
174
-		elseif ( ! preg_match('/^[0-9a-f]*$/i', $data))
165
+		} elseif ( ! preg_match('/^[0-9a-f]*$/i', $data))
175 166
 		{
176 167
 			trigger_error('Input string must be hexadecimal string', E_USER_WARNING);
177 168
 			return FALSE;
@@ -206,8 +197,7 @@  discard block
 block discarded – undo
206 197
 		{
207 198
 			trigger_error('array_replace() expects at least 1 parameter, 0 given', E_USER_WARNING);
208 199
 			return NULL;
209
-		}
210
-		elseif ($c === 1)
200
+		} elseif ($c === 1)
211 201
 		{
212 202
 			if ( ! is_array($arrays[0]))
213 203
 			{
@@ -227,8 +217,7 @@  discard block
 block discarded – undo
227 217
 			{
228 218
 				trigger_error('array_replace(): Argument #'.($i + 2).' is not an array', E_USER_WARNING);
229 219
 				return NULL;
230
-			}
231
-			elseif (empty($arrays[$i]))
220
+			} elseif (empty($arrays[$i]))
232 221
 			{
233 222
 				continue;
234 223
 			}
@@ -261,8 +250,7 @@  discard block
 block discarded – undo
261 250
 		{
262 251
 			trigger_error('array_replace_recursive() expects at least 1 parameter, 0 given', E_USER_WARNING);
263 252
 			return NULL;
264
-		}
265
-		elseif ($c === 1)
253
+		} elseif ($c === 1)
266 254
 		{
267 255
 			if ( ! is_array($arrays[0]))
268 256
 			{
@@ -282,8 +270,7 @@  discard block
 block discarded – undo
282 270
 			{
283 271
 				trigger_error('array_replace_recursive(): Argument #'.($i + 2).' is not an array', E_USER_WARNING);
284 272
 				return NULL;
285
-			}
286
-			elseif (empty($arrays[$i]))
273
+			} elseif (empty($arrays[$i]))
287 274
 			{
288 275
 				continue;
289 276
 			}
@@ -316,14 +303,12 @@  discard block
 block discarded – undo
316 303
 		if (strlen($str) === 0)
317 304
 		{
318 305
 			return '';
319
-		}
320
-		elseif (in_array($type = gettype($str), array('array', 'object'), TRUE))
306
+		} elseif (in_array($type = gettype($str), array('array', 'object'), TRUE))
321 307
 		{
322 308
 			if ($type === 'object' && method_exists($str, '__toString'))
323 309
 			{
324 310
 				$str = (string) $str;
325
-			}
326
-			else
311
+			} else
327 312
 			{
328 313
 				trigger_error('quoted_printable_encode() expects parameter 1 to be string, '.$type.' given', E_USER_WARNING);
329 314
 				return NULL;
Please login to merge, or discard this patch.
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -1,40 +1,40 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CodeIgniter
4
- *
5
- * An open source application development framework for PHP
6
- *
7
- * This content is released under the MIT License (MIT)
8
- *
9
- * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
10
- *
11
- * Permission is hereby granted, free of charge, to any person obtaining a copy
12
- * of this software and associated documentation files (the "Software"), to deal
13
- * in the Software without restriction, including without limitation the rights
14
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- * copies of the Software, and to permit persons to whom the Software is
16
- * furnished to do so, subject to the following conditions:
17
- *
18
- * The above copyright notice and this permission notice shall be included in
19
- * all copies or substantial portions of the Software.
20
- *
21
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
- * THE SOFTWARE.
28
- *
29
- * @package	CodeIgniter
30
- * @author	EllisLab Dev Team
31
- * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
32
- * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
33
- * @license	http://opensource.org/licenses/MIT	MIT License
34
- * @link	http://codeigniter.com
35
- * @since	Version 3.0.0
36
- * @filesource
37
- */
3
+	 * CodeIgniter
4
+	 *
5
+	 * An open source application development framework for PHP
6
+	 *
7
+	 * This content is released under the MIT License (MIT)
8
+	 *
9
+	 * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
10
+	 *
11
+	 * Permission is hereby granted, free of charge, to any person obtaining a copy
12
+	 * of this software and associated documentation files (the "Software"), to deal
13
+	 * in the Software without restriction, including without limitation the rights
14
+	 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+	 * copies of the Software, and to permit persons to whom the Software is
16
+	 * furnished to do so, subject to the following conditions:
17
+	 *
18
+	 * The above copyright notice and this permission notice shall be included in
19
+	 * all copies or substantial portions of the Software.
20
+	 *
21
+	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+	 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+	 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+	 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+	 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+	 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+	 * THE SOFTWARE.
28
+	 *
29
+	 * @package	CodeIgniter
30
+	 * @author	EllisLab Dev Team
31
+	 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
32
+	 * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
33
+	 * @license	http://opensource.org/licenses/MIT	MIT License
34
+	 * @link	http://codeigniter.com
35
+	 * @since	Version 3.0.0
36
+	 * @filesource
37
+	 */
38 38
 defined('BASEPATH') OR exit('No direct script access allowed');
39 39
 
40 40
 /**
Please login to merge, or discard this patch.
system/database/DB.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1,40 +1,40 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CodeIgniter
4
- *
5
- * An open source application development framework for PHP
6
- *
7
- * This content is released under the MIT License (MIT)
8
- *
9
- * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
10
- *
11
- * Permission is hereby granted, free of charge, to any person obtaining a copy
12
- * of this software and associated documentation files (the "Software"), to deal
13
- * in the Software without restriction, including without limitation the rights
14
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- * copies of the Software, and to permit persons to whom the Software is
16
- * furnished to do so, subject to the following conditions:
17
- *
18
- * The above copyright notice and this permission notice shall be included in
19
- * all copies or substantial portions of the Software.
20
- *
21
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
- * THE SOFTWARE.
28
- *
29
- * @package	CodeIgniter
30
- * @author	EllisLab Dev Team
31
- * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
32
- * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
33
- * @license	http://opensource.org/licenses/MIT	MIT License
34
- * @link	http://codeigniter.com
35
- * @since	Version 1.0.0
36
- * @filesource
37
- */
3
+	 * CodeIgniter
4
+	 *
5
+	 * An open source application development framework for PHP
6
+	 *
7
+	 * This content is released under the MIT License (MIT)
8
+	 *
9
+	 * Copyright (c) 2014 - 2015, British Columbia Institute of Technology
10
+	 *
11
+	 * Permission is hereby granted, free of charge, to any person obtaining a copy
12
+	 * of this software and associated documentation files (the "Software"), to deal
13
+	 * in the Software without restriction, including without limitation the rights
14
+	 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+	 * copies of the Software, and to permit persons to whom the Software is
16
+	 * furnished to do so, subject to the following conditions:
17
+	 *
18
+	 * The above copyright notice and this permission notice shall be included in
19
+	 * all copies or substantial portions of the Software.
20
+	 *
21
+	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+	 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+	 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+	 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+	 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+	 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+	 * THE SOFTWARE.
28
+	 *
29
+	 * @package	CodeIgniter
30
+	 * @author	EllisLab Dev Team
31
+	 * @copyright	Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
32
+	 * @copyright	Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
33
+	 * @license	http://opensource.org/licenses/MIT	MIT License
34
+	 * @link	http://codeigniter.com
35
+	 * @since	Version 1.0.0
36
+	 * @filesource
37
+	 */
38 38
 defined('BASEPATH') OR exit('No direct script access allowed');
39 39
 
40 40
 /**
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 	elseif ( ! class_exists('CI_DB', FALSE))
186 186
 	{
187 187
 		/**
188
-	 	 * @ignore
188
+		 * @ignore
189 189
 		 */
190 190
 		class CI_DB extends CI_DB_driver { }
191 191
 	}
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
73 73
 					if (file_exists($file_path = $path.'config/'.ENVIRONMENT.'/database.php'))
74 74
 					{
75 75
 						include($file_path);
76
-					}
77
-					elseif (file_exists($file_path = $path.'config/database.php'))
76
+					} elseif (file_exists($file_path = $path.'config/database.php'))
78 77
 					{
79 78
 						include($file_path);
80 79
 					}
@@ -95,15 +94,13 @@  discard block
 block discarded – undo
95 94
 		if ( ! isset($active_group))
96 95
 		{
97 96
 			show_error('You have not specified a database connection group via $active_group in your config/database.php file.');
98
-		}
99
-		elseif ( ! isset($db[$active_group]))
97
+		} elseif ( ! isset($db[$active_group]))
100 98
 		{
101 99
 			show_error('You have specified an invalid database connection group ('.$active_group.') in your config/database.php file.');
102 100
 		}
103 101
 
104 102
 		$params = $db[$active_group];
105
-	}
106
-	elseif (is_string($params))
103
+	} elseif (is_string($params))
107 104
 	{
108 105
 		/**
109 106
 		 * Parse the URL from the DSN string
@@ -181,8 +178,7 @@  discard block
 block discarded – undo
181 178
 			 */
182 179
 			class CI_DB extends CI_DB_query_builder { }
183 180
 		}
184
-	}
185
-	elseif ( ! class_exists('CI_DB', FALSE))
181
+	} elseif ( ! class_exists('CI_DB', FALSE))
186 182
 	{
187 183
 		/**
188 184
 	 	 * @ignore
Please login to merge, or discard this patch.
system/database/DB_utility.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,21 +60,21 @@  discard block
 block discarded – undo
60 60
 	 *
61 61
 	 * @var	string
62 62
 	 */
63
-	protected $_list_databases		= FALSE;
63
+	protected $_list_databases = FALSE;
64 64
 
65 65
 	/**
66 66
 	 * OPTIMIZE TABLE statement
67 67
 	 *
68 68
 	 * @var	string
69 69
 	 */
70
-	protected $_optimize_table	= FALSE;
70
+	protected $_optimize_table = FALSE;
71 71
 
72 72
 	/**
73 73
 	 * REPAIR TABLE statement
74 74
 	 *
75 75
 	 * @var	string
76 76
 	 */
77
-	protected $_repair_table	= FALSE;
77
+	protected $_repair_table = FALSE;
78 78
 
79 79
 	// --------------------------------------------------------------------
80 80
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function __construct(&$db)
88 88
 	{
89
-		$this->db =& $db;
89
+		$this->db = & $db;
90 90
 		log_message('info', 'Database Utility Class Initialized');
91 91
 	}
92 92
 
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 			}
405 405
 
406 406
 			// Load the Zip class and output it
407
-			$CI =& get_instance();
407
+			$CI = & get_instance();
408 408
 			$CI->load->library('zip');
409 409
 			$CI->zip->add_data($prefs['filename'], $this->_backup($prefs));
410 410
 			return $CI->zip->get_zip();
Please login to merge, or discard this patch.
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@  discard block
 block discarded – undo
103 103
 		if (isset($this->db->data_cache['db_names']))
104 104
 		{
105 105
 			return $this->db->data_cache['db_names'];
106
-		}
107
-		elseif ($this->_list_databases === FALSE)
106
+		} elseif ($this->_list_databases === FALSE)
108 107
 		{
109 108
 			return ($this->db->db_debug) ? $this->db->display_error('db_unsupported_feature') : FALSE;
110 109
 		}
@@ -387,8 +386,7 @@  discard block
 block discarded – undo
387 386
 			{
388 387
 				$prefs['filename'] = (count($prefs['tables']) === 1 ? $prefs['tables'] : $this->db->database)
389 388
 							.date('Y-m-d_H-i', time()).'.sql';
390
-			}
391
-			else
389
+			} else
392 390
 			{
393 391
 				// If they included the .zip file extension we'll remove it
394 392
 				if (preg_match('|.+?\.zip$|', $prefs['filename']))
@@ -408,15 +406,17 @@  discard block
 block discarded – undo
408 406
 			$CI->load->library('zip');
409 407
 			$CI->zip->add_data($prefs['filename'], $this->_backup($prefs));
410 408
 			return $CI->zip->get_zip();
411
-		}
412
-		elseif ($prefs['format'] === 'txt') // Was a text file requested?
409
+		} elseif ($prefs['format'] === 'txt') {
410
+			// Was a text file requested?
413 411
 		{
414 412
 			return $this->_backup($prefs);
415 413
 		}
416
-		elseif ($prefs['format'] === 'gzip') // Was a Gzip file requested?
414
+		} elseif ($prefs['format'] === 'gzip') {
415
+			// Was a Gzip file requested?
417 416
 		{
418 417
 			return gzencode($this->_backup($prefs));
419 418
 		}
419
+		}
420 420
 
421 421
 		return;
422 422
 	}
Please login to merge, or discard this patch.
system/database/drivers/cubrid/cubrid_driver.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -100,8 +100,7 @@  discard block
 block discarded – undo
100 100
 			{
101 101
 				$this->auto_commit = FALSE;
102 102
 			}
103
-		}
104
-		else
103
+		} else
105 104
 		{
106 105
 			// If no port is defined by the user, use the default value
107 106
 			empty($this->port) OR $this->port = 33000;
@@ -194,8 +193,7 @@  discard block
 block discarded – undo
194 193
 		if (($autocommit = cubrid_get_autocommit($this->conn_id)) === NULL)
195 194
 		{
196 195
 			return FALSE;
197
-		}
198
-		elseif ($autocommit === TRUE)
196
+		} elseif ($autocommit === TRUE)
199 197
 		{
200 198
 			return cubrid_set_autocommit($this->conn_id, CUBRID_AUTOCOMMIT_FALSE);
201 199
 		}
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -153,16 +153,16 @@
 block discarded – undo
153 153
 		$retval = array();
154 154
 		for ($i = 0, $c = count($query); $i < $c; $i++)
155 155
 		{
156
-			$retval[$i]			= new stdClass();
157
-			$retval[$i]->name		= $query[$i]->Field;
156
+			$retval[$i] = new stdClass();
157
+			$retval[$i]->name = $query[$i]->Field;
158 158
 
159 159
 			sscanf($query[$i]->Type, '%[a-z](%d)',
160 160
 				$retval[$i]->type,
161 161
 				$retval[$i]->max_length
162 162
 			);
163 163
 
164
-			$retval[$i]->default		= $query[$i]->Default;
165
-			$retval[$i]->primary_key	= (int) ($query[$i]->Key === 'PRI');
164
+			$retval[$i]->default = $query[$i]->Default;
165
+			$retval[$i]->primary_key = (int) ($query[$i]->Key === 'PRI');
166 166
 		}
167 167
 
168 168
 		return $retval;
Please login to merge, or discard this patch.