Completed
Push — master ( c9c952...88a49a )
by Kenji
02:42 queued 11s
created
application/tests/Bootstrap.php 2 patches
Spacing   +5 added lines, -5 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 `if` statemant is needed for @runInSeparateProcess
57
-if (! defined('ENVIRONMENT'))
57
+if ( ! defined('ENVIRONMENT'))
58 58
 {
59 59
 	define('ENVIRONMENT', 'testing');
60 60
 }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
233 233
 
234 234
 	// Path to the test directory containing all the test files.
235
-	define('TESTPATH', __dir__.DIRECTORY_SEPARATOR);  // Should be the folder this `Bootstrap.php` file is in.
235
+	define('TESTPATH', __dir__.DIRECTORY_SEPARATOR); // Should be the folder this `Bootstrap.php` file is in.
236 236
 
237 237
 	// Path to the system directory
238 238
 	define('BASEPATH', $system_path);
@@ -314,9 +314,9 @@  discard block
 block discarded – undo
314 314
 	define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR);
315 315
 
316 316
 	// Path to the ci-phpunit-test directory
317
-	if (is_file(TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR . 'CIPHPUnitTest.php'))
317
+	if (is_file(TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR.'CIPHPUnitTest.php'))
318 318
 	{
319
-		define('CI_PHPUNIT_TESTPATH', TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR);
319
+		define('CI_PHPUNIT_TESTPATH', TESTPATH.'_ci_phpunit_test'.DIRECTORY_SEPARATOR);
320 320
 	}
321 321
 	else
322 322
 	{
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 define('TESTPATH', APPPATH.'tests'.DIRECTORY_SEPARATOR);
383 383
 */
384 384
 
385
-require CI_PHPUNIT_TESTPATH . '/CIPHPUnitTest.php';
385
+require CI_PHPUNIT_TESTPATH.'/CIPHPUnitTest.php';
386 386
 
387 387
 CIPHPUnitTest::init();
388 388
 // Or you can set directories for autoloading
Please login to merge, or discard this patch.
Braces   +10 added lines, -20 removed lines patch added patch discarded remove patch
@@ -80,8 +80,7 @@  discard block
 block discarded – undo
80 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
-		}
84
-		else
83
+		} else
85 84
 		{
86 85
 			error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE);
87 86
 		}
@@ -204,8 +203,7 @@  discard block
 block discarded – undo
204 203
 	if (($_temp = realpath($system_path)) !== FALSE)
205 204
 	{
206 205
 		$system_path = $_temp.DIRECTORY_SEPARATOR;
207
-	}
208
-	else
206
+	} else
209 207
 	{
210 208
 		// Ensure there's a trailing slash
211 209
 		$system_path = strtr(
@@ -249,8 +247,7 @@  discard block
 block discarded – undo
249 247
 		if (($_temp = realpath($application_folder)) !== FALSE)
250 248
 		{
251 249
 			$application_folder = $_temp;
252
-		}
253
-		else
250
+		} else
254 251
 		{
255 252
 			$application_folder = strtr(
256 253
 				rtrim($application_folder, '/\\'),
@@ -258,16 +255,14 @@  discard block
 block discarded – undo
258 255
 				DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
259 256
 			);
260 257
 		}
261
-	}
262
-	elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
258
+	} elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR))
263 259
 	{
264 260
 		$application_folder = BASEPATH.strtr(
265 261
 			trim($application_folder, '/\\'),
266 262
 			'/\\',
267 263
 			DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
268 264
 		);
269
-	}
270
-	else
265
+	} else
271 266
 	{
272 267
 		header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
273 268
 		echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
@@ -280,14 +275,12 @@  discard block
 block discarded – undo
280 275
 	if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR))
281 276
 	{
282 277
 		$view_folder = APPPATH.'views';
283
-	}
284
-	elseif (is_dir($view_folder))
278
+	} elseif (is_dir($view_folder))
285 279
 	{
286 280
 		if (($_temp = realpath($view_folder)) !== FALSE)
287 281
 		{
288 282
 			$view_folder = $_temp;
289
-		}
290
-		else
283
+		} else
291 284
 		{
292 285
 			$view_folder = strtr(
293 286
 				rtrim($view_folder, '/\\'),
@@ -295,16 +288,14 @@  discard block
 block discarded – undo
295 288
 				DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
296 289
 			);
297 290
 		}
298
-	}
299
-	elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
291
+	} elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR))
300 292
 	{
301 293
 		$view_folder = APPPATH.strtr(
302 294
 			trim($view_folder, '/\\'),
303 295
 			'/\\',
304 296
 			DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
305 297
 		);
306
-	}
307
-	else
298
+	} else
308 299
 	{
309 300
 		header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
310 301
 		echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
@@ -317,8 +308,7 @@  discard block
 block discarded – undo
317 308
 	if (is_file(TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR . 'CIPHPUnitTest.php'))
318 309
 	{
319 310
 		define('CI_PHPUNIT_TESTPATH', TESTPATH . '_ci_phpunit_test' . DIRECTORY_SEPARATOR);
320
-	}
321
-	else
311
+	} else
322 312
 	{
323 313
 		// Assume Composer with a vendor directory parallel to the application directory
324 314
 		define('CI_PHPUNIT_TESTPATH', implode(
Please login to merge, or discard this patch.