Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 47-58 (lines=12) @@
44
		return '.file';
45
	}
46
47
	static public function isFutureFile() {
48
		$davUploadsTarget = '/dav/uploads';
49
50
		// Check if pathinfo starts with dav uploads target and basename is future file basename
51
		if (isset($_SERVER['PATH_INFO'])
52
			&& pathinfo($_SERVER['PATH_INFO'], PATHINFO_BASENAME) === FutureFile::getFutureFileName()
53
			&& (strpos($_SERVER['PATH_INFO'], $davUploadsTarget) === 0)) {
54
			return true;
55
		}
56
57
		return false;
58
	}
59
60
	/**
61
	 * @param Directory $root

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

@@ 44-55 (lines=12) @@
41
		return '.file.zsync';
42
	}
43
44
	static public function isFutureFile() {
45
		$davUploadsTarget = '/dav/uploads';
46
47
		// Check if pathinfo starts with dav uploads target and basename is future file basename
48
		if (isset($_SERVER['PATH_INFO'])
49
			&& pathinfo($_SERVER['PATH_INFO'], PATHINFO_BASENAME) === FutureFileZsync::getFutureFileName()
50
			&& (strpos($_SERVER['PATH_INFO'], $davUploadsTarget) === 0)) {
51
			return true;
52
		}
53
54
		return false;
55
	}
56
57
	/**
58
	 * @inheritdoc