Code Duplication    Length = 8-12 lines in 2 locations

mod/blog/classes/ElggBlog.php 1 location

@@ 29-40 (lines=12) @@
26
	 * @return bool
27
	 * @since 1.8.0
28
	 */
29
	public function canComment($user_guid = 0) {
30
		$result = parent::canComment($user_guid);
31
		if ($result == false) {
32
			return $result;
33
		}
34
35
		if ($this->comments_on == 'Off') {
36
			return false;
37
		}
38
		
39
		return true;
40
	}
41
42
	/**
43
	 * Get the excerpt for this blog post

mod/thewire/classes/ElggWire.php 1 location

@@ 31-38 (lines=8) @@
28
	 * @return bool
29
	 * @since 1.8.0
30
	 */
31
	public function canComment($user_guid = 0) {
32
		$result = parent::canComment($user_guid);
33
		if ($result == false) {
34
			return $result;
35
		}
36
37
		return false;
38
	}
39
40
}
41