Code Duplication    Length = 5-5 lines in 2 locations

code/SHBlock.php 2 locations

@@ 44-48 (lines=5) @@
41
	);
42
	
43
	public function VisibleTo() {
44
		if (strlen(trim($this->MemberVisibility)) > 0) {
45
			$lists = 'Group: ' . str_replace(',','<br />Group: ', $this->MemberVisibility);
46
		}else{
47
			$lists = '<em>&lt;All&gt;</em>';
48
		}
49
		
50
		return new LiteralField('VisibleTo',$lists);
51
	}
@@ 59-63 (lines=5) @@
56
	
57
	public function shownOn() {
58
		if ($this->showBlockbyClass) {
59
			if (strlen(trim($this->shownInClass)) > 0) {
60
				$lists = 'Type: ' . str_replace(',','<br />Type: ', $this->shownInClass);
61
			}else{
62
				$lists = '<em>&lt;not assigned&gt;</em>';
63
			}
64
		}else{
65
			if ($this->Pages()->count() > 0) {
66
				$lists = 'Page: ' . implode('<br />Page: ', $this->Pages()->column('Title'));