Code Duplication    Length = 9-9 lines in 2 locations

apps/files_external/lib/Lib/Notify/SMBNotifyHandler.php 1 location

@@ 55-63 (lines=9) @@
52
		$this->root = $root;
53
	}
54
55
	private function relativePath($fullPath) {
56
		if ($fullPath === $this->root) {
57
			return '';
58
		} else if (substr($fullPath, 0, strlen($this->root)) === $this->root) {
59
			return substr($fullPath, strlen($this->root));
60
		} else {
61
			return null;
62
		}
63
	}
64
65
	public function listen(callable $callback) {
66
		$oldRenamePath = null;

apps/files_external/lib/Lib/Storage/SMB.php 1 location

@@ 135-143 (lines=9) @@
132
		return Filesystem::normalizePath($this->root . '/' . $path, true, false, true);
133
	}
134
135
	protected function relativePath($fullPath) {
136
		if ($fullPath === $this->root) {
137
			return '';
138
		} else if (substr($fullPath, 0, strlen($this->root)) === $this->root) {
139
			return substr($fullPath, strlen($this->root));
140
		} else {
141
			return null;
142
		}
143
	}
144
145
	/**
146
	 * @param string $path