Code Duplication    Length = 11-11 lines in 2 locations

lib/private/connector/sabre/file.php 1 location

@@ 227-237 (lines=11) @@
224
		$hookPath = Filesystem::getView()->getRelativePath($this->fileView->getAbsolutePath($path));
225
		$run = true;
226
227
		if (!$exists) {
228
			\OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_create, array(
229
				\OC\Files\Filesystem::signal_param_path => $hookPath,
230
				\OC\Files\Filesystem::signal_param_run => &$run,
231
			));
232
		} else {
233
			\OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_update, array(
234
				\OC\Files\Filesystem::signal_param_path => $hookPath,
235
				\OC\Files\Filesystem::signal_param_run => &$run,
236
			));
237
		}
238
		\OC_Hook::emit(\OC\Files\Filesystem::CLASSNAME, \OC\Files\Filesystem::signal_write, array(
239
			\OC\Files\Filesystem::signal_param_path => $hookPath,
240
			\OC\Files\Filesystem::signal_param_run => &$run,

lib/private/files/view.php 1 location

@@ 497-507 (lines=11) @@
494
	 * @param bool $run
495
	 */
496
	protected function emit_file_hooks_pre($exists, $path, &$run) {
497
		if (!$exists) {
498
			\OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_create, array(
499
				Filesystem::signal_param_path => $this->getHookPath($path),
500
				Filesystem::signal_param_run => &$run,
501
			));
502
		} else {
503
			\OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_update, array(
504
				Filesystem::signal_param_path => $this->getHookPath($path),
505
				Filesystem::signal_param_run => &$run,
506
			));
507
		}
508
		\OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_write, array(
509
			Filesystem::signal_param_path => $this->getHookPath($path),
510
			Filesystem::signal_param_run => &$run,