Code Duplication    Length = 7-7 lines in 2 locations

apps/files_external/lib/Service/DBConfigService.php 2 locations

@@ 140-146 (lines=7) @@
137
	 * @param string|null $value user_id, group_id or null for global mounts
138
	 * @return array
139
	 */
140
	public function getAdminMountsFor($type, $value) {
141
		$builder = $this->connection->getQueryBuilder();
142
		$query = $this->getForQuery($builder, $type, $value);
143
		$query->andWhere($builder->expr()->eq('m.type', $builder->expr()->literal(self::MOUNT_TYPE_ADMIN, IQueryBuilder::PARAM_INT)));
144
145
		return $this->getMountsFromQuery($query);
146
	}
147
148
	/**
149
	 * Get admin defined mounts for multiple applicable
@@ 178-184 (lines=7) @@
175
	 * @param string|null $value user_id, group_id or null for global mounts
176
	 * @return array
177
	 */
178
	public function getUserMountsFor($type, $value) {
179
		$builder = $this->connection->getQueryBuilder();
180
		$query = $this->getForQuery($builder, $type, $value);
181
		$query->andWhere($builder->expr()->eq('m.type', $builder->expr()->literal(self::MOUNT_TYPE_PERSONAl, IQueryBuilder::PARAM_INT)));
182
183
		return $this->getMountsFromQuery($query);
184
	}
185
186
	/**
187
	 * Add a mount to the database