Code Duplication    Length = 5-5 lines in 4 locations

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 ) .

includes/api/ApiBase.php 1 location

@@ 2643-2647 (lines=5) @@
2640
					if ( is_numeric( $k ) ) {
2641
						$msg .= "  $v\n";
2642
					} else {
2643
						if ( is_array( $v ) ) {
2644
							$msgExample = implode( "\n", array_map( [ $this, 'indentExampleText' ], $v ) );
2645
						} else {
2646
							$msgExample = "  $v";
2647
						}
2648
						$msgExample .= ':';
2649
						$msg .= wordwrap( $msgExample, 100, "\n" ) . "\n    $k\n";
2650
					}

includes/db/DatabaseOracle.php 1 location

@@ 743-747 (lines=5) @@
740
			$selectOptions = [ $selectOptions ];
741
		}
742
		list( $startOpts, $useIndex, $tailOpts ) = $this->makeSelectOptions( $selectOptions );
743
		if ( is_array( $srcTable ) ) {
744
			$srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
745
		} else {
746
			$srcTable = $this->tableName( $srcTable );
747
		}
748
749
		$sequenceData = $this->getSequenceData( $destTable );
750
		if ( $sequenceData !== false &&

includes/db/Database.php 1 location

@@ 2321-2325 (lines=5) @@
2318
2319
		list( $startOpts, $useIndex, $tailOpts ) = $this->makeSelectOptions( $selectOptions );
2320
2321
		if ( is_array( $srcTable ) ) {
2322
			$srcTable = implode( ',', array_map( [ &$this, 'tableName' ], $srcTable ) );
2323
		} else {
2324
			$srcTable = $this->tableName( $srcTable );
2325
		}
2326
2327
		$sql = "INSERT $insertOptions INTO $destTable (" . implode( ',', array_keys( $varMap ) ) . ')' .
2328
			" SELECT $startOpts " . implode( ',', $varMap ) .