Code Duplication    Length = 11-13 lines in 2 locations

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
    /**

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
    /**