Completed
Push — master ( 1409b8...da3f13 )
by Kenji
14s
created
application/tests/_ci_phpunit_test/CIPHPUnitTestRequest.php 1 patch
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.
application/tests/_ci_phpunit_test/patcher/Cache.php 2 patches
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.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -251,10 +251,10 @@
 block discarded – undo
251 251
 	}
252 252
 
253 253
 	/**
254
-	* Recursive Unlink
255
-	*
256
-	* @param string $dir
257
-	*/
254
+	 * Recursive Unlink
255
+	 *
256
+	 * @param string $dir
257
+	 */
258 258
 	protected static function recursiveUnlink($dir)
259 259
 	{
260 260
 		if (! is_dir($dir))
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.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	/**
40
-     * Patch on constant
41
-     * 
42
-     * @param type $constant
43
-     * @param type $value
44
-     * @param type $class_method
45
-     */
40
+	 * Patch on constant
41
+	 * 
42
+	 * @param type $constant
43
+	 * @param type $value
44
+	 * @param type $class_method
45
+	 */
46 46
 	public static function patchConstant($constant, $value, $class_method = null)
47 47
 	{
48 48
 		ConstProxy::patch($constant, $value, $class_method);
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/replacing/core/Common.php 1 patch
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.
install.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,17 +15,17 @@
 block discarded – undo
15 15
 
16 16
 // php install.php -s
17 17
 if (isset($argv[1]) && $argv[1] === '-s') {
18
-    $silent = true;
18
+	$silent = true;
19 19
 
20
-    // php install.php -s app
21
-    if (isset($argv[2]) && is_dir($argv[2])) {
22
-        $app_dir = $argv[2];
23
-    }
20
+	// php install.php -s app
21
+	if (isset($argv[2]) && is_dir($argv[2])) {
22
+		$app_dir = $argv[2];
23
+	}
24 24
 }
25 25
 
26 26
 // php install.php app
27 27
 if (isset($argv[1]) && is_dir($argv[1])) {
28
-    $app_dir = $argv[1];
28
+	$app_dir = $argv[1];
29 29
 }
30 30
 
31 31
 $installer = new Installer($silent);
Please login to merge, or discard this patch.
update.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,17 +15,17 @@
 block discarded – undo
15 15
 
16 16
 // php update.php -s
17 17
 if (isset($argv[1]) && $argv[1] === '-s') {
18
-    $silent = true;
18
+	$silent = true;
19 19
 
20
-    // php update.php -s app
21
-    if (isset($argv[2]) && is_dir($argv[2])) {
22
-        $app_dir = $argv[2];
23
-    }
20
+	// php update.php -s app
21
+	if (isset($argv[2]) && is_dir($argv[2])) {
22
+		$app_dir = $argv[2];
23
+	}
24 24
 }
25 25
 
26 26
 // php update.php app
27 27
 if (isset($argv[1]) && is_dir($argv[1])) {
28
-    $app_dir = $argv[1];
28
+	$app_dir = $argv[1];
29 29
 }
30 30
 
31 31
 $installer = new Installer($silent);
Please login to merge, or discard this patch.
Installer.php 1 patch
Indentation   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -10,145 +10,145 @@
 block discarded – undo
10 10
 
11 11
 class Installer
12 12
 {
13
-    const TEST_FOLDER = 'tests';
13
+	const TEST_FOLDER = 'tests';
14 14
 
15
-    private $silent = false;
15
+	private $silent = false;
16 16
 
17
-    public function __construct($silent = false)
18
-    {
19
-        $this->silent = $silent;
20
-    }
17
+	public function __construct($silent = false)
18
+	{
19
+		$this->silent = $silent;
20
+	}
21 21
 
22
-    public function install($app = 'application')
23
-    {
24
-        $this->recursiveCopy(
25
-            dirname(__FILE__) . '/application/tests',
26
-            $app . '/' . static::TEST_FOLDER
27
-        );
28
-        $this->fixPath($app);
29
-    }
22
+	public function install($app = 'application')
23
+	{
24
+		$this->recursiveCopy(
25
+			dirname(__FILE__) . '/application/tests',
26
+			$app . '/' . static::TEST_FOLDER
27
+		);
28
+		$this->fixPath($app);
29
+	}
30 30
 
31
-    /**
32
-     * Fix paths in Bootstrap.php
33
-     */
34
-    private function fixPath($app = 'application')
35
-    {
36
-        $file = $app . '/' . static::TEST_FOLDER . '/Bootstrap.php';
37
-        $contents = file_get_contents($file);
31
+	/**
32
+	 * Fix paths in Bootstrap.php
33
+	 */
34
+	private function fixPath($app = 'application')
35
+	{
36
+		$file = $app . '/' . static::TEST_FOLDER . '/Bootstrap.php';
37
+		$contents = file_get_contents($file);
38 38
         
39
-        if (! file_exists('system')) {
40
-            if (file_exists('vendor/codeigniter/framework/system')) {
41
-                $contents = str_replace(
42
-                    '$system_path = \'../../system\';',
43
-                    '$system_path = \'../../vendor/codeigniter/framework/system\';',
44
-                    $contents
45
-                );
46
-            } else {
47
-                throw new Exception('Can\'t find "system" folder.');
48
-            }
49
-        }
39
+		if (! file_exists('system')) {
40
+			if (file_exists('vendor/codeigniter/framework/system')) {
41
+				$contents = str_replace(
42
+					'$system_path = \'../../system\';',
43
+					'$system_path = \'../../vendor/codeigniter/framework/system\';',
44
+					$contents
45
+				);
46
+			} else {
47
+				throw new Exception('Can\'t find "system" folder.');
48
+			}
49
+		}
50 50
         
51
-        if (! file_exists('index.php')) {
52
-            if (file_exists('public/index.php')) {
53
-                // CodeIgniter 3.0.6 and after
54
-                $contents = str_replace(
55
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
56
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../../public').DIRECTORY_SEPARATOR);",
57
-                    $contents
58
-                );
59
-                // CodeIgniter 3.0.5 and before
60
-                $contents = str_replace(
61
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
62
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');",
63
-                    $contents
64
-                );
65
-            } elseif (file_exists($app . '/public/index.php')) {
66
-                // CodeIgniter 3.0.6 and after
67
-                $contents = str_replace(
68
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
69
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../public').DIRECTORY_SEPARATOR);",
70
-                    $contents
71
-                );
72
-                // CodeIgniter 3.0.5 and before
73
-                $contents = str_replace(
74
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
75
-                    "define('FCPATH', realpath(dirname(__FILE__).'/../public').'/');",
76
-                    $contents
77
-                );
78
-                if ($app != 'application') {
79
-                    $contents = str_replace(
80
-                        "\$application_folder = '../../application';",
81
-                        "\$application_folder = '../../{$app}';",
82
-                        $contents
83
-                    );
84
-                }
85
-            } else {
86
-                throw new Exception('Can\'t find "index.php".');
87
-            }
88
-        }
51
+		if (! file_exists('index.php')) {
52
+			if (file_exists('public/index.php')) {
53
+				// CodeIgniter 3.0.6 and after
54
+				$contents = str_replace(
55
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
56
+					"define('FCPATH', realpath(dirname(__FILE__).'/../../public').DIRECTORY_SEPARATOR);",
57
+					$contents
58
+				);
59
+				// CodeIgniter 3.0.5 and before
60
+				$contents = str_replace(
61
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
62
+					"define('FCPATH', realpath(dirname(__FILE__).'/../../public').'/');",
63
+					$contents
64
+				);
65
+			} elseif (file_exists($app . '/public/index.php')) {
66
+				// CodeIgniter 3.0.6 and after
67
+				$contents = str_replace(
68
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').DIRECTORY_SEPARATOR);",
69
+					"define('FCPATH', realpath(dirname(__FILE__).'/../public').DIRECTORY_SEPARATOR);",
70
+					$contents
71
+				);
72
+				// CodeIgniter 3.0.5 and before
73
+				$contents = str_replace(
74
+					"define('FCPATH', realpath(dirname(__FILE__).'/../..').'/');",
75
+					"define('FCPATH', realpath(dirname(__FILE__).'/../public').'/');",
76
+					$contents
77
+				);
78
+				if ($app != 'application') {
79
+					$contents = str_replace(
80
+						"\$application_folder = '../../application';",
81
+						"\$application_folder = '../../{$app}';",
82
+						$contents
83
+					);
84
+				}
85
+			} else {
86
+				throw new Exception('Can\'t find "index.php".');
87
+			}
88
+		}
89 89
         
90
-        file_put_contents($file, $contents);
91
-    }
90
+		file_put_contents($file, $contents);
91
+	}
92 92
 
93
-    public function update($app = 'application')
94
-    {
95
-        $target_dir = $app . '/' . static::TEST_FOLDER . '/_ci_phpunit_test';
96
-        $this->recursiveUnlink($target_dir);
97
-        $this->recursiveCopy(
98
-            dirname(__FILE__) . '/application/tests/_ci_phpunit_test',
99
-            $target_dir
100
-        );
101
-    }
93
+	public function update($app = 'application')
94
+	{
95
+		$target_dir = $app . '/' . static::TEST_FOLDER . '/_ci_phpunit_test';
96
+		$this->recursiveUnlink($target_dir);
97
+		$this->recursiveCopy(
98
+			dirname(__FILE__) . '/application/tests/_ci_phpunit_test',
99
+			$target_dir
100
+		);
101
+	}
102 102
 
103
-    /**
104
-     * Recursive Copy
105
-     *
106
-     * @param string $src
107
-     * @param string $dst
108
-     */
109
-    private function recursiveCopy($src, $dst)
110
-    {
111
-        @mkdir($dst, 0755);
103
+	/**
104
+	 * Recursive Copy
105
+	 *
106
+	 * @param string $src
107
+	 * @param string $dst
108
+	 */
109
+	private function recursiveCopy($src, $dst)
110
+	{
111
+		@mkdir($dst, 0755);
112 112
         
113
-        $iterator = new \RecursiveIteratorIterator(
114
-            new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS),
115
-            \RecursiveIteratorIterator::SELF_FIRST
116
-        );
113
+		$iterator = new \RecursiveIteratorIterator(
114
+			new \RecursiveDirectoryIterator($src, \RecursiveDirectoryIterator::SKIP_DOTS),
115
+			\RecursiveIteratorIterator::SELF_FIRST
116
+		);
117 117
         
118
-        foreach ($iterator as $file) {
119
-            if ($file->isDir()) {
120
-                @mkdir($dst . '/' . $iterator->getSubPathName());
121
-            } else {
122
-                $success = copy($file, $dst . '/' . $iterator->getSubPathName());
123
-                if ($success) {
124
-                    if (! $this->silent) {
125
-                        echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
126
-                    }
127
-                }
128
-            }
129
-        }
130
-    }
118
+		foreach ($iterator as $file) {
119
+			if ($file->isDir()) {
120
+				@mkdir($dst . '/' . $iterator->getSubPathName());
121
+			} else {
122
+				$success = copy($file, $dst . '/' . $iterator->getSubPathName());
123
+				if ($success) {
124
+					if (! $this->silent) {
125
+						echo 'copied: ' . $dst . '/' . $iterator->getSubPathName() . PHP_EOL;
126
+					}
127
+				}
128
+			}
129
+		}
130
+	}
131 131
 
132
-    /**
133
-     * Recursive Unlink
134
-     *
135
-     * @param string $dir
136
-     */
137
-    private function recursiveUnlink($dir)
138
-    {
139
-        $iterator = new \RecursiveIteratorIterator(
140
-            new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS),
141
-            \RecursiveIteratorIterator::CHILD_FIRST
142
-        );
132
+	/**
133
+	 * Recursive Unlink
134
+	 *
135
+	 * @param string $dir
136
+	 */
137
+	private function recursiveUnlink($dir)
138
+	{
139
+		$iterator = new \RecursiveIteratorIterator(
140
+			new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS),
141
+			\RecursiveIteratorIterator::CHILD_FIRST
142
+		);
143 143
         
144
-        foreach ($iterator as $file) {
145
-            if ($file->isDir()) {
146
-                rmdir($file);
147
-            } else {
148
-                unlink($file);
149
-            }
150
-        }
144
+		foreach ($iterator as $file) {
145
+			if ($file->isDir()) {
146
+				rmdir($file);
147
+			} else {
148
+				unlink($file);
149
+			}
150
+		}
151 151
         
152
-        rmdir($dir);
153
-    }
152
+		rmdir($dir);
153
+	}
154 154
 }
Please login to merge, or discard this patch.
application/tests/_ci_phpunit_test/patcher/2.x/MonkeyPatchManager.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -35,6 +35,9 @@  discard block
 block discarded – undo
35 35
 		'ConstantPatcher',
36 36
 	];
37 37
 
38
+	/**
39
+	 * @param string $message
40
+	 */
38 41
 	public static function log($message)
39 42
 	{
40 43
 		if (! self::$debug)
@@ -303,6 +306,9 @@  discard block
 block discarded – undo
303 306
 		self::$load_patchers = true;
304 307
 	}
305 308
 
309
+	/**
310
+	 * @param string $source
311
+	 */
306 312
 	protected static function execPatchers($source)
307 313
 	{
308 314
 		$patched = false;
Please login to merge, or discard this patch.
tests/_ci_phpunit_test/patcher/2.x/Patcher/FunctionPatcher/Proxy.php 1 patch
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.