Completed
Pull Request — master (#364)
by Kenji
02:19
created
application/tests/_ci_phpunit_test/patcher/4.5/Patcher/AbstractPatcher.php 1 patch
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.
tests/_ci_phpunit_test/patcher/4.5/Patcher/MethodPatcher/PatchManager.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,16 +66,16 @@
 block discarded – undo
66 66
 				$called_method = 'n/a';
67 67
 			}
68 68
 			
69
-			$log_args = function () use ($params) {
69
+			$log_args = function() use ($params) {
70 70
 				$output = '';
71 71
 				foreach ($params as $arg) {
72
-					$output .= var_export($arg, true) . ', ';
72
+					$output .= var_export($arg, true).', ';
73 73
 				}
74 74
 				$output = rtrim($output, ', ');
75 75
 				return $output;
76 76
 			};
77 77
 			MonkeyPatchManager::log(
78
-				'invoke_method: ' . $class.'::'.$method . '(' . $log_args() . ') on line ' . $line . ' in ' . $file . ' by ' . $called_method
78
+				'invoke_method: '.$class.'::'.$method.'('.$log_args().') on line '.$line.' in '.$file.' by '.$called_method
79 79
 			);
80 80
 //			var_dump($trace); exit;
81 81
 		}
Please login to merge, or discard this 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.5/Patcher/ExitPatcher.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Kenjis\MonkeyPatch\Patcher;
12 12
 
13
-require __DIR__ . '/../Exception/ExitException.php';
13
+require __DIR__.'/../Exception/ExitException.php';
14 14
 
15 15
 class ExitPatcher
16 16
 {
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 			}
31 31
 			elseif ($token[0] === T_EXIT)
32 32
 			{
33
-				if ($tokens[$i+1] === ';')
33
+				if ($tokens[$i + 1] === ';')
34 34
 				{
35 35
 					$new_source .= 'exit__()';
36 36
 				}
Please login to merge, or discard this 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/_ci_phpunit_test/patcher/bootstrap.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 use Kenjis\MonkeyPatch\PhpParserVersion;
12 12
 
13
-require __DIR__ . '/PhpParserVersion.php';
13
+require __DIR__.'/PhpParserVersion.php';
14 14
 
15 15
 $phpParserVersion = new PhpParserVersion();
16 16
 
@@ -18,41 +18,41 @@  discard block
 block discarded – undo
18 18
 if ($phpParserVersion->isComposerInstalled()) {
19 19
 	if ($phpParserVersion->isGreaterThanOrEqualTo('4.6')) {
20 20
 		// PHP-Parser 4.6 -
21
-		require __DIR__ . '/4.x/MonkeyPatchManager.php';
21
+		require __DIR__.'/4.x/MonkeyPatchManager.php';
22 22
 	}
23 23
 	elseif ($phpParserVersion->isGreaterThanOrEqualTo('4.0')) {
24 24
 		// PHP-Parser 4.0 - 4.5
25
-		require __DIR__ . '/4.5/MonkeyPatchManager.php';
25
+		require __DIR__.'/4.5/MonkeyPatchManager.php';
26 26
 	}
27 27
 	elseif ($phpParserVersion->isGreaterThanOrEqualTo('3.0')) {
28 28
 		// PHP-Parser 3.x
29
-		require __DIR__ . '/3.x/MonkeyPatchManager.php';
29
+		require __DIR__.'/3.x/MonkeyPatchManager.php';
30 30
 	}
31 31
 	else {
32 32
 		// PHP-Parser 2.x
33
-		require __DIR__ . '/2.x/MonkeyPatchManager.php';
33
+		require __DIR__.'/2.x/MonkeyPatchManager.php';
34 34
 	}
35 35
 }
36 36
 // If you don't use Composer
37 37
 else {
38 38
 	if (version_compare(PHP_VERSION, '5.5.0', '>=')) {
39 39
 		// Use PHP-Parser 3.x
40
-		require __DIR__ . '/third_party/PHP-Parser-3.1.5/lib/bootstrap.php';
41
-		require __DIR__ . '/3.x/MonkeyPatchManager.php';
40
+		require __DIR__.'/third_party/PHP-Parser-3.1.5/lib/bootstrap.php';
41
+		require __DIR__.'/3.x/MonkeyPatchManager.php';
42 42
 	} else {
43 43
 		// Use PHP-Parser 2.x
44
-		require __DIR__ . '/third_party/PHP-Parser-2.1.1/lib/bootstrap.php';
45
-		require __DIR__ . '/2.x/MonkeyPatchManager.php';
44
+		require __DIR__.'/third_party/PHP-Parser-2.1.1/lib/bootstrap.php';
45
+		require __DIR__.'/2.x/MonkeyPatchManager.php';
46 46
 	}
47 47
 }
48 48
 
49
-require __DIR__ . '/IncludeStream.php';
50
-require __DIR__ . '/PathChecker.php';
51
-require __DIR__ . '/MonkeyPatch.php';
52
-require __DIR__ . '/Cache.php';
53
-require __DIR__ . '/InvocationVerifier.php';
49
+require __DIR__.'/IncludeStream.php';
50
+require __DIR__.'/PathChecker.php';
51
+require __DIR__.'/MonkeyPatch.php';
52
+require __DIR__.'/Cache.php';
53
+require __DIR__.'/InvocationVerifier.php';
54 54
 
55
-require __DIR__ . '/functions/exit__.php';
55
+require __DIR__.'/functions/exit__.php';
56 56
 
57 57
 const __GO_TO_ORIG__ = '__GO_TO_ORIG__';
58 58
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,16 +19,13 @@
 block discarded – undo
19 19
 	if ($phpParserVersion->isGreaterThanOrEqualTo('4.6')) {
20 20
 		// PHP-Parser 4.6 -
21 21
 		require __DIR__ . '/4.x/MonkeyPatchManager.php';
22
-	}
23
-	elseif ($phpParserVersion->isGreaterThanOrEqualTo('4.0')) {
22
+	} elseif ($phpParserVersion->isGreaterThanOrEqualTo('4.0')) {
24 23
 		// PHP-Parser 4.0 - 4.5
25 24
 		require __DIR__ . '/4.5/MonkeyPatchManager.php';
26
-	}
27
-	elseif ($phpParserVersion->isGreaterThanOrEqualTo('3.0')) {
25
+	} elseif ($phpParserVersion->isGreaterThanOrEqualTo('3.0')) {
28 26
 		// PHP-Parser 3.x
29 27
 		require __DIR__ . '/3.x/MonkeyPatchManager.php';
30
-	}
31
-	else {
28
+	} else {
32 29
 		// PHP-Parser 2.x
33 30
 		require __DIR__ . '/2.x/MonkeyPatchManager.php';
34 31
 	}
Please login to merge, or discard this patch.