Code Duplication    Length = 6-6 lines in 3 locations

src/Wrapped/Share.php 3 locations

@@ 254-259 (lines=6) @@
251
	 * @throws \Icewind\SMB\Exception\NotFoundException
252
	 * @throws \Icewind\SMB\Exception\AlreadyExistsException
253
	 */
254
	public function rename($from, $to) {
255
		$path1 = $this->escapePath($from);
256
		$path2 = $this->escapePath($to);
257
		$output = $this->execute('rename ' . $path1 . ' ' . $path2);
258
		return $this->parseOutput($output, $to);
259
	}
260
261
	/**
262
	 * Upload a local file
@@ 271-276 (lines=6) @@
268
	 * @throws \Icewind\SMB\Exception\NotFoundException
269
	 * @throws \Icewind\SMB\Exception\InvalidTypeException
270
	 */
271
	public function put($source, $target) {
272
		$path1 = $this->escapeLocalPath($source); //first path is local, needs different escaping
273
		$path2 = $this->escapePath($target);
274
		$output = $this->execute('put ' . $path1 . ' ' . $path2);
275
		return $this->parseOutput($output, $target);
276
	}
277
278
	/**
279
	 * Download a remote file
@@ 288-293 (lines=6) @@
285
	 * @throws \Icewind\SMB\Exception\NotFoundException
286
	 * @throws \Icewind\SMB\Exception\InvalidTypeException
287
	 */
288
	public function get($source, $target) {
289
		$path1 = $this->escapePath($source);
290
		$path2 = $this->escapeLocalPath($target); //second path is local, needs different escaping
291
		$output = $this->execute('get ' . $path1 . ' ' . $path2);
292
		return $this->parseOutput($output, $source);
293
	}
294
295
	/**
296
	 * Open a readable stream to a remote file