Code Duplication    Length = 15-15 lines in 2 locations

src/CI_DB_result.php 2 locations

@@ 408-422 (lines=15) @@
405
	 * @param	int	$n
406
	 * @return	object
407
	 */
408
	public function row_object($n = 0)
409
	{
410
		$result = $this->result_object();
411
		if (count($result) === 0)
412
		{
413
			return NULL;
414
		}
415
416
		if ($n !== $this->current_row && isset($result[$n]))
417
		{
418
			$this->current_row = $n;
419
		}
420
421
		return $result[$this->current_row];
422
	}
423
424
	// --------------------------------------------------------------------
425
@@ 432-446 (lines=15) @@
429
	 * @param	int	$n
430
	 * @return	array
431
	 */
432
	public function row_array($n = 0)
433
	{
434
		$result = $this->result_array();
435
		if (count($result) === 0)
436
		{
437
			return NULL;
438
		}
439
440
		if ($n !== $this->current_row && isset($result[$n]))
441
		{
442
			$this->current_row = $n;
443
		}
444
445
		return $result[$this->current_row];
446
	}
447
448
	// --------------------------------------------------------------------
449