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

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

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
					}