Code Duplication    Length = 6-8 lines in 3 locations

lib/private/db/connection.php 1 location

@@ 266-272 (lines=7) @@
263
	 *
264
	 * @param string $table table name without the prefix
265
	 */
266
	public function dropTable($table) {
267
		$table = $this->tablePrefix . trim($table);
268
		$schema = $this->getSchemaManager();
269
		if($schema->tablesExist(array($table))) {
270
			$schema->dropTable($table);
271
		}
272
	}
273
274
	/**
275
	 * Check if a table exists

lib/private/db/oracleconnection.php 2 locations

@@ 72-79 (lines=8) @@
69
	 *
70
	 * @param string $table table name without the prefix
71
	 */
72
	public function dropTable($table) {
73
		$table = $this->tablePrefix . trim($table);
74
		$table = $this->quoteIdentifier($table);
75
		$schema = $this->getSchemaManager();
76
		if($schema->tablesExist(array($table))) {
77
			$schema->dropTable($table);
78
		}
79
	}
80
81
	/**
82
	 * Check if a table exists
@@ 87-92 (lines=6) @@
84
	 * @param string $table table name without the prefix
85
	 * @return bool
86
	 */
87
	public function tableExists($table){
88
		$table = $this->tablePrefix . trim($table);
89
		$table = $this->quoteIdentifier($table);
90
		$schema = $this->getSchemaManager();
91
		return $schema->tablesExist(array($table));
92
	}
93
}
94