Code Duplication    Length = 23-23 lines in 2 locations

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

@@ 413-435 (lines=23) @@
410
     * @return int             next starting column
411
     * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
412
     */
413
    public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
414
    {
415
        try {
416
417
            $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : PageLinkProductTableMap::translateFieldName('LinkId', TableMap::TYPE_PHPNAME, $indexType)];
418
            $this->link_id = (null !== $col) ? (int) $col : null;
419
420
            $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : PageLinkProductTableMap::translateFieldName('ProductId', TableMap::TYPE_PHPNAME, $indexType)];
421
            $this->product_id = (null !== $col) ? (int) $col : null;
422
            $this->resetModified();
423
424
            $this->setNew(false);
425
426
            if ($rehydrate) {
427
                $this->ensureConsistency();
428
            }
429
430
            return $startcol + 2; // 2 = PageLinkProductTableMap::NUM_HYDRATE_COLUMNS.
431
432
        } catch (Exception $e) {
433
            throw new PropelException(sprintf('Error populating %s object', '\\mod_link\\models\\PageLinkProduct'), 0, $e);
434
        }
435
    }
436
437
    /**
438
     * Checks and repairs the internal consistency of the object.

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

@@ 413-435 (lines=23) @@
410
     * @return int             next starting column
411
     * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
412
     */
413
    public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
414
    {
415
        try {
416
417
            $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : PageLinkProductsTableMap::translateFieldName('LinkId', TableMap::TYPE_PHPNAME, $indexType)];
418
            $this->link_id = (null !== $col) ? (int) $col : null;
419
420
            $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : PageLinkProductsTableMap::translateFieldName('ProductId', TableMap::TYPE_PHPNAME, $indexType)];
421
            $this->product_id = (null !== $col) ? (int) $col : null;
422
            $this->resetModified();
423
424
            $this->setNew(false);
425
426
            if ($rehydrate) {
427
                $this->ensureConsistency();
428
            }
429
430
            return $startcol + 2; // 2 = PageLinkProductsTableMap::NUM_HYDRATE_COLUMNS.
431
432
        } catch (Exception $e) {
433
            throw new PropelException(sprintf('Error populating %s object', '\\mod_link\\models\\PageLinkProducts'), 0, $e);
434
        }
435
    }
436
437
    /**
438
     * Checks and repairs the internal consistency of the object.