Code Duplication    Length = 13-13 lines in 2 locations

apps/dav/lib/BackgroundJob/UpdateCalendarResourcesRoomsBackgroundJob.php 2 locations

@@ 218-230 (lines=13) @@
215
	 * @param array $cachedResources
216
	 * @return array
217
	 */
218
	private function getCachedResourceIds(array $cachedResources):array {
219
		$cachedResourceIds = [];
220
		foreach ($cachedResources as $cachedResource) {
221
			if (!isset($cachedResourceIds[$cachedResource['backend_id']])) {
222
				$cachedResourceIds[$cachedResource['backend_id']] = [];
223
			}
224
225
			$cachedResourceIds[$cachedResource['backend_id']][] =
226
				$cachedResource['resource_id'];
227
		}
228
229
		return $cachedResourceIds;
230
	}
231
232
	/**
233
	 * @param array $cachedRooms
@@ 236-248 (lines=13) @@
233
	 * @param array $cachedRooms
234
	 * @return array
235
	 */
236
	private function getCachedRoomIds(array $cachedRooms):array {
237
		$cachedRoomIds = [];
238
		foreach ($cachedRooms as $cachedRoom) {
239
			if (!isset($cachedRoomIds[$cachedRoom['backend_id']])) {
240
				$cachedRoomIds[$cachedRoom['backend_id']] = [];
241
			}
242
243
			$cachedRoomIds[$cachedRoom['backend_id']][] =
244
				$cachedRoom['resource_id'];
245
		}
246
247
		return $cachedRoomIds;
248
	}
249
250
	/**
251
	 * sort list of ids by whether they appear only in the backend /