Code Duplication    Length = 12-12 lines in 2 locations

src/Model/Blog.php 1 location

@@ 215-226 (lines=12) @@
212
     *
213
     * @return null|Member
214
     */
215
    protected function getMember($member = null)
216
    {
217
        if (!$member) {
218
            $member = Security::getCurrentUser();
219
        }
220
221
        if (is_numeric($member)) {
222
            $member = Member::get()->byID($member);
223
        }
224
225
        return $member;
226
    }
227
228
    /**
229
     * Check if this member is an editor of the blog.

src/Model/BlogPost.php 1 location

@@ 389-400 (lines=12) @@
386
     *
387
     * @return null|Member
388
     */
389
    protected function getMember($member = null)
390
    {
391
        if (!$member) {
392
            $member = Security::getCurrentUser();
393
        }
394
395
        if (is_numeric($member)) {
396
            $member = Member::get()->byID($member);
397
        }
398
399
        return $member;
400
    }
401
402
    /**
403
     * Determine whether user can create new categories.