Code Duplication    Length = 6-6 lines in 3 locations

src/Wrapped/Share.php 3 locations

@@ 241-246 (lines=6) @@
238
	 * @throws \Icewind\SMB\Exception\NotFoundException
239
	 * @throws \Icewind\SMB\Exception\AlreadyExistsException
240
	 */
241
	public function rename($from, $to) {
242
		$path1 = $this->escapePath($from);
243
		$path2 = $this->escapePath($to);
244
		$output = $this->execute('rename ' . $path1 . ' ' . $path2);
245
		return $this->parseOutput($output, $to);
246
	}
247
248
	/**
249
	 * Upload a local file
@@ 258-263 (lines=6) @@
255
	 * @throws \Icewind\SMB\Exception\NotFoundException
256
	 * @throws \Icewind\SMB\Exception\InvalidTypeException
257
	 */
258
	public function put($source, $target) {
259
		$path1 = $this->escapeLocalPath($source); //first path is local, needs different escaping
260
		$path2 = $this->escapePath($target);
261
		$output = $this->execute('put ' . $path1 . ' ' . $path2);
262
		return $this->parseOutput($output, $target);
263
	}
264
265
	/**
266
	 * Download a remote file
@@ 275-280 (lines=6) @@
272
	 * @throws \Icewind\SMB\Exception\NotFoundException
273
	 * @throws \Icewind\SMB\Exception\InvalidTypeException
274
	 */
275
	public function get($source, $target) {
276
		$path1 = $this->escapePath($source);
277
		$path2 = $this->escapeLocalPath($target); //second path is local, needs different escaping
278
		$output = $this->execute('get ' . $path1 . ' ' . $path2);
279
		return $this->parseOutput($output, $source);
280
	}
281
282
	/**
283
	 * Open a readable stream to a remote file