Code Duplication    Length = 11-11 lines in 2 locations

application/modules/mod_link/models/Base/PageLinkProduct.php 1 location

@@ 839-849 (lines=11) @@
836
     * @param      string $keyType The type of keys the array uses.
837
     * @return void
838
     */
839
    public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
840
    {
841
        $keys = PageLinkProductTableMap::getFieldNames($keyType);
842
843
        if (array_key_exists($keys[0], $arr)) {
844
            $this->setLinkId($arr[$keys[0]]);
845
        }
846
        if (array_key_exists($keys[1], $arr)) {
847
            $this->setProductId($arr[$keys[1]]);
848
        }
849
    }
850
851
     /**
852
     * Populate the current object from a string, using a given parser format

application/modules/mod_link/models/Base/PageLinkProducts.php 1 location

@@ 839-849 (lines=11) @@
836
     * @param      string $keyType The type of keys the array uses.
837
     * @return void
838
     */
839
    public function fromArray($arr, $keyType = TableMap::TYPE_PHPNAME)
840
    {
841
        $keys = PageLinkProductsTableMap::getFieldNames($keyType);
842
843
        if (array_key_exists($keys[0], $arr)) {
844
            $this->setLinkId($arr[$keys[0]]);
845
        }
846
        if (array_key_exists($keys[1], $arr)) {
847
            $this->setProductId($arr[$keys[1]]);
848
        }
849
    }
850
851
     /**
852
     * Populate the current object from a string, using a given parser format