Code Duplication    Length = 6-6 lines in 3 locations

src/Wrapped/Share.php 3 locations

@@ 271-276 (lines=6) @@
268
	 * @throws \Icewind\SMB\Exception\NotFoundException
269
	 * @throws \Icewind\SMB\Exception\AlreadyExistsException
270
	 */
271
	public function rename($from, $to) {
272
		$path1 = $this->escapePath($from);
273
		$path2 = $this->escapePath($to);
274
		$output = $this->execute('rename ' . $path1 . ' ' . $path2);
275
		return $this->parseOutput($output, $to);
276
	}
277
278
	/**
279
	 * Upload a local file
@@ 288-293 (lines=6) @@
285
	 * @throws \Icewind\SMB\Exception\NotFoundException
286
	 * @throws \Icewind\SMB\Exception\InvalidTypeException
287
	 */
288
	public function put($source, $target) {
289
		$path1 = $this->escapeLocalPath($source); //first path is local, needs different escaping
290
		$path2 = $this->escapePath($target);
291
		$output = $this->execute('put ' . $path1 . ' ' . $path2);
292
		return $this->parseOutput($output, $target);
293
	}
294
295
	/**
296
	 * Download a remote file
@@ 305-310 (lines=6) @@
302
	 * @throws \Icewind\SMB\Exception\NotFoundException
303
	 * @throws \Icewind\SMB\Exception\InvalidTypeException
304
	 */
305
	public function get($source, $target) {
306
		$path1 = $this->escapePath($source);
307
		$path2 = $this->escapeLocalPath($target); //second path is local, needs different escaping
308
		$output = $this->execute('get ' . $path1 . ' ' . $path2);
309
		return $this->parseOutput($output, $source);
310
	}
311
312
	/**
313
	 * Open a readable stream to a remote file