Completed
Push — master ( 3a612a...fc2b6e )
by Kenji
06:11
created
application/tests/_ci_phpunit_test/CIPHPUnitTestRequest.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	public function enableHooks()
107 107
 	{
108 108
 		$this->enableHooks = true;
109
-		$this->hooks =& load_class('Hooks', 'core');
109
+		$this->hooks = & load_class('Hooks', 'core');
110 110
 	}
111 111
 
112 112
 	/**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			{
153 153
 				set_status_header($e->getCode());
154 154
 			}
155
-			$CI =& get_instance();
155
+			$CI = & get_instance();
156 156
 			$CI->output->_status['redirect'] = $e->getMessage();
157 157
 		}
158 158
 		// show_404()
@@ -208,14 +208,14 @@  discard block
 block discarded – undo
208 208
 		$this->setRawInputStream($request_params);
209 209
 
210 210
 		// 404 checking
211
-		if (! class_exists($class) || ! method_exists($class, $method))
211
+		if ( ! class_exists($class) || ! method_exists($class, $method))
212 212
 		{
213 213
 			// If 404, CodeIgniter instance is not created yet. So create it here
214 214
 			// Because we need CI->output->_status to store info
215
-			$CI =& get_instance();
215
+			$CI = & get_instance();
216 216
 			if ($CI instanceof CIPHPUnitTestNullCodeIgniter)
217 217
 			{
218
-				if (! CIPHPUnitTest::wiredesignzHmvcInstalled())
218
+				if ( ! CIPHPUnitTest::wiredesignzHmvcInstalled())
219 219
 				{
220 220
 					new CI_Controller();
221 221
 				}
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 				}
227 227
 			}
228 228
 
229
-			show_404($class.'::'.$method . '() is not found');
229
+			show_404($class.'::'.$method.'() is not found');
230 230
 		}
231 231
 
232 232
 		$params = $argv;
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	{
288 288
 		if (is_string($string))
289 289
 		{
290
-			$INPUT =& load_class('Input', 'core');
290
+			$INPUT = & load_class('Input', 'core');
291 291
 			CIPHPUnitTestReflection::setPrivateProperty(
292 292
 				$INPUT,
293 293
 				'_raw_input_stream',
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 			new CI();
318 318
 		}
319 319
 		$controller = new $class;
320
-		$CI =& get_instance();
320
+		$CI = & get_instance();
321 321
 
322 322
 		// Set CodeIgniter instance to TestCase
323 323
 		$this->testCase->setCI($CI);
@@ -363,8 +363,8 @@  discard block
 block discarded – undo
363 363
 	 */
364 364
 	public function getStatus()
365 365
 	{
366
-		$CI =& get_instance();
367
-		if (! isset($CI->output->_status))
366
+		$CI = & get_instance();
367
+		if ( ! isset($CI->output->_status))
368 368
 		{
369 369
 			throw new LogicException('Status code is not set. You must call $this->request() first');
370 370
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -135,8 +135,7 @@  discard block
 block discarded – undo
135 135
 				return $this->callControllerMethod(
136 136
 					$http_method, $argv, $params
137 137
 				);
138
-			}
139
-			else
138
+			} else
140 139
 			{
141 140
 				return $this->requestUri($http_method, $argv, $params);
142 141
 			}
@@ -147,8 +146,7 @@  discard block
 block discarded – undo
147 146
 			if ($e->getCode() === 0)
148 147
 			{
149 148
 				set_status_header(200);
150
-			}
151
-			else
149
+			} else
152 150
 			{
153 151
 				set_status_header($e->getCode());
154 152
 			}
@@ -218,8 +216,7 @@  discard block
 block discarded – undo
218 216
 				if (! CIPHPUnitTest::wiredesignzHmvcInstalled())
219 217
 				{
220 218
 					new CI_Controller();
221
-				}
222
-				else
219
+				} else
223 220
 				{
224 221
 					new CI();
225 222
 					new MX_Controller();
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestRouter.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 	 */
20 20
 	public function getRoute()
21 21
 	{
22
-		$RTR =& load_class('Router', 'core');
23
-		$URI =& load_class('URI', 'core');
22
+		$RTR = & load_class('Router', 'core');
23
+		$URI = & load_class('URI', 'core');
24 24
 
25 25
 		$e404 = FALSE;
26 26
 		$class = ucfirst($RTR->class);
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
 		{
58 58
 			// If 404, CodeIgniter instance is not created yet. So create it here.
59 59
 			// Because we need CI->output->_status
60
-			$CI =& get_instance();
60
+			$CI = & get_instance();
61 61
 			if ($CI instanceof CIPHPUnitTestNullCodeIgniter)
62 62
 			{
63
-				if (! CIPHPUnitTest::wiredesignzHmvcInstalled())
63
+				if ( ! CIPHPUnitTest::wiredesignzHmvcInstalled())
64 64
 				{
65 65
 					new CI_Controller();
66 66
 				}
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,16 +29,14 @@  discard block
 block discarded – undo
29 29
 		if (empty($class) OR ! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php'))
30 30
 		{
31 31
 			$e404 = TRUE;
32
-		}
33
-		else
32
+		} else
34 33
 		{
35 34
 			require_once(APPPATH.'controllers/'.$RTR->directory.$class.'.php');
36 35
 
37 36
 			if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method))
38 37
 			{
39 38
 				$e404 = TRUE;
40
-			}
41
-			elseif (method_exists($class, '_remap'))
39
+			} elseif (method_exists($class, '_remap'))
42 40
 			{
43 41
 				$params = array($method, array_slice($URI->rsegments, 2));
44 42
 				$method = '_remap';
@@ -63,8 +61,7 @@  discard block
 block discarded – undo
63 61
 				if (! CIPHPUnitTest::wiredesignzHmvcInstalled())
64 62
 				{
65 63
 					new CI_Controller();
66
-				}
67
-				else
64
+				} else
68 65
 				{
69 66
 					new CI();
70 67
 					new MX_Controller();
Please login to merge, or discard this patch.