Code Duplication    Length = 11-11 lines in 2 locations

apps/files_trashbin/lib/Sabre/TrashFolderFolder.php 1 location

@@ 91-101 (lines=11) @@
88
		return $children;
89
	}
90
91
	public function childExists($name): bool {
92
		$entries = \OCA\Files_Trashbin\Helper::getTrashFiles($this->root . '/' . $this->getName(), $this->userId);
93
94
		foreach ($entries as $entry) {
95
			if ($entry->getName() === $name) {
96
				return true;
97
			}
98
		}
99
100
		return false;
101
	}
102
103
	public function delete() {
104
		\OCA\Files_Trashbin\Trashbin::delete($this->root . '/' . $this->getName(), $this->userId, null);

apps/files_trashbin/lib/Sabre/TrashRoot.php 1 location

@@ 88-98 (lines=11) @@
85
		return $children;
86
	}
87
88
	public function childExists($name): bool {
89
		$entries = \OCA\Files_Trashbin\Helper::getTrashFiles('/', $this->userId);
90
91
		foreach ($entries as $entry) {
92
			if ($entry->getName() . '.d'.$entry->getMtime() === $name) {
93
				return true;
94
			}
95
		}
96
97
		return false;
98
	}
99
100
	public function getLastModified(): int {
101
		return 0;