Code Duplication    Length = 5-5 lines in 2 locations

lib/Controller/DirectViewController.php 1 location

@@ 133-137 (lines=5) @@
130
131
				/** Open file from remote collabora */
132
				$federatedUrl = $this->federationService->getRemoteRedirectURL($item, $direct);
133
				if ($federatedUrl !== null) {
134
					$response = new RedirectResponse($federatedUrl);
135
					$response->addHeader('X-Frame-Options', 'ALLOW');
136
					return $response;
137
				}
138
139
				list($urlSrc, $token) = $this->tokenManager->getToken($item->getId(), null, $direct->getUid(), true);
140
			} catch (\Exception $e) {

lib/Controller/DocumentController.php 1 location

@@ 230-234 (lines=5) @@
227
228
			/** Open file from remote collabora */
229
			$federatedUrl = $this->federationService->getRemoteRedirectURL($item);
230
			if ($federatedUrl !== null) {
231
				$response = new RedirectResponse($federatedUrl);
232
				$response->addHeader('X-Frame-Options', 'ALLOW');
233
				return $response;
234
			}
235
236
			list($urlSrc, $token) = $this->tokenManager->getToken($item->getId());
237
			$params = [