Code Duplication    Length = 26-26 lines in 2 locations

src/cli/Database/Base/Channel.php 1 location

@@ 466-491 (lines=26) @@
463
     * @return int             next starting column
464
     * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
465
     */
466
    public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
467
    {
468
        try {
469
470
            $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : ChannelTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
471
            $this->id = (null !== $col) ? (int) $col : null;
472
473
            $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ChannelTableMap::translateFieldName('InstanceName', TableMap::TYPE_PHPNAME, $indexType)];
474
            $this->instance_name = (null !== $col) ? (string) $col : null;
475
476
            $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ChannelTableMap::translateFieldName('Name', TableMap::TYPE_PHPNAME, $indexType)];
477
            $this->name = (null !== $col) ? (string) $col : null;
478
            $this->resetModified();
479
480
            $this->setNew(false);
481
482
            if ($rehydrate) {
483
                $this->ensureConsistency();
484
            }
485
486
            return $startcol + 3; // 3 = ChannelTableMap::NUM_HYDRATE_COLUMNS.
487
488
        } catch (Exception $e) {
489
            throw new PropelException(sprintf('Error populating %s object', '\\Jalle19\\StatusManager\\Database\\Channel'), 0, $e);
490
        }
491
    }
492
493
    /**
494
     * Checks and repairs the internal consistency of the object.

src/cli/Database/Base/User.php 1 location

@@ 481-506 (lines=26) @@
478
     * @return int             next starting column
479
     * @throws PropelException - Any caught Exception will be rewrapped as a PropelException.
480
     */
481
    public function hydrate($row, $startcol = 0, $rehydrate = false, $indexType = TableMap::TYPE_NUM)
482
    {
483
        try {
484
485
            $col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : UserTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
486
            $this->id = (null !== $col) ? (int) $col : null;
487
488
            $col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : UserTableMap::translateFieldName('InstanceName', TableMap::TYPE_PHPNAME, $indexType)];
489
            $this->instance_name = (null !== $col) ? (string) $col : null;
490
491
            $col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : UserTableMap::translateFieldName('Name', TableMap::TYPE_PHPNAME, $indexType)];
492
            $this->name = (null !== $col) ? (string) $col : null;
493
            $this->resetModified();
494
495
            $this->setNew(false);
496
497
            if ($rehydrate) {
498
                $this->ensureConsistency();
499
            }
500
501
            return $startcol + 3; // 3 = UserTableMap::NUM_HYDRATE_COLUMNS.
502
503
        } catch (Exception $e) {
504
            throw new PropelException(sprintf('Error populating %s object', '\\Jalle19\\StatusManager\\Database\\User'), 0, $e);
505
        }
506
    }
507
508
    /**
509
     * Checks and repairs the internal consistency of the object.