Code Duplication    Length = 11-13 lines in 2 locations

code/model/Blog.php 1 location

@@ 204-214 (lines=11) @@
201
     *
202
     * @return bool
203
     */
204
    protected function isMemberOf($member, $relation)
205
    {
206
        if (!$member || !$member->exists()) {
207
            return false;
208
        }
209
210
        if ($relation instanceof UnsavedRelationList) {
211
            return in_array($member->ID, $relation->getIDList());
212
        }
213
214
        return $relation->byID($member->ID) !== null;
215
    }
216
217
    /**

code/model/BlogPost.php 1 location

@@ 154-166 (lines=13) @@
151
     *
152
     * @return bool
153
     */
154
    public function isAuthor($member = null)
155
    {
156
        if (!$member || !$member->exists()) {
157
            return false;
158
        }
159
160
        $list = $this->Authors();
161
162
        if ($list instanceof UnsavedRelationList) {
163
            return in_array($member->ID, $list->getIDList());
164
        }
165
166
        return $list->byID($member->ID) !== null;
167
    }
168
169
    /**