Code Duplication    Length = 8-8 lines in 3 locations

lib/private/files/storage/wrapper/quota.php 3 locations

@@ 124-131 (lines=8) @@
121
	 * @param string $target
122
	 * @return bool
123
	 */
124
	public function copy($source, $target) {
125
		$free = $this->free_space('');
126
		if ($free < 0 or $this->getSize($source) < $free) {
127
			return $this->storage->copy($source, $target);
128
		} else {
129
			return false;
130
		}
131
	}
132
133
	/**
134
	 * see http://php.net/manual/en/function.fopen.php
@@ 175-182 (lines=8) @@
172
	 * @param string $targetInternalPath
173
	 * @return bool
174
	 */
175
	public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
176
		$free = $this->free_space('');
177
		if ($free < 0 or $this->getSize($sourceInternalPath, $sourceStorage) < $free) {
178
			return $this->storage->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
179
		} else {
180
			return false;
181
		}
182
	}
183
184
	/**
185
	 * @param \OCP\Files\Storage $sourceStorage
@@ 190-197 (lines=8) @@
187
	 * @param string $targetInternalPath
188
	 * @return bool
189
	 */
190
	public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
191
		$free = $this->free_space('');
192
		if ($free < 0 or $this->getSize($sourceInternalPath, $sourceStorage) < $free) {
193
			return $this->storage->moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
194
		} else {
195
			return false;
196
		}
197
	}
198
}
199