Completed
Push — master ( 6612f8...4145fd )
by Angus
04:09
created
public/index.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
  * Different environments will require different levels of error reporting.
64 64
  * By default development will show errors but testing and live will hide them.
65 65
  */
66
-switch (ENVIRONMENT)
66
+switch(ENVIRONMENT)
67 67
 {
68 68
 	case 'development':
69 69
 		error_reporting(-1);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	case 'testing':
80 80
 	case 'production':
81 81
 		ini_set('display_errors', 0);
82
-		if (version_compare(PHP_VERSION, '5.3', '>='))
82
+		if(version_compare(PHP_VERSION, '5.3', '>='))
83 83
 		{
84 84
 			error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
85 85
 		}
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
  */
198 198
 
199 199
 // Set the current directory correctly for CLI requests
200
-if (defined('STDIN'))
200
+if(defined('STDIN'))
201 201
 {
202 202
 	chdir(dirname(__FILE__));
203 203
 }
204 204
 
205
-if (($_temp = realpath($system_path)) !== FALSE)
205
+if(($_temp = realpath($system_path)) !== FALSE)
206 206
 {
207 207
 	$system_path = $_temp.DIRECTORY_SEPARATOR;
208 208
 }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 }
218 218
 
219 219
 // Is the system path correct?
220
-if ( ! is_dir($system_path))
220
+if(!is_dir($system_path))
221 221
 {
222 222
 	header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
223 223
 	echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
 define('SYSDIR', basename(BASEPATH));
243 243
 
244 244
 // The path to the "application" directory
245
-if (is_dir($application_folder))
245
+if(is_dir($application_folder))
246 246
 {
247
-	if (($_temp = realpath($application_folder)) !== FALSE)
247
+	if(($_temp = realpath($application_folder)) !== FALSE)
248 248
 	{
249 249
 		$application_folder = $_temp;
250 250
 	}
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 		);
258 258
 	}
259 259
 }
