Completed
Pull Request — master (#364)
by Kenji
02:19
created
application/tests/_ci_phpunit_test/patcher/Cache.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 
13 13
 use LogicException;
14 14
 use RuntimeException;
15
-
16 15
 use RecursiveIteratorIterator;
17 16
 use RecursiveDirectoryIterator;
18 17
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/4.5/MonkeyPatchManager.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -40,6 +40,9 @@  discard block
 block discarded – undo
40 40
 		'ConstantPatcher',
41 41
 	];
42 42
 
43
+	/**
44
+	 * @param string $message
45
+	 */
43 46
 	public static function log($message)
44 47
 	{
45 48
 		if (! self::$debug)
@@ -224,6 +227,9 @@  discard block
 block discarded – undo
224 227
 		}
225 228
 	}
226 229
 
230
+	/**
231
+	 * @param string $patcher
232
+	 */
227 233
 	public static function isEnabled($patcher)
228 234
 	{
229 235
 		return in_array($patcher, self::$patcher_list);
@@ -316,6 +322,9 @@  discard block
 block discarded – undo
316 322
 		self::$load_patchers = true;
317 323
 	}
318 324
 
325
+	/**
326
+	 * @param string $source
327
+	 */
319 328
 	protected static function execPatchers($source)
320 329
 	{
321 330
 		$patched = false;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 namespace Kenjis\MonkeyPatch;
12 12
 
13 13
 use LogicException;
14
-use RuntimeException;
15 14
 use PhpParser\ParserFactory;
16 15
 use Kenjis\MonkeyPatch\Patcher\FunctionPatcher;
17 16
 
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/4.5/Patcher/Backtrace.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
 		'ConstantPatcher' => 0,
21 21
 	];
22 22
 
23
+	/**
24
+	 * @param string $patcher
25
+	 */
23 26
 	public static function getInfo($patcher, $backtrace)
24 27
 	{
25 28
 		if (! isset(self::$map[$patcher]))
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/patcher/4.5/Patcher/ConstantPatcher/Proxy.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -51,6 +51,9 @@  discard block
 block discarded – undo
51 51
 		self::$patches_to_apply = [];
52 52
 	}
53 53
 
54
+	/**
55
+	 * @param string $constant
56
+	 */
54 57
 	protected static function logInvocation($constant)
55 58
 	{
56 59
 		if (MonkeyPatchManager::$debug)
@@ -68,6 +71,9 @@  discard block
 block discarded – undo
68 71
 		}
69 72
 	}
70 73
 
74
+	/**
75
+	 * @param string $constant
76
+	 */
71 77
 	protected static function checkCalledMethod($constant)
72 78
 	{
73 79
 		$trace = debug_backtrace();
Please login to merge, or discard this patch.
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -13,14 +13,9 @@
 block discarded – undo
13 13
 class_alias('Kenjis\MonkeyPatch\Patcher\ConstantPatcher\Proxy', '__ConstProxy__');
14 14
 
15 15
 use LogicException;
16
-use ReflectionConstant;
17
-use ReflectionException;
18
-
19 16
 use Kenjis\MonkeyPatch\Patcher\ConstantPatcher;
20 17
 use Kenjis\MonkeyPatch\Patcher\Backtrace;
21 18
 use Kenjis\MonkeyPatch\MonkeyPatchManager;
22
-use Kenjis\MonkeyPatch\Cache;
23
-use Kenjis\MonkeyPatch\InvocationVerifier;
24 19
 
25 20
 class Proxy
26 21
 {
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/patcher/4.5/Patcher/FunctionPatcher/Proxy.php 2 patches
Doc Comments   +10 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 * 
38 38
 	 * @param string $function     function name
39 39
 	 * @param mixed  $return_value return value or callable
40
-	 * @param string $class_name   class::method to apply this patch
40
+	 * @param string $class_method   class::method to apply this patch
41 41
 	 * 
42 42
 	 * @throws LogicException
43 43
 	 */
@@ -86,6 +86,9 @@  discard block
 block discarded – undo
86 86
 		InvocationVerifier::verify(self::$expected_invocations, self::$invocations);
87 87
 	}
88 88
 
89
+	/**
90
+	 * @param string $function
91
+	 */
89 92
 	protected static function logInvocation($function, $arguments)
90 93
 	{
91 94
 		if (MonkeyPatchManager::$debug)
@@ -111,6 +114,9 @@  discard block
 block discarded – undo
111 114
 		}
112 115
 	}
113 116
 
117
+	/**
118
+	 * @param string $function
119
+	 */
114 120
 	protected static function checkCalledMethod($function)
115 121
 	{
116 122
 		$trace = debug_backtrace();
@@ -184,6 +190,9 @@  discard block
 block discarded – undo
184 190
 		return call_user_func_array($function, $arguments);
185 191
 	}
186 192
 
193
+	/**
194
+	 * @param string $function
195
+	 */
187 196
 	protected static function checkPassedByReference($function)
188 197
 	{
189 198
 		$ref_func = new ReflectionFunction($function);
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 use LogicException;
16 16
 use ReflectionFunction;
17 17
 use ReflectionException;
18
-
19 18
 use Kenjis\MonkeyPatch\Patcher\FunctionPatcher;
20 19
 use Kenjis\MonkeyPatch\Patcher\Backtrace;
21 20
 use Kenjis\MonkeyPatch\MonkeyPatchManager;
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/4.5/Patcher/MethodPatcher.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,6 @@
 block discarded – undo
13 13
 require __DIR__ . '/MethodPatcher/NodeVisitor.php';
14 14
 require __DIR__ . '/MethodPatcher/PatchManager.php';
15 15
 
16
-use LogicException;
17
-
18 16
 use Kenjis\MonkeyPatch\Patcher\MethodPatcher\NodeVisitor;
19 17
 
20 18
 class MethodPatcher extends AbstractPatcher
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/patcher/4.5/Patcher/MethodPatcher/NodeVisitor.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 use PhpParser\Node;
14 14
 use PhpParser\Node\Stmt\ClassMethod;
15 15
 use PhpParser\NodeVisitorAbstract;
16
-
17 16
 use Kenjis\MonkeyPatch\Patcher\MethodPatcher;
18 17
 
19 18
 class NodeVisitor extends NodeVisitorAbstract
Please login to merge, or discard this patch.