Code Duplication    Length = 18-18 lines in 2 locations

includes/db/DatabaseMssql.php 2 locations

@@ 1496-1513 (lines=18) @@
1493
	/**
1494
	 * @return stdClass|bool
1495
	 */
1496
	public function fetchObject() {
1497
		$res = $this->result;
1498
1499
		if ( $this->mSeekTo !== null ) {
1500
			$result = sqlsrv_fetch_object( $res, 'stdClass', [],
1501
				SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo );
1502
			$this->mSeekTo = null;
1503
		} else {
1504
			$result = sqlsrv_fetch_object( $res );
1505
		}
1506
1507
		// MediaWiki expects us to return boolean false when there are no more rows instead of null
1508
		if ( $result === null ) {
1509
			return false;
1510
		}
1511
1512
		return $result;
1513
	}
1514
1515
	/**
1516
	 * @return array|bool
@@ 1518-1535 (lines=18) @@
1515
	/**
1516
	 * @return array|bool
1517
	 */
1518
	public function fetchRow() {
1519
		$res = $this->result;
1520
1521
		if ( $this->mSeekTo !== null ) {
1522
			$result = sqlsrv_fetch_array( $res, SQLSRV_FETCH_BOTH,
1523
				SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo );
1524
			$this->mSeekTo = null;
1525
		} else {
1526
			$result = sqlsrv_fetch_array( $res );
1527
		}
1528
1529
		// MediaWiki expects us to return boolean false when there are no more rows instead of null
1530
		if ( $result === null ) {
1531
			return false;
1532
		}
1533
1534
		return $result;
1535
	}
1536
1537
	/**
1538
	 * @param int $row