Completed
Push — master ( df5ede...57eaac )
by Kenji
67:40
created
application/tests/controllers/Welcome_test.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	public function test_APPPATH()
26 26
 	{
27 27
 		$actual = realpath(APPPATH);
28
-		$expected = realpath(__DIR__ . '/../..');
28
+		$expected = realpath(__DIR__.'/../..');
29 29
 		$this->assertEquals(
30 30
 			$expected,
31 31
 			$actual,
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of CI PHPUnit Test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of CI PHPUnit Test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
application/tests/mocks/autoloader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 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
 		{
Please login to merge, or discard this patch.
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
 	if (strpos($class, 'Mock_') === 0)
64 64
 	{
65 65
 		$class = strtolower(str_replace(array('Mock_', '_'), array('', DIRECTORY_SEPARATOR), $class));
66
-	}
67
-	elseif (strpos($class, 'CI_') === 0)
66
+	} elseif (strpos($class, 'CI_') === 0)
68 67
 	{
69 68
 		$subclass = substr($class, 3);
70 69
 
@@ -72,39 +71,32 @@  discard block
 block discarded – undo
72 71
 		{
73 72
 			$dir = SYSTEM_PATH.'core'.DIRECTORY_SEPARATOR;
74 73
 			$class = $subclass;
75
-		}
76
-		elseif (in_array($subclass, $ci_libraries))
74
+		} elseif (in_array($subclass, $ci_libraries))
77 75
 		{
78 76
 			$dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR;
79 77
 			$class = ($subclass === 'Driver_Library') ? 'Driver' : $subclass;
80
-		}
81
-		elseif (in_array($subclass, $ci_drivers))
78
+		} elseif (in_array($subclass, $ci_drivers))
82 79
 		{
83 80
 			$dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR.$subclass.DIRECTORY_SEPARATOR;
84 81
 			$class = $subclass;
85
-		}
86
-		elseif (in_array(($parent = strtok($subclass, '_')), $ci_drivers)) {
82
+		} elseif (in_array(($parent = strtok($subclass, '_')), $ci_drivers)) {
87 83
 			$dir = SYSTEM_PATH.'libraries'.DIRECTORY_SEPARATOR.$parent.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
88 84
 			$class = $subclass;
89
-		}
90
-		elseif (preg_match('/^CI_DB_(.+)_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 4)
85
+		} elseif (preg_match('/^CI_DB_(.+)_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 4)
91 86
 		{
92 87
 			$driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
93 88
 			$dir = $driver_path.$m[1].DIRECTORY_SEPARATOR.'subdrivers'.DIRECTORY_SEPARATOR;
94 89
 			$file = $dir.$m[1].'_'.$m[2].'_'.$m[3].'.php';
95
-		}
96
-		elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3)
90
+		} elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3)
97 91
 		{
98 92
 			$driver_path = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
99 93
 			$dir = $driver_path.$m[1].DIRECTORY_SEPARATOR;
100 94
 			$file = $dir.$m[1].'_'.$m[2].'.php';
101
-		}
102
-		elseif (strpos($class, 'CI_DB') === 0)
95
+		} elseif (strpos($class, 'CI_DB') === 0)
103 96
 		{
104 97
 			$dir = SYSTEM_PATH.'database'.DIRECTORY_SEPARATOR;
105 98
 			$file = $dir.str_replace(array('CI_DB','active_record'), array('DB', 'active_rec'), $subclass).'.php';
106
-		}
107
-		else
99
+		} else
108 100
 		{
109 101
 			$class = strtolower($class);
110 102
 		}
Please login to merge, or discard this patch.
install.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of CI PHPUnit Test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of CI PHPUnit Test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  * @link       https://github.com/kenjis/ci-phpunit-test
9 9
  */
10 10
 
11
-require __DIR__ . '/Installer.php';
11
+require __DIR__.'/Installer.php';
12 12
 
13 13
 $installer = new Installer();
14 14
 $installer->update();
Please login to merge, or discard this patch.
update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  * @link       https://github.com/kenjis/ci-phpunit-test
9 9
  */
10 10
 
11
-require __DIR__ . '/Installer.php';
11
+require __DIR__.'/Installer.php';
12 12
 
13 13
 $installer = new Installer();
14 14
 $installer->update();
Please login to merge, or discard this patch.
application/database/seeds/CategorySeeder.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of CI PHPUnit Test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of CI PHPUnit Test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestCase.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of CI PHPUnit Test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of CI PHPUnit Test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 			return $this->$name;
42 42
 		}
43 43
 
44
-		throw new LogicException('No such property: ' . $name);
44
+		throw new LogicException('No such property: '.$name);
45 45
 	}
46 46
 
47 47
 	public static function setUpBeforeClass()
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	{
62 62
 		reset_instance();
63 63
 		new CI_Controller();
64
-		$this->CI =& get_instance();
64
+		$this->CI = & get_instance();
65 65
 	}
66 66
 
67 67
 	protected function tearDown()
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 		$this->assertSame(
237 237
 			$code,
238 238
 			$actual,
239
-			'Status code is not ' . $code . ' but ' . $actual . '.'
239
+			'Status code is not '.$code.' but '.$actual.'.'
240 240
 		);
241 241
 	}
