Code Duplication    Length = 18-18 lines in 2 locations

model/fieldtypes/Enum.php 1 location

@@ 83-100 (lines=18) @@
80
	/**
81
	 * @return void
82
	 */
83
	public function requireField() {
84
		$parts = array(
85
			'datatype' => 'enum',
86
			'enums' => $this->getEnum(),
87
			'character set' => 'utf8',
88
			'collate' => 'utf8_general_ci',
89
			'default' => $this->getDefault(),
90
			'table' => $this->getTable(),
91
			'arrayValue' => $this->arrayValue
92
		);
93
94
		$values = array(
95
			'type' => 'enum',
96
			'parts' => $parts
97
		);
98
99
		DB::require_field($this->getTable(), $this->getName(), $values);
100
	}
101
102
	/**
103
	 * Return a dropdown field suitable for editing this field.

model/fieldtypes/DBClassName.php 1 location

@@ 63-80 (lines=18) @@
60
	/**
61
	 * @return void
62
	 */
63
	public function requireField() {
64
		$parts = array(
65
			'datatype' => 'enum',
66
			'enums' => $this->getEnumObsolete(),
67
			'character set' => 'utf8',
68
			'collate' => 'utf8_general_ci',
69
			'default' => $this->getDefault(),
70
			'table' => $this->getTable(),
71
			'arrayValue' => $this->arrayValue
72
		);
73
74
		$values = array(
75
			'type' => 'enum',
76
			'parts' => $parts
77
		);
78
79
		DB::require_field($this->getTable(), $this->getName(), $values);
80
	}
81
82
	/**
83
	 * Get the base dataclass for the list of subclasses