Code Duplication    Length = 11-11 lines in 2 locations

lib/private/Files/Config/UserMountCache.php 2 locations

@@ 217-227 (lines=11) @@
214
	 * @param int $numericStorageId
215
	 * @return CachedMountInfo[]
216
	 */
217
	public function getMountsForStorageId($numericStorageId) {
218
		$builder = $this->connection->getQueryBuilder();
219
		$query = $builder->select('storage_id', 'root_id', 'user_id', 'mount_point', 'mount_id', 'f.path')
220
			->from('mounts', 'm')
221
			->innerJoin('m', 'filecache', 'f' , $builder->expr()->eq('m.root_id', 'f.fileid'))
222
			->where($builder->expr()->eq('storage_id', $builder->createPositionalParameter($numericStorageId, IQueryBuilder::PARAM_INT)));
223
224
		$rows = $query->execute()->fetchAll();
225
226
		return array_map([$this, 'dbRowToMountInfo'], $rows);
227
	}
228
229
	/**
230
	 * @param int $rootFileId
@@ 233-243 (lines=11) @@
230
	 * @param int $rootFileId
231
	 * @return CachedMountInfo[]
232
	 */
233
	public function getMountsForRootId($rootFileId) {
234
		$builder = $this->connection->getQueryBuilder();
235
		$query = $builder->select('storage_id', 'root_id', 'user_id', 'mount_point', 'mount_id', 'f.path')
236
			->from('mounts', 'm')
237
			->innerJoin('m', 'filecache', 'f', $builder->expr()->eq('m.root_id', 'f.fileid'))
238
			->where($builder->expr()->eq('root_id', $builder->createPositionalParameter($rootFileId, IQueryBuilder::PARAM_INT)));
239
240
		$rows = $query->execute()->fetchAll();
241
242
		return array_map([$this, 'dbRowToMountInfo'], $rows);
243
	}
244
245
	/**
246
	 * @param $fileId