Code Duplication    Length = 6-10 lines in 2 locations

Assets/Flysystem/FlysystemAssetStore.php 2 locations

@@ 396-401 (lines=6) @@
393
		$this->truncateDirectory(dirname($fileID), $from);
394
	}
395
396
	public function grant($filename, $hash) {
397
		$fileID = $this->getFileID($filename, $hash);
398
		$granted = Session::get(self::GRANTS_SESSION) ?: array();
399
		$granted[$fileID] = true;
400
		Session::set(self::GRANTS_SESSION, $granted);
401
	}
402
403
	public function revoke($filename, $hash) {
404
		$fileID = $this->getFileID($filename, $hash);
@@ 403-412 (lines=10) @@
400
		Session::set(self::GRANTS_SESSION, $granted);
401
	}
402
403
	public function revoke($filename, $hash) {
404
		$fileID = $this->getFileID($filename, $hash);
405
		$granted = Session::get(self::GRANTS_SESSION) ?: array();
406
		unset($granted[$fileID]);
407
		if($granted) {
408
			Session::set(self::GRANTS_SESSION, $granted);
409
		} else {
410
			Session::clear(self::GRANTS_SESSION);
411
		}
412
	}
413
414
	public function canView($filename, $hash) {
415
		$fileID = $this->getFileID($filename, $hash);