Code Duplication    Length = 10-11 lines in 2 locations

lib/Service/ExternalFilesService.php 1 location

@@ 221-230 (lines=10) @@
218
	 * @return ExternalMount
219
	 * @throws FileIsNotIndexableException
220
	 */
221
	private function getExternalMount(Node $file) {
222
223
		foreach ($this->externalMounts as $mount) {
224
			if (strpos($file->getPath(), $mount->getPath()) === 0) {
225
				return $mount;
226
			}
227
		}
228
229
		throw new FileIsNotIndexableException();
230
	}
231
232
233
	/**

lib/Service/GroupFoldersService.php 1 location

@@ 222-232 (lines=11) @@
219
	 * @return GroupFolderMount
220
	 * @throws FileIsNotIndexableException
221
	 */
222
	private function getGroupFolderMount(Node $file) {
223
224
		foreach ($this->groupFolders as $mount) {
225
			if (strpos($file->getPath(), $mount->getPath()) === 0) {
226
				return $mount;
227
			}
228
		}
229
230
		throw new FileIsNotIndexableException();
231
232
	}
233
234
235
	/**