Code Duplication    Length = 10-12 lines in 2 locations

lib/Model/Federated/FederatedShare.php 1 location

@@ 169-180 (lines=12) @@
166
	 *
167
	 * @return INC21QueryRow
168
	 */
169
	public function importFromDatabase(array $data): INC21QueryRow {
170
		$this->setId($this->getInt('id', $data));
171
		$this->setUniqueId($this->get('unique_id', $data));
172
		$this->setCircleId($this->get('circle_id', $data));
173
		$this->setInstance($this->get('instance', $data));
174
175
		if ($this->getInstance() === '') {
176
			$this->setInstance($this->get('_params.local', $data));
177
		}
178
179
		return $this;
180
	}
181
182
183
	/**

lib/Model/Federated/RemoteInstance.php 1 location

@@ 422-431 (lines=10) @@
419
	 *
420
	 * @return self
421
	 */
422
	public function importFromDatabase(array $data): INC21QueryRow {
423
		$this->setDbId($this->getInt('id', $data));
424
		$this->import($this->getArray('item', $data));
425
		$this->setOrigData($this->getArray('item', $data));
426
		$this->setType($this->get('type', $data));
427
		$this->setInstance($this->get('instance', $data));
428
		$this->setId($this->get('href', $data));
429
430
		return $this;
431
	}
432
433
}
434