Code Duplication    Length = 9-9 lines in 2 locations

apps/files/lib/Controller/ViewController.php 1 location

@@ 302-310 (lines=9) @@
299
			$webdavUrl = $event->getArgument('resolvedDavLink');
300
		} else {
301
			$file = \current($files);
302
			if ($file instanceof Folder) {
303
				// set the full path to enter the folder
304
				$params['dir'] = $baseFolder->getRelativePath($file->getPath());
305
			} else {
306
				// set parent path as dir
307
				$params['dir'] = $baseFolder->getRelativePath($file->getParent()->getPath());
308
				// and scroll to the entry
309
				$params['scrollto'] = $file->getName();
310
			}
311
			if ($details !== null) {
312
				$params['details'] = $details;
313
			}

apps/files_trashbin/lib/Trashbin.php 1 location

@@ 1055-1063 (lines=9) @@
1052
			if (!empty($files)) {
1053
				$params['view'] = 'trashbin';
1054
				$file = \current($files);
1055
				if ($file instanceof Folder) {
1056
					// set the full path to enter the folder
1057
					$params['dir'] = $baseFolder->getRelativePath($file->getPath());
1058
				} else {
1059
					// set parent path as dir
1060
					$params['dir'] = $baseFolder->getRelativePath($file->getParent()->getPath());
1061
					// and scroll to the entry
1062
					$params['scrollto'] = $file->getName();
1063
				}
1064
				return $this->urlGenerator->linkToRoute('files.view.index', $params);
1065
			}
1066
		}