242 242
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	public function assertResponseHeader($name, $value)
250 250
 	{
251
-		$CI =& get_instance();
251
+		$CI = & get_instance();
252 252
 		$actual = $CI->output->get_header($name);
253 253
 
254 254
 		if ($actual === null)
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 	 */
273 273
 	public function assertResponseCookie($name, $value, $allow_duplicate = false)
274 274
 	{
275
-		$CI =& get_instance();
275
+		$CI = & get_instance();
276 276
 		$cookies = isset($CI->output->_cookies[$name])
277 277
 			? $CI->output->_cookies[$name] : null;
278 278
 
@@ -330,18 +330,18 @@  discard block
 block discarded – undo
330 330
 			$this->fail('redirect() is not called.');
331 331
 		}
332 332
 
333
-		if (! function_exists('site_url'))
333
+		if ( ! function_exists('site_url'))
334 334
 		{
335
-			$CI =& get_instance();
335
+			$CI = & get_instance();
336 336
 			$CI->load->helper('url');
337 337
 		}
338 338
 		$absolute_url = site_url($uri);
339
-		$expected = 'Redirect to ' . $absolute_url;
339
+		$expected = 'Redirect to '.$absolute_url;
340 340
 
341 341
 		$this->assertSame(
342 342
 			$expected,
343 343
 			$status['redirect'],
344
-			'URL to redirect is not ' . $expected . ' but ' . $status['redirect'] . '.'
344
+			'URL to redirect is not '.$expected.' but '.$status['redirect'].'.'
345 345
 		);
346 346
 
347 347
 		if ($code !== null)
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 			$this->assertSame(
350 350
 				$code,
351 351
 				$status['code'],
352
-				'Status code is not ' . $code . ' but ' . $status['code'] . '.'
352
+				'Status code is not '.$code.' but '.$status['code'].'.'
353 353
 			);
354 354
 		}
355 355
 	}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestDouble.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of CI PHPUnit Test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of CI PHPUnit Test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		// methods in it. But we can't use them in
45 45
 		// `$this->request->setCallablePreConstructor()`
46 46
 		$mock = $this->testCase->getMockBuilder($classname);
47
-		if (! $enable_constructor)
47
+		if ( ! $enable_constructor)
48 48
 		{
49 49
 			$mock->disableOriginalConstructor();
50 50
 		}
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 				break;
97 97
 			default:
98 98
 				throw new RuntimeException(
99
-					'Sorry, ' . $count . ' params not implemented yet'
99
+					'Sorry, '.$count.' params not implemented yet'
100 100
 				);
101 101
 		}
102 102
 	}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/functions.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@
 block discarded – undo
38 38
 		{
39 39
 			$patched = true;
40 40
 			$new_source = static::generateNewSource($source);
41
-		}
42
-		else
41
+		} else
43 42
 		{
44 43
 			$new_source = $source;
45 44
 		}
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	is_loaded('', TRUE);
30 30
 
31 31
 	// Close db connection
32
-	$CI =& get_instance();
32
+	$CI = & get_instance();
33 33
 	if (isset($CI->db))
34 34
 	{
35 35
 		if (
@@ -49,25 +49,25 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	// Load core classes
52
-	$BM =& load_class('Benchmark', 'core');
52
+	$BM = & load_class('Benchmark', 'core');
53 53
 	CIPHPUnitTestSuperGlobal::set_Global('BM', $BM);
54
-	$EXT =& load_class('Hooks', 'core');
54
+	$EXT = & load_class('Hooks', 'core');
55 55
 	CIPHPUnitTestSuperGlobal::set_Global('EXT', $EXT);
56
-	$CFG =& load_class('Config', 'core');
56
+	$CFG = & load_class('Config', 'core');
57 57
 	CIPHPUnitTestSuperGlobal::set_Global('CFG', $CFG);
58
-	$UNI =& load_class('URI', 'core');
58
+	$UNI = & load_class('URI', 'core');
59 59
 	CIPHPUnitTestSuperGlobal::set_Global('UNI', $UNI);
60 60
 //	$URI =& load_class('Utf8', 'core');
61 61
 //	CIPHPUnitTestSuperGlobal::set_Global('URI', $URI);
62
-	$RTR =& load_class('Router', 'core');
62
+	$RTR = & load_class('Router', 'core');
63 63
 	CIPHPUnitTestSuperGlobal::set_Global('RTR', $RTR);
64
-	$OUT =& load_class('Output', 'core');
64
+	$OUT = & load_class('Output', 'core');
65 65
 	CIPHPUnitTestSuperGlobal::set_Global('OUT', $OUT);
66
-	$SEC =& load_class('Security', 'core');
66
+	$SEC = & load_class('Security', 'core');
67 67
 	CIPHPUnitTestSuperGlobal::set_Global('SEC', $SEC);
68
-	$IN =& load_class('Input', 'core');
68
+	$IN = & load_class('Input', 'core');
69 69
 	CIPHPUnitTestSuperGlobal::set_Global('IN', $IN);
70
-	$LANG =& load_class('Lang', 'core');
70
+	$LANG = & load_class('Lang', 'core');
71 71
 	CIPHPUnitTestSuperGlobal::set_Global('LANG', $LANG);
72 72
 
73 73
 	CIPHPUnitTest::loadLoader();
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of CI PHPUnit Test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of CI PHPUnit Test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/Exception/ExitException.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Part of CI PHPUnit Test
4
- *
5
- * @author     Kenji Suzuki <https://github.com/kenjis>
6
- * @license    MIT License
7
- * @copyright  2015 Kenji Suzuki
8
- * @link       https://github.com/kenjis/ci-phpunit-test
9
- */
3
+	 * Part of CI PHPUnit Test
4
+	 *
5
+	 * @author     Kenji Suzuki <https://github.com/kenjis>
6
+	 * @license    MIT License
7
+	 * @copyright  2015 Kenji Suzuki
8
+	 * @link       https://github.com/kenjis/ci-phpunit-test
9
+	 */
10 10
 
11 11
 require __DIR__ . '/Installer.php';
12 12
 
Please login to merge, or discard this patch.