Code Duplication    Length = 8-10 lines in 4 locations

PHPDaemon/FS/FileSystem.php 4 locations

@@ 252-259 (lines=8) @@
249
     * @param  integer $pri Priority
250
     * @return resource|false
251
     */
252
    public static function statvfs($path, $cb, $pri = EIO_PRI_DEFAULT)
253
    {
254
        $cb = CallbackWrapper::forceWrap($cb);
255
        if (!self::$supported) {
256
            $cb($path, false);
257
            return false;
258
        }
259
        return eio_statvfs($path, $pri, $cb, $path);
260
    }
261
262
    /**
@@ 288-295 (lines=8) @@
285
     * @param  integer $pri Priority
286
     * @return resource|true
287
     */
288
    public static function realpath($path, $cb, $pri = EIO_PRI_DEFAULT)
289
    {
290
        $cb = CallbackWrapper::forceWrap($cb);
291
        if (!self::$supported) {
292
            $cb($path, realpath($path));
293
            return true;
294
        }
295
        return eio_realpath($path, $pri, $cb, $path);
296
    }
297
298
    /**
@@ 304-313 (lines=10) @@
301
     * @param  integer $pri Priority
302
     * @return resource|false
303
     */
304
    public static function sync($cb = null, $pri = EIO_PRI_DEFAULT)
305
    {
306
        $cb = CallbackWrapper::forceWrap($cb);
307
        if (!self::$supported) {
308
            if ($cb) {
309
                $cb(false);
310
            }
311
            return false;
312
        }
313
        return eio_sync($pri, $cb);
314
    }
315
316
    /**
@@ 322-331 (lines=10) @@
319
     * @param  integer $pri Priority
320
     * @return resource|false
321
     */
322
    public static function syncfs($cb = null, $pri = EIO_PRI_DEFAULT)
323
    {
324
        $cb = CallbackWrapper::forceWrap($cb);
325
        if (!self::$supported) {
326
            if ($cb) {
327
                $cb(false);
328
            }
329
            return false;
330
        }
331
        return eio_syncfs($pri, $cb);
332
    }
333
334
    /**