260
-elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
260
+elseif(is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
261 261
 {
262 262
 	$application_folder = BASEPATH.strtr(
263 263
 			trim($application_folder, '/\\'),
@@ -275,13 +275,13 @@  discard block
 block discarded – undo
275 275
 define('APPPATH', $application_folder.DIRECTORY_SEPARATOR);
276 276
 
277 277
 // The path to the "views" directory
278
-if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
278
+if(!isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
279 279
 {
280 280
 	$view_folder = APPPATH.'views';
281 281
 }
282
-elseif (is_dir($view_folder))
282
+elseif(is_dir($view_folder))
283 283
 {
284
-	if (($_temp = realpath($view_folder)) !== FALSE)
284
+	if(($_temp = realpath($view_folder)) !== FALSE)
285 285
 	{
286 286
 		$view_folder = $_temp;
287 287
 	}
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 		);
295 295
 	}
296 296
 }
297
-elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
297
+elseif(is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
298 298
 {
299 299
 	$view_folder = APPPATH.strtr(
300 300
 			trim($view_folder, '/\\'),
Please login to merge, or discard this patch.
application/tests/controllers/User/Auth/Login_test.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 	public function test_index_logged_in() {
10 10
 		//user is already logged in, redirect to dashboard
11 11
 		$this->request->setCallablePreConstructor(
12
-			function () {
12
+			function() {
13 13
 				$ion_auth = $this->getMock_ion_auth_logged_in();
14 14
 				load_class_instance('ion_auth', $ion_auth);
15 15
 			}
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		$this->markTestIncomplete('This test is broken for now.');
31 31
 
32 32
 		$this->request->setCallable(
33
-			function ($CI) {
33
+			function($CI) {
34 34
 				$validation = $this->getDouble(
35 35
 					'CI_Form_validation',
36 36
 					['set_rules' => NULL, 'run' => TRUE]
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			}
45 45
 		);
46 46
 		$this->request->addCallable(
47
-			function ($CI) {
47
+			function($CI) {
48 48
 				$user = $this->getDouble(
49 49
 					'User_Model',
50 50
 					['find_email_from_identity' => 'foobar']
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			}
57 57
 		);
58 58
 		$this->request->addCallable(
59
-			function ($CI) {
59
+			function($CI) {
60 60
 				$auth = $this->getDouble(
61 61
 					'Ion_auth_model',
62 62
 					['login' => TRUE]
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		$this->markTestIncomplete('This test is broken for now.');
78 78
 
79 79
 		$this->request->setCallable(
80
-			function ($CI) {
80
+			function($CI) {
81 81
 				$validation = $this->getDouble(
82 82
 					'CI_Form_validation',
83 83
 					['set_rules' => NULL, 'run' => TRUE]
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 			}
92 92
 		);
93 93
 		$this->request->addCallable(
94
-			function ($CI) {
94
+			function($CI) {
95 95
 				$user = $this->getDouble(
96 96
 					'User_Model',
97 97
 					['find_email_from_identity' => 'foobar']
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 			}
104 104
 		);
105 105
 		$this->request->addCallable(
106
-			function ($CI) {
106
+			function($CI) {
107 107
 				$auth = $this->getDouble(
108 108
 					'Ion_auth_model',
109 109
 					['login' => TRUE]
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			}
116 116
 		);
117 117
 		$this->request->addCallable(
118
-			function ($CI) {
118
+			function($CI) {
119 119
 				// Get mock object
120 120
 				$session = $this->getDouble(
121 121
 					'CI_Session',
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	public function test_login_validation_fail() {
135 135
 		//user isn't logged in, validation failed, this is happens on the first time loading the page
136 136
 		$this->request->setCallable(
137
-			function ($CI) {
137
+			function($CI) {
138 138
 				// Get mock object
139 139
 				$validation = $this->getDouble(
140 140
 					'CI_Form_validation',
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	public function test_login_validation_pass_but_login_fail() {
157 157
 		//user isn't logged in, tried to login, validation succeeded but login failed
158 158
 		$this->request->setCallable(
159
-			function ($CI) {
159
+			function($CI) {
160 160
 				// Get mock object
161 161
 				$validation = $this->getDouble(
162 162
 					'CI_Form_validation',
Please login to merge, or discard this patch.
application/tests/controllers/User/Auth/Signup_test.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 		$this->assertResponseCode(200);
7 7
 
8 8
 		$this->request->setCallable(
9
-			function ($CI) {
9
+			function($CI) {
10 10
 				$auth = $this->getDouble('Auth_Model', ['verification_check' => 'foobar']);
11 11
 				$this->verifyInvokedOnce($auth, 'verification_check');
12 12
 				$CI->Auth = $auth;
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	public function test_index_logged_in() {
20 20
 		//user is already logged in, redirect to dashboard
21 21
 		$this->request->setCallablePreConstructor(
22
-			function () {
22
+			function() {
23 23
 				$ion_auth = $this->getMock_ion_auth_logged_in();
24 24
 				load_class_instance('ion_auth', $ion_auth);
25 25
 			}
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 	public function test_signup_p1_validation_pass_verification_pass() {
39 39
 		$this->request->setCallable(
40
-			function ($CI) {
40
+			function($CI) {
41 41
 				$validation = $this->getDouble(
42 42
 					'CI_Form_validation',
43 43
 					['set_rules' => NULL, 'run' => TRUE]
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			}
52 52
 		);
53 53
 		$this->request->addCallable(
54
-				function ($CI) {
54
+				function($CI) {
55 55
 					$auth = $this->getDouble('Auth_Model', ['verification_start' => TRUE]);
56 56
 					$this->verifyInvokedOnce($auth, 'verification_start');
57 57
 					$CI->Auth = $auth;
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	}
66 66
 	public function test_signup_p1_validation_pass_verification_fail() {
67 67
 		$this->request->setCallable(
68
-				function ($CI) {
68
+				function($CI) {
69 69
 					$validation = $this->getDouble(
70 70
 							'CI_Form_validation',
71 71
 							['set_rules' => NULL, 'run' => TRUE]
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 				}
80 80
 		);
81 81
 		$this->request->addCallable(
82
-				function ($CI) {
82
+				function($CI) {
83 83
 					$auth = $this->getDouble('Auth_Model', ['verification_start' => FALSE]);
84 84
 					$this->verifyInvokedOnce($auth, 'verification_start');
85 85
 					$CI->Auth = $auth;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	}
94 94
 	public function test_signup_p1_validation_fail() {
95 95
 		$this->request->setCallable(
96
-			function ($CI) {
96
+			function($CI) {
97 97
 				$validation = $this->getDouble(
98 98
 					'CI_Form_validation',
99 99
 					['set_rules' => NULL, 'run' => FALSE, 'set_value' => '']
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
 		//form was valid, and register was successful, user is redirected to dashboard
116 116
 
117 117
 		$this->request->setCallable(
118
-			function ($CI) {
118
+			function($CI) {
119 119
 				$auth = $this->getDouble('Auth_Model', ['verification_check' => '[email protected]']);
120 120
 				$this->verifyInvokedOnce($auth, 'verification_check');
121 121
 				$CI->Auth = $auth;
122 122
 			}
123 123
 		);
124 124
 		$this->request->addCallable(
125
-			function ($CI) {
125
+			function($CI) {
126 126
 				$validation = $this->getDouble(
127 127
 					'CI_Form_validation',
128 128
 					['set_rules' => NULL, 'run' => TRUE]
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 			}
137 137
 		);
138 138
 		$this->request->addCallable(
139
-			function ($CI) {
139
+			function($CI) {
140 140
 				$auth = $this->getDouble(
141 141
 					'Ion_auth_model',
142 142
 					['register' => TRUE]
@@ -154,14 +154,14 @@  discard block
 block discarded – undo
154 154
 	public function test_signup_p2_verification_pass_validation_pass_register_fail() {
155 155
 		//form was valid, and register was unsuccessful, reshow form
156 156
 		$this->request->setCallable(
157
-			function ($CI) {
157
+			function($CI) {
158 158
 				$auth = $this->getDouble('Auth_Model', ['verification_check' => '[email protected]']);
159 159
 				$this->verifyInvokedOnce($auth, 'verification_check');
160 160
 				$CI->Auth = $auth;
161 161
 			}
162 162
 		);
163 163
 		$this->request->addCallable(
164
-			function ($CI) {
164
+			function($CI) {
165 165
 				$validation = $this->getDouble(
166 166
 					'CI_Form_validation',
167 167
 					['set_rules' => NULL, 'run' => TRUE, 'set_value' => 'foobar']
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 			}
177 177
 		);
178 178
 		$this->request->addCallable(
179
-			function ($CI) {
179
+			function($CI) {
180 180
 				$auth = $this->getDouble(
181 181
 					'Ion_auth_model',
182 182
 					['register' => FALSE, 'errors' => FALSE, 'logged_in' => FALSE]
@@ -194,14 +194,14 @@  discard block
 block discarded – undo
194 194
 	public function test_signup_p2_verification_pass_validation_fail() {
195 195
 		//validation failed, this is probably the first time the user visits the page, show form
196 196
 		$this->request->setCallable(
197
-			function ($CI) {
197
+			function($CI) {
198 198
 				$auth = $this->getDouble('Auth_Model', ['verification_check' => '[email protected]']);
199 199
 				$this->verifyInvokedOnce($auth, 'verification_check');
200 200
 				$CI->Auth = $auth;
201 201
 			}
202 202
 		);
203 203
 		$this->request->addCallable(
204
-			function ($CI) {
204
+			function($CI) {
205 205
 				$validation = $this->getDouble(
206 206
 					'CI_Form_validation',
207 207
 					['set_rules' => NULL, 'run' => FALSE, 'set_value' => '']
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	public function test_signup_p2_verification_fail() {
223 223
 		//validation failed, this is probably the first time the user visits the page, show form
224 224
 		$this->request->setCallable(
225
-			function ($CI) {
225
+			function($CI) {
226 226
 				$auth = $this->getDouble('Auth_Model', ['verification_check' => FALSE]);
227 227
 				$this->verifyInvokedOnce($auth, 'verification_check');
228 228
 				$CI->Auth = $auth;
Please login to merge, or discard this patch.
application/tests/controllers/User/Auth/Forgot_Password_test.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 
21 21
 		$this->request->setCallablePreConstructor(
22
-			function () {
22
+			function() {
23 23
 				$ion_auth = $this->getMock_ion_auth_logged_in();
24 24
 				load_class_instance('ion_auth', $ion_auth);
25 25
 			}
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	public function test_forgot_password_validation_pass() {
39 39
 		//user isn't logged in, form is valid, user is shown success page regardless of if email is used
40 40
 		$this->request->setCallable(
41
-			function ($CI) {
41
+			function($CI) {
42 42
 				$validation = $this->getDouble(
43 43
 					'CI_Form_validation',
44 44
 					['set_rules' => NULL, 'run' => TRUE]
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 			}
53 53
 		);
54 54
 		$this->request->addCallable(
55
-			function ($CI) {
55
+			function($CI) {
56 56
 				$auth = $this->getDouble(
57 57
 					'Ion_auth_model',
58 58
 					['forgotten_password' => TRUE, 'row' => (object) ['email' => '[email protected]'], 'logged_in' => FALSE]
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	public function test_forgot_password_validation_fail() {
73 73
 		//user isn't logged in, form is invalid, this is usually the case when first viewing the page
74 74
 		$this->request->setCallable(
75
-			function ($CI) {
75
+			function($CI) {
76 76
 				$validation = $this->getDouble(
77 77
 					'CI_Form_validation',
78 78
 					['set_rules' => NULL, 'run' => FALSE]
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	public function test_reset_password_user_pass_validation_pass_change_fail() {
94 94
 		//reset code is valid, form is invalid (or new)
95 95
 		$this->request->addCallable(
96
-			function ($CI) {
96
+			function($CI) {
97 97
 				$auth = $this->getDouble(
98 98
 					'Ion_auth_model',
99 99
 					['forgotten_password_check' => TRUE, 'reset_password' => FALSE]
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 			}
106 106
 		);
107 107
 		$this->request->addCallable(
108
-			function ($CI) {
108
+			function($CI) {
109 109
 				$validation = $this->getDouble(
110 110
 					'CI_Form_validation',
111 111
 					['set_rules' => NULL, 'run' => TRUE]
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	public function test_reset_password_user_pass_validation_pass_change_pass() {
127 127
 		//reset code is valid, form is valid, password change was successful, redirect to login
128 128
 		$this->request->addCallable(
129
-			function ($CI) {
129
+			function($CI) {
130 130
 				$auth = $this->getDouble(
131 131
 					'Ion_auth_model',
132 132
 					['forgotten_password_check' => TRUE, 'reset_password' => TRUE]
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 			}
139 139
 		);
140 140
 		$this->request->addCallable(
141
-			function ($CI) {
141
+			function($CI) {
142 142
 				$validation = $this->getDouble(
143 143
 					'CI_Form_validation',
144 144
 					['set_rules' => NULL, 'run' => TRUE]
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	public function test_reset_password_user_pass_validation_fail() {
160 160
 		//reset code is valid, form is valid, password change was unsuccessful, send back to reset_password page
161 161
 		$this->request->setCallable(
162
-			function ($CI) {
162
+			function($CI) {
163 163
 				$auth = $this->getDouble(
164 164
 					'Ion_auth_model',
165 165
 					['forgotten_password_check' => TRUE, 'logged_in' => FALSE]
Please login to merge, or discard this patch.
application/tests/controllers/IndexC_test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
 	public function test_APPPATH() {
15 15
 		$actual   = realpath(APPPATH);
16
-		$expected = realpath(__DIR__ . '/../..');
16
+		$expected = realpath(__DIR__.'/../..');
17 17
 		$this->assertEquals(
18 18
 			$expected,
19 19
 			$actual,
Please login to merge, or discard this patch.
application/tests/TestCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 		                  ->disableOriginalConstructor()
52 52
 		                  ->getMock();
53 53
 
54
-		foreach ($methods as $method => $return) {
54
+		foreach($methods as $method => $return) {
55 55
 			$db_result->method($method)->willReturn($return);
56 56
 		}
57 57
 		return $db_result;
Please login to merge, or discard this patch.
application/tests/Bootstrap.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
  * NOTE: If you change these, also change the error_reporting() code below
55 55
  */
56 56
 // This is needed for @runInSeparateProcess
57
-if (! defined('ENVIRONMENT'))
57
+if(!defined('ENVIRONMENT'))
58 58
 {
59 59
 	define('ENVIRONMENT', 'testing');
60 60
 }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
  * Different environments will require different levels of error reporting.
68 68
  * By default development will show errors but testing and live will hide them.
69 69
  */
70
-switch (ENVIRONMENT)
70
+switch(ENVIRONMENT)
71 71
 {
72 72
 	case 'testing':
73 73
 	case 'development':
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 	case 'production':
79 79
 		ini_set('display_errors', 0);
80
-		if (version_compare(PHP_VERSION, '5.3', '>='))
80
+		if(version_compare(PHP_VERSION, '5.3', '>='))
81 81
 		{
82 82
 			error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
83 83
 		}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 		chdir(dirname(__FILE__));
201 201
 //	}
202 202
 
203
-	if (($_temp = realpath($system_path)) !== FALSE)
203
+	if(($_temp = realpath($system_path)) !== FALSE)
204 204
 	{
205 205
 		$system_path = $_temp.'/';
206 206
 	}
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	}
212 212
 
213 213
 	// Is the system path correct?
214
-	if ( ! is_dir($system_path))
214
+	if(!is_dir($system_path))
215 215
 	{
216 216
 		header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
217 217
 		echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME);
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
 	define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/'));
237 237
 
238 238
 	// The path to the "application" folder
239
-	if (is_dir($application_folder))
239
+	if(is_dir($application_folder))
240 240
 	{
241
-		if (($_temp = realpath($application_folder)) !== FALSE)
241
+		if(($_temp = realpath($application_folder)) !== FALSE)
242 242
 		{
243 243
 			$application_folder = $_temp;
244 244
 		}
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	}
248 248
 	else
249 249
 	{
250
-		if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
250
+		if(!is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
251 251
 		{
252 252
 			header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
253 253
 			echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
@@ -258,13 +258,13 @@  discard block
 block discarded – undo
258 258
 	}
259 259
 
260 260
 	// The path to the "views" folder
261
-	if ( ! is_dir($view_folder))
261
+	if(!is_dir($view_folder))
262 262
 	{
263
-		if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
263
+		if(!empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
264 264
 		{
265 265
 			$view_folder = APPPATH.$view_folder;
266 266
 		}
267
-		elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
267
+		elseif(!is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
268 268
 		{
269 269
 			header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
270 270
 			echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 		}
277 277
 	}
278 278
 
279
-	if (($_temp = realpath($view_folder)) !== FALSE)
279
+	if(($_temp = realpath($view_folder)) !== FALSE)
280 280
 	{
281 281
 		$view_folder = $_temp.DIRECTORY_SEPARATOR;
282 282
 	}
@@ -327,5 +327,5 @@  discard block
 block discarded – undo
327 327
  *  Added for CI PHPUnit Test
328 328
  * -------------------------------------------------------------------
329 329
  */
330
-require __DIR__ . '/_ci_phpunit_test/CIPHPUnitTest.php';
330
+require __DIR__.'/_ci_phpunit_test/CIPHPUnitTest.php';
331 331
 CIPHPUnitTest::init();
Please login to merge, or discard this patch.
application/tests/mocks/autoloader.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -60,49 +60,49 @@  discard block
 block discarded – undo
60 60
 
61 61
 	$ci_drivers = array('Session', 'Cache');
62 62
 
63
-	if (strpos($class, 'Mock_') === 0)
63
+	if(strpos($class, 'Mock_') === 0)
64 64
 	{
65 65
 		$class = strtolower(str_replace(array('Mock_', '_'), array('', DIRECTORY_SEPARATOR), $class));
66 66
 	}
67
-	elseif (strpos($class, 'CI_') === 0)
67
+	elseif(strpos($class, 'CI_') === 0)
68 68
 	{
69 69
 		$subclass = substr($class, 3);
70 70
 
71
-		if (in_array($subclass, $ci_core))
71
+		if(in_array($subclass, $ci_core))
72 72
 		{
73 73
 			$dir = SYSTEM_PATH.'core'.DIRECTORY_SEPARATOR;
74 74
 			$class = $subclass;
75 75
 		}
76
-		elseif (in_array($subclass, $ci_libraries))
76
+		elseif(in_array($subclass, $ci_libraries))
77 77
 		{
78 78
 			$dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR;
79 79
 			$class = ($subclass === 'Driver_Library') ? 'Driver' : $subclass;
80 80
 		}
81
-		elseif (in_array($subclass, $ci_drivers))
81
+		elseif(in_array($subclass, $ci_drivers))
82 82
 		{
83 83
 			$dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR.$subclass.DIRECTORY_SEPARATOR;
84 84
 			$class = $subclass;
85 85
 		}
86
-		elseif (in_array(($parent = strtok($subclass, '_')), $ci_drivers)) {
86
+		elseif(in_array(($parent = strtok($subclass, '_')), $ci_drivers)) {
87 87
 			$dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR.$parent.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
88 88
 			$class = $subclass;
89 89
 		}
90
-		elseif (preg_match('/^CI_DB_(.+)_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 4)
90
+		elseif(preg_match('/^CI_DB_(.+)_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 4)
91 91
 		{
92 92
 			$driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
93 93
 			$dir = $driver_path.$m[1].DIRECTORY_SEPARATOR.'subdrivers'.DIRECTORY_SEPARATOR;
94 94
 			$file = $dir.$m[1].'_'.$m[2].'_'.$m[3].'.php';
95 95
 		}
96
-		elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3)
96
+		elseif(preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3)
97 97
 		{
98 98
 			$driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
99 99
 			$dir = $driver_path.$m[1].DIRECTORY_SEPARATOR;
100 100
 			$file = $dir.$m[1].'_'.$m[2].'.php';
101 101
 		}
102
-		elseif (strpos($class, 'CI_DB') === 0)
102
+		elseif(strpos($class, 'CI_DB') === 0)
103 103
 		{
104 104
 			$dir = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR;
105
-			$file = $dir.str_replace(array('CI_DB','active_record'), array('DB', 'active_rec'), $subclass).'.php';
105
+			$file = $dir.str_replace(array('CI_DB', 'active_record'), array('DB', 'active_rec'), $subclass).'.php';
106 106
 		}
107 107
 		else
108 108
 		{
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
 	$file = isset($file) ? $file : $dir.$class.'.php';
114 114
 
115
-	if ( ! file_exists($file))
115
+	if(!file_exists($file))
116 116
 	{
117 117
 		return FALSE;
118 118
 	}
Please login to merge, or discard this patch.
application/controllers/User/Options.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
 		$usedCategories   = $this->Tracker->getUsedCategories($this->User->id);
17 17
 
18 18
 		//NOTE: The checkbox validation is handled in run()
19
-		$this->form_validation->set_rules('category_custom_1_text',      'Custom Category 1 Text',      'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
20
-		$this->form_validation->set_rules('category_custom_2_text',      'Custom Category 2 Text',      'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
21
-		$this->form_validation->set_rules('category_custom_3_text',      'Custom Category 3 Text',      'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
22
-		$this->form_validation->set_rules('default_series_category',     'Default Series Category',     'required|is_valid_option_value[default_series_category]');
19
+		$this->form_validation->set_rules('category_custom_1_text', 'Custom Category 1 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
20
+		$this->form_validation->set_rules('category_custom_2_text', 'Custom Category 2 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
21
+		$this->form_validation->set_rules('category_custom_3_text', 'Custom Category 3 Text', 'trim|regex_match[/^[a-zA-Z0-9-_\\s]{0,16}$/]');
22
+		$this->form_validation->set_rules('default_series_category', 'Default Series Category', 'required|is_valid_option_value[default_series_category]');
23 23
 		$this->form_validation->set_rules('enable_live_countdown_timer', 'Enable Live Countdown Timer', 'required|is_valid_option_value[enable_live_countdown_timer]');
24 24
 
25
-		if ($isValid = $this->form_validation->run() === TRUE) {
25
+		if($isValid = $this->form_validation->run() === TRUE) {
26 26
 			foreach($customCategories as $categoryK => $category) {
27 27
 				if(!in_array($categoryK, $usedCategories)) {
28 28
 					$this->User_Options->set($category, $this->input->post($category) ? 'enabled' : 'disabled');
Please login to merge, or discard this patch.