Code Duplication    Length = 14-14 lines in 2 locations

PHPDaemon/FS/File.php 2 locations

@@ 239-252 (lines=14) @@
236
	 * @param  integer  $pri Priority
237
	 * @return resource|false
238
	 */
239
	public function sync($cb, $pri = EIO_PRI_DEFAULT) {
240
		$cb = CallbackWrapper::forceWrap($cb);
241
		if (!$this->fd) {
242
			if ($cb) {
243
				$cb($this, false);
244
			}
245
			return false;
246
		}
247
		if (!FileSystem::$supported) {
248
			$cb($this, true);
249
			return false;
250
		}
251
		return eio_fsync($this->fd, $pri, $cb, $this);
252
	}
253
254
	/**
255
	 * Datasync()
@@ 260-273 (lines=14) @@
257
	 * @param  integer  $pri Priority
258
	 * @return resource|false
259
	 */
260
	public function datasync($cb, $pri = EIO_PRI_DEFAULT) {
261
		$cb = CallbackWrapper::forceWrap($cb);
262
		if (!$this->fd) {
263
			if ($cb) {
264
				$cb($this, false);
265
			}
266
			return false;
267
		}
268
		if (!FileSystem::$supported) {
269
			$cb($this, true);
270
			return false;
271
		}
272
		return eio_fdatasync($this->fd, $pri, $cb, $this);
273
	}
274
275
	/**
276
	 * Writes data to file