Code Duplication    Length = 9-9 lines in 3 locations

src/Databases/MySQL.php 3 locations

@@ 195-203 (lines=9) @@
192
	 * @param array $fields
193
	 * @return Builder\RunnableSelect
194
	 */
195
	public function select(array $fields = null) {
196
		$select = array_key_exists('select-factory', $this->options)
197
			? call_user_func($this->options['select-factory'], $this, $this->options['select-options'])
198
			: new Builder\RunnableSelect($this, $this->options['select-options']);
199
		if($fields !== null) {
200
			$select->fields($fields);
201
		}
202
		return $select;
203
	}
204
205
	/**
206
	 * @param array $fields
@@ 209-217 (lines=9) @@
206
	 * @param array $fields
207
	 * @return Builder\RunnableInsert
208
	 */
209
	public function insert(array $fields = null) {
210
		$insert = array_key_exists('insert-factory', $this->options)
211
			? call_user_func($this->options['insert-factory'], $this, $this->options['insert-options'])
212
			: new Builder\RunnableInsert($this, $this->options['insert-options']);
213
		if($fields !== null) {
214
			$insert->addAll($fields);
215
		}
216
		return $insert;
217
	}
218
219
	/**
220
	 * @param array $fields
@@ 223-231 (lines=9) @@
220
	 * @param array $fields
221
	 * @return Builder\RunnableUpdate
222
	 */
223
	public function update(array $fields = null) {
224
		$update = array_key_exists('update-factory', $this->options)
225
			? call_user_func($this->options['update-factory'], $this, $this->options['update-options'])
226
			: new Builder\RunnableUpdate($this, $this->options['update-options']);
227
		if($fields !== null) {
228
			$update->setAll($fields);
229
		}
230
		return $update;
231
	}
232
233
	/**
234
	 * @return Builder\RunnableDelete