Completed
Pull Request — master (#364)
by Kenji
02:22
created
tests/_ci_phpunit_test/patcher/4.x/Patcher/MethodPatcher/PatchManager.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,12 +56,10 @@  discard block
 block discarded – undo
56 56
 			if (isset($info['class_method']))
57 57
 			{
58 58
 				$called_method = $info['class_method'];
59
-			}
60
-			elseif (isset($info['function']))
59
+			} elseif (isset($info['function']))
61 60
 			{
62 61
 				$called_method = $info['function'];
63
-			}
64
-			else
62
+			} else
65 63
 			{
66 64
 				$called_method = 'n/a';
67 65
 			}
@@ -88,8 +86,7 @@  discard block
 block discarded – undo
88 86
 		)
89 87
 		{
90 88
 			$patch = self::$patches[$class][$method];
91
-		}
92
-		else
89
+		} else
93 90
 		{
94 91
 			return __GO_TO_ORIG__;
95 92
 		}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/4.x/Patcher/MethodPatcher.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
 				{
67 67
 					if(self::isVoidFunction($tokens, $key)){
68 68
 						$new_source .= '{ ' . self::CODENORET;
69
-					}
70
-					else{
69
+					} else{
71 70
 						$new_source .= '{ ' . self::CODE;
72 71
 					}
73 72
 					$start_method = false;
@@ -78,13 +77,11 @@  discard block
 block discarded – undo
78 77
 					{
79 78
 						$replacement = false;
80 79
 					}
81
-				}
82
-				else
80
+				} else
83 81
 				{
84 82
 					$new_source .= $token;
85 83
 				}
86
-			}
87
-			else
84
+			} else
88 85
 			{
89 86
 				$new_source .= $token[1];
90 87
 			}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/4.x/Patcher/ExitPatcher.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,20 +27,17 @@
 block discarded – undo
27 27
 			if (is_string($token))
28 28
 			{
29 29
 				$new_source .= $token;
30
-			}
31
-			elseif ($token[0] === T_EXIT)
30
+			} elseif ($token[0] === T_EXIT)
32 31
 			{
33 32
 				if ($tokens[$i+1] === ';')
34 33
 				{
35 34
 					$new_source .= 'exit__()';
36
-				}
37
-				else
35
+				} else
38 36
 				{
39 37
 					$new_source .= 'exit__';
40 38
 				}
41 39
 				$patched = true;
42
-			}
43
-			else
40
+			} else
44 41
 			{
45 42
 				$new_source .= $token[1];
46 43
 			}
Please login to merge, or discard this patch.
application/tests/Bootstrap.php 1 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.
application/tests/_ci_phpunit_test/patcher/3.x/Patcher/ConstantPatcher.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
 			if (is_string($token))
73 73
 			{
74 74
 				$new_source .= $token;
75
-			}
76
-			elseif (isset($replacement['key']) && $i == $replacement['key'])
75
+			} elseif (isset($replacement['key']) && $i == $replacement['key'])
77 76
 			{
78 77
 				$new_source .= $replacement['value'];
79 78
 				$replacement['key'] = key(self::$replacement);
@@ -83,8 +82,7 @@  discard block
 block discarded – undo
83 82
 				{
84 83
 					$replacement = false;
85 84
 				}
86
-			}
87
-			else
85
+			} else
88 86
 			{
89 87
 				$new_source .= $token[1];
90 88
 			}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/2.x/Patcher/ConstantPatcher.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
 			if (is_string($token))
73 73
 			{
74 74
 				$new_source .= $token;
75
-			}
76
-			elseif (isset($replacement['key']) && $i == $replacement['key'])
75
+			} elseif (isset($replacement['key']) && $i == $replacement['key'])
77 76
 			{
78 77
 				$new_source .= $replacement['value'];
79 78
 				$replacement['key'] = key(self::$replacement);
@@ -83,8 +82,7 @@  discard block
 block discarded – undo
83 82
 				{
84 83
 					$replacement = false;
85 84
 				}
86
-			}
87
-			else
85
+			} else
88 86
 			{
89 87
 				$new_source .= $token[1];
90 88
 			}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/2.x/Patcher/FunctionPatcher.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
 			if (is_string($token))
73 73
 			{
74 74
 				$new_source .= $token;
75
-			}
76
-			elseif (isset($replacement['key']) && $i == $replacement['key'])
75
+			} elseif (isset($replacement['key']) && $i == $replacement['key'])
77 76
 			{
78 77
 				$new_source .= $replacement['value'];
79 78
 				$replacement['key'] = key(self::$replacement);
@@ -83,8 +82,7 @@  discard block
 block discarded – undo
83 82
 				{
84 83
 					$replacement = false;
85 84
 				}
86
-			}
87
-			else
85
+			} else
88 86
 			{
89 87
 				$new_source .= $token[1];
90 88
 			}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/3.x/Patcher/FunctionPatcher.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
 			if (is_string($token))
73 73
 			{
74 74
 				$new_source .= $token;
75
-			}
76
-			elseif (isset($replacement['key']) && $i == $replacement['key'])
75
+			} elseif (isset($replacement['key']) && $i == $replacement['key'])
77 76
 			{
78 77
 				$new_source .= $replacement['value'];
79 78
 				$replacement['key'] = key(self::$replacement);
@@ -83,8 +82,7 @@  discard block
 block discarded – undo
83 82
 				{
84 83
 					$replacement = false;
85 84
 				}
86
-			}
87
-			else
85
+			} else
88 86
 			{
89 87
 				$new_source .= $token[1];
90 88
 			}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestDouble.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@
 block discarded – undo
46 46
 		if ($constructor_params === false)
47 47
 		{
48 48
 			$mockBuilder->disableOriginalConstructor();
49
-		}
50
-		elseif (is_array($constructor_params))
49
+		} elseif (is_array($constructor_params))
51 50
 		{
52 51
 			$mockBuilder->setConstructorArgs($constructor_params);
53 52
 		}
Please login to merge, or discard this patch.