Code Duplication    Length = 9-11 lines in 2 locations

htdocs/Frameworks/art/object.php 1 location

@@ 119-129 (lines=11) @@
116
     *
117
     * @return mixed
118
     */
119
    public function insert(XoopsObject $object, $force = true)
120
    {
121
        if (!($object instanceof $this->className)) {
122
            return false;
123
        }
124
        if ($ret = parent::insert($object, $force)) {
125
            $object->unsetNew();
126
        }
127
128
        return $ret;
129
    }
130
}
131
//endif;
132

htdocs/modules/system/class/block.php 1 location

@@ 318-326 (lines=9) @@
315
     *
316
     * @return int|bool object id on success, otherwise false
317
     */
318
    public function insert(XoopsObject $obj, $force = true)
319
    {
320
        if (!($obj instanceof $this->className)) {
321
            return false;
322
        }
323
        $obj->setVar('last_modified', time());
324
325
        return parent::insert($obj, $force);
326
    }
327
328
    /**
329
     * retrieve array of {@link XoopsBlock}s meeting certain conditions