Code Duplication    Length = 15-15 lines in 2 locations

app/module/Albums/One/Album.php 1 location

@@ 108-122 (lines=15) @@
105
     * 
106
     * @return string
107
     */
108
    public function author($type = '', $adder = true)
109
    {
110
        $author = $this->album['author'];
111
112
        // if fields is empty and $adder is true
113
        if (empty($author) and true === $adder) {
114
            $author = $this->adderFullName(false);
115
        }
116
117
        if ('raw' === $type) {
118
            return $author;
119
        }
120
121
        return Text::escape($author);
122
    }
123
124
    /**
125
     * Returns album date.

app/module/Articles/One/Article.php 1 location

@@ 181-195 (lines=15) @@
178
     * 
179
     * @return string
180
     */
181
    public function author($type = '', $adder = true)
182
    {
183
        $author = $this->article['author'];
184
185
        // if fields is empty and $adder is true
186
        if (empty($author) and true === $adder) {
187
            $author = $this->adderFullName(false);
188
        }
189
190
        if ('raw' === $type) {
191
            return $author;
192
        }
193
194
        return Text::escape($author);
195
    }
196
197
    /**
198
     * Returns article date.