Code Duplication    Length = 14-14 lines in 2 locations

app/src/Comment/CommentsInSession.php 1 location

@@ 46-59 (lines=14) @@
43
     * @return String containing either just a URL or a complete image tag
44
     * @source http://gravatar.com/site/implement/images/php/
45
     */
46
    private function getGravatar($email, $s = 80, $d = 'mm', $r = 'g', $img = false, $atts = array())
47
    {
48
        $url = 'http://www.gravatar.com/avatar/';
49
        $url .= md5(strtolower(trim($email)));
50
        $url .= "?s=$s&d=$d&r=$r";
51
        if ($img) {
52
            $url = '<img src="' . $url . '"';
53
            foreach ($atts as $key => $val) {
54
                $url .= ' ' . $key . '="' . $val . '"';
55
            }
56
            $url .= ' />';
57
        }
58
        return $url;
59
    }
60
61
    /**
62
     * Find and return all comments within the page comment flow.

app/src/CommentDb/CommentsInDb.php 1 location

@@ 103-116 (lines=14) @@
100
     * @return String containing either just a URL or a complete image tag
101
     * @source http://gravatar.com/site/implement/images/php/
102
     */
103
    private function getGravatar($email, $s = 80, $d = 'mm', $r = 'g', $img = false, $atts = array())
104
    {
105
        $url = 'http://www.gravatar.com/avatar/';
106
        $url .= md5(strtolower(trim($email)));
107
        $url .= "?s=$s&d=$d&r=$r";
108
        if ($img) {
109
            $url = '<img src="' . $url . '"';
110
            foreach ($atts as $key => $val) {
111
                $url .= ' ' . $key . '="' . $val . '"';
112
            }
113
            $url .= ' />';
114
        }
115
        return $url;
116
    }
117
118
    /**
119
     * Find and return all comments in complete database.