Code Duplication    Length = 8-8 lines in 5 locations

filesystem/storage/DBFile.php 5 locations

@@ 224-231 (lines=8) @@
221
		return $result;
222
	}
223
224
	public function getStream() {
225
		if(!$this->exists()) {
226
			return null;
227
		}
228
		return $this
229
			->getStore()
230
			->getAsStream($this->Filename, $this->Hash, $this->Variant);
231
	}
232
233
	public function getString() {
234
		if(!$this->exists()) {
@@ 233-240 (lines=8) @@
230
			->getAsStream($this->Filename, $this->Hash, $this->Variant);
231
	}
232
233
	public function getString() {
234
		if(!$this->exists()) {
235
			return null;
236
		}
237
		return $this
238
			->getStore()
239
			->getAsString($this->Filename, $this->Hash, $this->Variant);
240
	}
241
242
	public function getURL() {
243
		if(!$this->exists()) {
@@ 276-283 (lines=8) @@
273
		return Director::absoluteURL($this->getURL());
274
	}
275
276
	public function getMetaData() {
277
		if(!$this->exists()) {
278
			return null;
279
		}
280
		return $this
281
			->getStore()
282
			->getMetadata($this->Filename, $this->Hash, $this->Variant);
283
	}
284
285
	public function getMimeType() {
286
		if(!$this->exists()) {
@@ 285-292 (lines=8) @@
282
			->getMetadata($this->Filename, $this->Hash, $this->Variant);
283
	}
284
285
	public function getMimeType() {
286
		if(!$this->exists()) {
287
			return null;
288
		}
289
		return $this
290
			->getStore()
291
			->getMimeType($this->Filename, $this->Hash, $this->Variant);
292
	}
293
	
294
	public function getValue() {
295
		if($this->exists()) {
@@ 304-311 (lines=8) @@
301
		}
302
	}
303
304
	public function exists() {
305
		if(empty($this->Filename)) {
306
			return false;
307
		}
308
		return $this
309
			->getStore()
310
			->exists($this->Filename, $this->Hash, $this->Variant);
311
	}
312
313
	public static function get_shortcodes() {
314
		return 'dbfile_link';