Code Duplication    Length = 8-8 lines in 5 locations

Assets/Storage/DBFile.php 5 locations

@@ 219-226 (lines=8) @@
216
		return $result;
217
	}
218
219
	public function getStream() {
220
		if(!$this->exists()) {
221
			return null;
222
		}
223
		return $this
224
			->getStore()
225
			->getAsStream($this->Filename, $this->Hash, $this->Variant);
226
	}
227
228
	public function getString() {
229
		if(!$this->exists()) {
@@ 228-235 (lines=8) @@
225
			->getAsStream($this->Filename, $this->Hash, $this->Variant);
226
	}
227
228
	public function getString() {
229
		if(!$this->exists()) {
230
			return null;
231
		}
232
		return $this
233
			->getStore()
234
			->getAsString($this->Filename, $this->Hash, $this->Variant);
235
	}
236
237
	public function getURL($grant = true) {
238
		if(!$this->exists()) {
@@ 272-279 (lines=8) @@
269
		return Director::absoluteURL($this->getURL());
270
	}
271
272
	public function getMetaData() {
273
		if(!$this->exists()) {
274
			return null;
275
		}
276
		return $this
277
			->getStore()
278
			->getMetadata($this->Filename, $this->Hash, $this->Variant);
279
	}
280
281
	public function getMimeType() {
282
		if(!$this->exists()) {
@@ 281-288 (lines=8) @@
278
			->getMetadata($this->Filename, $this->Hash, $this->Variant);
279
	}
280
281
	public function getMimeType() {
282
		if(!$this->exists()) {
283
			return null;
284
		}
285
		return $this
286
			->getStore()
287
			->getMimeType($this->Filename, $this->Hash, $this->Variant);
288
	}
289
290
	public function getValue() {
291
		if(!$this->exists()) {
@@ 310-317 (lines=8) @@
307
			->getVisibility($this->Filename, $this->Hash);
308
	}
309
310
	public function exists() {
311
		if(empty($this->Filename)) {
312
			return false;
313
		}
314
		return $this
315
			->getStore()
316
			->exists($this->Filename, $this->Hash, $this->Variant);
317
	}
318
319
	public function getFilename() {
320
		return $this->getField('Filename');