Code Duplication    Length = 6-6 lines in 2 locations

src/NativeShare.php 2 locations

@@ 240-245 (lines=6) @@
237
	 * @throws \Icewind\SMB\Exception\NotFoundException
238
	 * @throws \Icewind\SMB\Exception\InvalidTypeException
239
	 */
240
	public function read($source) {
241
		$this->connect();
242
		$url = $this->buildUrl($source);
243
		$handle = $this->state->open($url, 'r');
244
		return NativeStream::wrap($this->state, $handle, 'r', $url);
245
	}
246
247
	/**
248
	 * Open a readable stream top a remote file
@@ 256-261 (lines=6) @@
253
	 * @throws \Icewind\SMB\Exception\NotFoundException
254
	 * @throws \Icewind\SMB\Exception\InvalidTypeException
255
	 */
256
	public function write($source) {
257
		$this->connect();
258
		$url = $this->buildUrl($source);
259
		$handle = $this->state->create($url);
260
		return NativeStream::wrap($this->state, $handle, 'w', $url);
261
	}
262
263
	/**
264
	 * Get extended attributes for the path