Code Duplication    Length = 9-9 lines in 2 locations

framework/Data/SqlMap/Statements/TMappedStatement.php 2 locations

@@ 441-449 (lines=9) @@
438
	 * @param mixed $parameter insert statement parameter.
439
	 * @return string new insert ID if pre-select key statement was executed, null otherwise.
440
	 */
441
	protected function getPreGeneratedSelectKey($connection, $parameter)
442
	{
443
		if ($this->_statement instanceof TSqlMapInsert) {
444
			$selectKey = $this->_statement->getSelectKey();
445
			if (($selectKey !== null) && !$selectKey->getIsAfter()) {
446
				return $this->executeSelectKey($connection, $parameter, $selectKey);
447
			}
448
		}
449
	}
450
451
	/**
452
	 * Gets the inserted row ID after executing an insert statement.
@@ 457-465 (lines=9) @@
454
	 * @param mixed $parameter insert statement parameter.
455
	 * @return string last insert ID, null otherwise.
456
	 */
457
	protected function getPostGeneratedSelectKey($connection, $parameter)
458
	{
459
		if ($this->_statement instanceof TSqlMapInsert) {
460
			$selectKey = $this->_statement->getSelectKey();
461
			if (($selectKey !== null) && $selectKey->getIsAfter()) {
462
				return $this->executeSelectKey($connection, $parameter, $selectKey);
463
			}
464
		}
465
	}
466
467
	/**
468
	 * Execute the select key statement, used to obtain last insert ID.