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/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/db/Database.php 1 location

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

includes/api/ApiBase.php 1 location

@@ 2637-2641 (lines=5) @@
2634
					if ( is_numeric( $k ) ) {
2635
						$msg .= "  $v\n";
2636
					} else {
2637
						if ( is_array( $v ) ) {
2638
							$msgExample = implode( "\n", array_map( [ $this, 'indentExampleText' ], $v ) );
2639
						} else {
2640
							$msgExample = "  $v";
2641
						}
2642
						$msgExample .= ':';
2643
						$msg .= wordwrap( $msgExample, 100, "\n" ) . "\n    $k\n";
2644
					}