Code Duplication    Length = 15-21 lines in 2 locations

application/tests/_ci_phpunit_test/replacing/core/Input.php 1 location

@@ 200-220 (lines=21) @@
197
		{
198
			$value = $array[$index];
199
		}
200
		elseif (($count = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $index, $matches)) > 1) // Does the index contain array notation
201
		{
202
			$value = $array;
203
			for ($i = 0; $i < $count; $i++)
204
			{
205
				$key = trim($matches[0][$i], '[]');
206
				if ($key === '') // Empty notation will return the value as array
207
				{
208
					break;
209
				}
210
211
				if (isset($value[$key]))
212
				{
213
					$value = $value[$key];
214
				}
215
				else
216
				{
217
					return NULL;
218
				}
219
			}
220
		}
221
		else
222
		{
223
			return NULL;

application/tests/_ci_phpunit_test/replacing/libraries/Upload.php 1 location

@@ 382-396 (lines=15) @@
379
			$_file = $_FILES[$field];
380
		}
381
		// Does the field name contain array notation?
382
		elseif (($c = preg_match_all('/(?:^[^\[]+)|\[[^]]*\]/', $field, $matches)) > 1)
383
		{
384
			$_file = $_FILES;
385
			for ($i = 0; $i < $c; $i++)
386
			{
387
				// We can't track numeric iterations, only full field names are accepted
388
				if (($field = trim($matches[0][$i], '[]')) === '' OR ! isset($_file[$field]))
389
				{
390
					$_file = NULL;
391
					break;
392
				}
393
394
				$_file = $_file[$field];
395
			}
396
		}
397
398
		if ( ! isset($_file))
399
		{