Code Duplication    Length = 13-13 lines in 2 locations

class/CategoryHandler.php 1 location

@@ 65-77 (lines=13) @@
62
     * @param  bool        $force
63
     * @return mixed
64
     */
65
    public function insert(\XoopsObject $category, $force = true)
66
    {
67
        $className = 'Category';
68
        if (!($category instanceof $className)) {
69
            return false;
70
        }
71
        parent::insert($category, $force);
72
        if ($category->isNew()) {
73
            $this->applyPermissionTemplate($category);
74
        }
75
76
        return $category->getVar('cat_id');
77
    }
78
79
    /**
80
     * @param \XoopsObject $category

class/ForumHandler.php 1 location

@@ 44-56 (lines=13) @@
41
     * @internal param \XoopsObject $forum
42
     */
43
44
    public function insert(\XoopsObject $object, $force = true) //insert($forum)
45
    {
46
        $forum = $object;
47
        if (!parent::insert($forum, true)) {
48
            return false;
49
        }
50
51
        if ($forum->isNew()) {
52
            $this->applyPermissionTemplate($forum);
53
        }
54
55
        return $forum->getVar('forum_id');
56
    }
57
58
    /**
59
     * @param \XoopsObject $forum