Code Duplication    Length = 4-4 lines in 3 locations

lib/custom/src/MW/Filesystem/Laravel.php 3 locations

@@ 206-209 (lines=4) @@
203
			throw new Exception( $error['message'] );
204
		}
205
206
		if( fwrite( $stream, $content ) === false ) {
207
			$error = error_get_last();
208
			throw new Exception( $error['message'] );
209
		}
210
211
		if( rewind( $stream ) === false ) {
212
			$error = error_get_last();
@@ 211-214 (lines=4) @@
208
			throw new Exception( $error['message'] );
209
		}
210
211
		if( rewind( $stream ) === false ) {
212
			$error = error_get_last();
213
			throw new Exception( $error['message'] );
214
		}
215
216
		return $stream;
217
	}
@@ 252-255 (lines=4) @@
249
	 */
250
	public function writes( $path, $stream )
251
	{
252
		if( ( $content = @fread( $stream, 0x7fffffff ) ) === false ) {
253
			$error = error_get_last();
254
			throw new Exception( $error['message'] );
255
		}
256
257
		try {
258
			$content = $this->fs->put( $path, $content );