Code Duplication    Length = 5-5 lines in 4 locations

includes/db/DatabaseOracle.php 1 location

@@ 731-735 (lines=5) @@
728
			$selectOptions = [ $selectOptions ];
729
		}
730
		list( $startOpts, $useIndex, $tailOpts ) = $this->makeSelectOptions( $selectOptions );
731
		if ( is_array( $srcTable ) ) {
732
			$srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
733
		} else {
734
			$srcTable = $this->tableName( $srcTable );
735
		}
736
737
		$sequenceData = $this->getSequenceData( $destTable );
738
		if ( $sequenceData !== false &&

includes/db/Database.php 1 location

@@ 2272-2276 (lines=5) @@
2269
2270
		list( $startOpts, $useIndex, $tailOpts ) = $this->makeSelectOptions( $selectOptions );
2271
2272
		if ( is_array( $srcTable ) ) {
2273
			$srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
2274
		} else {
2275
			$srcTable = $this->tableName( $srcTable );
2276
		}
2277
2278
		$sql = "INSERT $insertOptions INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' .
2279
			" SELECT $startOpts " . implode( ',', $varMap ) .

includes/api/ApiBase.php 1 location

@@ 2631-2635 (lines=5) @@
2628
					if ( is_numeric( $k ) ) {
2629
						$msg .= "  $v\n";
2630
					} else {
2631
						if ( is_array( $v ) ) {
2632
							$msgExample = implode( "\n", array_map( [ $this, 'indentExampleText' ], $v ) );
2633
						} else {
2634
							$msgExample = "  $v";
2635
						}
2636
						$msgExample .= ':';
2637
						$msg .= wordwrap( $msgExample, 100, "\n" ) . "\n    $k\n";
2638
					}

includes/db/DatabasePostgres.php 1 location

@@ 931-935 (lines=5) @@
928
			$selectOptions = [ $selectOptions ];
929
		}
930
		list( $startOpts, $useIndex, $tailOpts ) = $this->makeSelectOptions( $selectOptions );
931
		if ( is_array( $srcTable ) ) {
932
			$srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
933
		} else {
934
			$srcTable = $this->tableName( $srcTable );
935
		}
936
937
		$sql = "INSERT INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' .
938
			" SELECT $startOpts " . implode( ',', $varMap ) .