Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 202-214 (lines=13) @@
199
	 * @param array $cachedResources
200
	 * @return array
201
	 */
202
	private function getCachedResourceIds(array $cachedResources):array {
203
		$cachedResourceIds = [];
204
		foreach ($cachedResources as $cachedResource) {
205
			if (!isset($cachedResourceIds[$cachedResource['backend_id']])) {
206
				$cachedResourceIds[$cachedResource['backend_id']] = [];
207
			}
208
209
			$cachedResourceIds[$cachedResource['backend_id']][] =
210
				$cachedResource['resource_id'];
211
		}
212
213
		return $cachedResourceIds;
214
	}
215
216
	/**
217
	 * @param array $cachedRooms
@@ 220-232 (lines=13) @@
217
	 * @param array $cachedRooms
218
	 * @return array
219
	 */
220
	private function getCachedRoomIds(array $cachedRooms):array {
221
		$cachedRoomIds = [];
222
		foreach ($cachedRooms as $cachedRoom) {
223
			if (!isset($cachedRoomIds[$cachedRoom['backend_id']])) {
224
				$cachedRoomIds[$cachedRoom['backend_id']] = [];
225
			}
226
227
			$cachedRoomIds[$cachedRoom['backend_id']][] =
228
				$cachedRoom['resource_id'];
229
		}
230
231
		return $cachedRoomIds;
232
	}
233
234
	/**
235
	 * sort list of ids by whether they appear only in the backend /