Code Duplication    Length = 7-7 lines in 2 locations

src/Query/CreateAbstract.php 2 locations

@@ 22-28 (lines=7) @@
19
	 *
20
	 * @return \chillerlan\Database\Query\CreateDatabaseInterface
21
	 */
22
	public function database(string $dbname = null):CreateDatabaseInterface{
23
		$class = $this->dialect.'\\CreateDatabase';
24
		/** @var \chillerlan\Database\Query\CreateDatabaseInterface $createTable */
25
		$createTable = new $class($this->DBDriver, $this->dialect);
26
27
		return $createTable->name($dbname);
28
	}
29
30
	/**
31
	 * @param string|null $tablename
@@ 35-41 (lines=7) @@
32
	 *
33
	 * @return \chillerlan\Database\Query\CreateTableInterface
34
	 */
35
	public function table(string $tablename = null):CreateTableInterface{
36
		$class = $this->dialect.'\\CreateTable';
37
		/** @var \chillerlan\Database\Query\CreateTableInterface $createTable */
38
		$createTable = new $class($this->DBDriver, $this->dialect);
39
40
		return $createTable->name($tablename);
41
	}
42
43
	public function index():CreateInterface{
44
		// TODO: Implement index() method.