Code Duplication    Length = 7-7 lines in 2 locations

main/inc/lib/AnnouncementEmail.php 2 locations

@@ 56-62 (lines=7) @@
53
     *
54
     * @return string|null
55
     */
56
    public function course($key = '')
57
    {
58
        $result = $key ? $this->course[$key] : $this->course;
59
        $result = $key == 'id' ? intval($result) : $result;
60
61
        return $result;
62
    }
63
64
    /**
65
     * Announcement info
@@ 70-76 (lines=7) @@
67
     * @param string $key
68
     * @return array
69
     */
70
    public function announcement($key = '')
71
    {
72
        $result = $key ? $this->announcement[$key] : $this->announcement;
73
        $result = $key == 'id' ? intval($result) : $result;
74
75
        return $result;
76
    }
77
78
    /**
79
     * Returns either all course users or all session users depending on whether