Code Duplication    Length = 11-11 lines in 2 locations

lib/private/Files/Storage/Wrapper/Encryption.php 1 location

@@ 226-236 (lines=11) @@
223
	 * @param string $data
224
	 * @return bool
225
	 */
226
	public function file_put_contents($path, $data) {
227
		// file put content will always be translated to a stream write
228
		$handle = $this->fopen($path, 'w');
229
		if (is_resource($handle)) {
230
			$written = fwrite($handle, $data);
231
			fclose($handle);
232
			return $written;
233
		}
234
235
		return false;
236
	}
237
238
	/**
239
	 * see http://php.net/manual/en/function.unlink.php

apps/dav/lib/Upload/AssemblyStream.php 1 location

@@ 242-252 (lines=11) @@
239
	 * @param IFile $node
240
	 * @return resource
241
	 */
242
	private function getStream(IFile $node) {
243
		$data = $node->get();
244
		if (is_resource($data)) {
245
			return $data;
246
		} else {
247
			$tmp = fopen('php://temp', 'w+');
248
			fwrite($tmp, $data);
249
			rewind($tmp);
250
			return $tmp;
251
		}
252
	}
253
}
254