Completed
Push — master ( ce859b...64aab5 )
by Kenji
02:48
created
application/tests/_ci_phpunit_test/CIPHPUnitTestRequest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -250,6 +250,9 @@
 block discarded – undo
250 250
 		return $this->createAndCallController($class, $method, $params);
251 251
 	}
252 252
 
253
+	/**
254
+	 * @param string $hook
255
+	 */
253 256
 	protected function callHook($hook)
254 257
 	{
255 258
 		if ($this->enableHooks)
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -129,8 +129,7 @@  discard block
 block discarded – undo
129 129
 				return $this->callControllerMethod(
130 130
 					$http_method, $argv, $params
131 131
 				);
132
-			}
133
-			else
132
+			} else
134 133
 			{
135 134
 				return $this->requestUri($http_method, $argv, $params);
136 135
 			}
@@ -141,8 +140,7 @@  discard block
 block discarded – undo
141 140
 			if ($e->getCode() === 0)
142 141
 			{
143 142
 				set_status_header(200);
144
-			}
145
-			else
143
+			} else
146 144
 			{
147 145
 				set_status_header($e->getCode());
148 146
 			}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/Cache.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -63,6 +63,9 @@  discard block
 block discarded – undo
63 63
 		return self::$cache_dir;
64 64
 	}
65 65
 
66
+	/**
67
+	 * @param string $path
68
+	 */
66 69
 	public static function getSrcCacheFilePath($path)
67 70
 	{
68 71
 		$len = strlen(self::$project_root);
@@ -158,6 +161,9 @@  discard block
 block discarded – undo
158 161
 		);
159 162
 	}
160 163
 
164
+	/**
165
+	 * @param string $filename
166
+	 */
161 167
 	protected static function writeTmpConfFile($filename, array $list)
162 168
 	{
163 169
 		$contents = implode("\n", $list);
@@ -194,6 +200,9 @@  discard block
 block discarded – undo
194 200
 		);
195 201
 	}
196 202
 
203
+	/**
204
+	 * @param string $filename
205
+	 */
197 206
 	protected static function getTmpConfFile($filename)
198 207
 	{
199 208
 		if (is_readable(self::$$filename))
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/MonkeyPatch.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 * 
22 22
 	 * @param string $function     function name
23 23
 	 * @param mixed  $return_value return value
24
-	 * @param string $class_name   class::method to apply this patch
24
+	 * @param string $class_method   class::method to apply this patch
25 25
 	 */
26 26
 	public static function patchFunction($function, $return_value, $class_method = null)
27 27
 	{
@@ -55,6 +55,9 @@  discard block
 block discarded – undo
55 55
 		PatchManager::clear();
56 56
 	}
57 57
 
58
+	/**
59
+	 * @param string $class_method
60
+	 */
58 61
 	protected static function getClassname($class_method)
59 62
 	{
60 63
 		if (strpos($class_method, '::') === false)
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
 		if (strpos($class_method, '::') === false)
61 61
 		{
62 62
 			return 'Kenjis\MonkeyPatch\Patcher\FunctionPatcher\Proxy';
63
-		}
64
-		else
63
+		} else
65 64
 		{
66 65
 			return 'Kenjis\MonkeyPatch\Patcher\MethodPatcher\PatchManager';
67 66
 		}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/Common.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -136,6 +136,11 @@  discard block
 block discarded – undo
136 136
 	return $_is_loaded;
137 137
 }
138 138
 
139
+/**
140
+ * @param boolean $return
141
+ *
142
+ * @return boolean
143
+ */
139 144
 function is_cli($return = null)
140 145
 {
141 146
 	static $_return = TRUE;
@@ -148,6 +153,9 @@  discard block
 block discarded – undo
148 153
 	return $_return;
149 154
 }
150 155
 
156
+/**
157
+ * @param string $message
158
+ */
151 159
 function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered')
152 160
 {
153 161
 	$status_code = abs($status_code);
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -160,8 +160,7 @@  discard block
 block discarded – undo
160 160
 		$exit_status = $status_code + 9; // 9 is EXIT__AUTO_MIN
161 161
 
162 162
 		$status_code = 500;
163
-	}
164
-	else
163
+	} else
165 164
 	{
166 165
 		$exit_status = 1; // EXIT_ERROR
167 166
 	}
@@ -256,8 +255,7 @@  discard block
 block discarded – undo
256 255
 		if (isset($stati[$code]))
257 256
 		{
258 257
 			$text = $stati[$code];
259
-		}
260
-		else
258
+		} else
261 259
 		{
262 260
 			show_error('No status text available. Please check your status code number or supply your own message text.', 500);
263 261
 		}
@@ -327,8 +325,7 @@  discard block
 block discarded – undo
327 325
 		if (file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config.php'))
328 326
 		{
329 327
 			require($file_path);
330
-		}
331
-		elseif ( ! $found)
328
+		} elseif ( ! $found)
332 329
 		{
333 330
 			set_status_header(503);
334 331
 			echo 'The configuration file does not exist.';
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestFileCache.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@
 block discarded – undo
67 67
 		if ($this->offsetExists($key))
68 68
 		{
69 69
 			return $this->map[$key];
70
-		}
71
-		else
70
+		} else
72 71
 		{
73 72
 			return null;
74 73
 		}
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/CIPHPUnitTestRouter.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,16 +29,14 @@
 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';
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/functions.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
39 39
 		{
40 40
 			$CI->db->close();
41 41
 			$CI->db = null;
42
-		}
43
-		else
42
+		} else
44 43
 		{
45 44
 			// Don't close if SQLite in-memory database
46 45
 			// If we close it, all tables and stored data will be gone
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/InvocationVerifier.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,12 +31,10 @@  discard block
 block discarded – undo
31 31
 				if ($invoked === false)
32 32
 				{
33 33
 					$actual_times = 0;
34
-				}
35
-				elseif ($expected_params === null)
34
+				} elseif ($expected_params === null)
36 35
 				{
37 36
 					$actual_times = count($invocations[$class_method]);
38
-				}
39
-				else
37
+				} else
40 38
 				{
41 39
 					$count = 0;
42 40
 					foreach ($invocations[$class_method] as $actual_params)
@@ -56,16 +54,14 @@  discard block
 block discarded – undo
56 54
 						$actual_times,
57 55
 						$class_method . '() expected to be not invoked, but invoked ' . $actual_times . ' times.'
58 56
 					);
59
-				}
60
-				elseif ($expected_times === '+')
57
+				} elseif ($expected_times === '+')
61 58
 				{
62 59
 					PHPUnit_Framework_TestCase::assertGreaterThanOrEqual(
63 60
 						1,
64 61
 						$actual_times,
65 62
 						$class_method . '() expected to be invoked at least one time, but invoked ' . $actual_times . ' times.'
66 63
 					);
67
-				}
68
-				else
64
+				} else
69 65
 				{
70 66
 					PHPUnit_Framework_TestCase::assertEquals(
71 67
 						$expected_times,
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/functions/exit__.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
 	if ($class === null)
20 20
 	{
21 21
 		$message = 'exit() called in ' . $method . '() function';
22
-	}
23
-	else
22
+	} else
24 23
 	{
25 24
 		$message = 'exit() called in ' . $class . '::' . $method . '()';
26 25
 	}
Please login to merge, or discard this patch.