Code Duplication    Length = 11-12 lines in 2 locations

lib/private/files/view.php 2 locations

@@ 802-813 (lines=12) @@
799
			try {
800
801
				$exists = $this->file_exists($path2);
802
				if ($this->shouldEmitHooks()) {
803
					\OC_Hook::emit(
804
						Filesystem::CLASSNAME,
805
						Filesystem::signal_copy,
806
						array(
807
							Filesystem::signal_param_oldpath => $this->getHookPath($path1),
808
							Filesystem::signal_param_newpath => $this->getHookPath($path2),
809
							Filesystem::signal_param_run => &$run
810
						)
811
					);
812
					$this->emit_file_hooks_pre($exists, $path2, $run);
813
				}
814
				if ($run) {
815
					$mount1 = $this->getMount($path1);
816
					$mount2 = $this->getMount($path2);
@@ 840-850 (lines=11) @@
837
					$this->changeLock($path2, ILockingProvider::LOCK_SHARED);
838
					$lockTypePath2 = ILockingProvider::LOCK_SHARED;
839
840
					if ($this->shouldEmitHooks() && $result !== false) {
841
						\OC_Hook::emit(
842
							Filesystem::CLASSNAME,
843
							Filesystem::signal_post_copy,
844
							array(
845
								Filesystem::signal_param_oldpath => $this->getHookPath($path1),
846
								Filesystem::signal_param_newpath => $this->getHookPath($path2)
847
							)
848
						);
849
						$this->emit_file_hooks_post($exists, $path2);
850
					}
851
852
				}
853
			} catch (\Exception $e) {