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

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