Code Duplication    Length = 11-13 lines in 2 locations

code/model/Blog.php 1 location

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

code/model/BlogPost.php 1 location

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