Code Duplication    Length = 8-8 lines in 3 locations

lib/private/Files/Storage/Wrapper/Quota.php 3 locations

@@ 129-136 (lines=8) @@
126
	 * @param string $target
127
	 * @return bool
128
	 */
129
	public function copy($source, $target) {
130
		$free = $this->free_space($target);
131
		if ($free < 0 or $this->getSize($source) < $free) {
132
			return $this->storage->copy($source, $target);
133
		} else {
134
			return false;
135
		}
136
	}
137
138
	/**
139
	 * see http://php.net/manual/en/function.fopen.php
@@ 180-187 (lines=8) @@
177
	 * @param string $targetInternalPath
178
	 * @return bool
179
	 */
180
	public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
181
		$free = $this->free_space($targetInternalPath);
182
		if ($free < 0 or $this->getSize($sourceInternalPath, $sourceStorage) < $free) {
183
			return $this->storage->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
184
		} else {
185
			return false;
186
		}
187
	}
188
189
	/**
190
	 * @param IStorage $sourceStorage
@@ 195-202 (lines=8) @@
192
	 * @param string $targetInternalPath
193
	 * @return bool
194
	 */
195
	public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
196
		$free = $this->free_space($targetInternalPath);
197
		if ($free < 0 or $this->getSize($sourceInternalPath, $sourceStorage) < $free) {
198
			return $this->storage->moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
199
		} else {
200
			return false;
201
		}
202
	}
203
204
	public function mkdir($path) {
205
		if ($this->quota === 0.0) {