Code Duplication    Length = 11-16 lines in 2 locations

lib/Service/ExternalFilesService.php 1 location

@@ 149-159 (lines=11) @@
146
	 * @throws FileIsNotIndexableException
147
	 * @throws KnownFileSourceException
148
	 */
149
	public function getFileSource(Node $file, string &$source) {
150
		if ($this->globalStoragesService === null
151
			|| $file->getMountPoint()
152
					->getMountType() !== 'external') {
153
			return;
154
		}
155
156
		$this->getMountPoint($file);
157
		$source = ConfigService::FILES_EXTERNAL;
158
159
		throw new KnownFileSourceException();
160
	}
161
162

lib/Service/GroupFoldersService.php 1 location

@@ 137-152 (lines=16) @@
134
	 *
135
	 * @throws KnownFileSourceException
136
	 */
137
	public function getFileSource(Node $file, string &$source) {
138
		if ($file->getMountPoint()
139
				 ->getMountType() !== 'group'
140
			|| $this->folderManager === null) {
141
			return;
142
		}
143
144
		try {
145
			$this->getMountPoint($file);
146
		} catch (FileIsNotIndexableException $e) {
147
			return;
148
		}
149
150
		$source = ConfigService::FILES_GROUP_FOLDERS;
151
		throw new KnownFileSourceException();
152
	}
153
154
155
	/**