Code Duplication    Length = 25-25 lines in 6 locations

src/cli/Database/Map/ChannelTableMap.php 1 location

@@ 266-290 (lines=25) @@
263
     * @throws PropelException Any exceptions caught during processing will be
264
     *                         rethrown wrapped into a PropelException.
265
     */
266
    public static function populateObjects(DataFetcherInterface $dataFetcher)
267
    {
268
        $results = array();
269
270
        // set the class once to avoid overhead in the loop
271
        $cls = static::getOMClass(false);
272
        // populate the object(s)
273
        while ($row = $dataFetcher->fetch()) {
274
            $key = ChannelTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
275
            if (null !== ($obj = ChannelTableMap::getInstanceFromPool($key))) {
276
                // We no longer rehydrate the object, since this can cause data loss.
277
                // See http://www.propelorm.org/ticket/509
278
                // $obj->hydrate($row, 0, true); // rehydrate
279
                $results[] = $obj;
280
            } else {
281
                /** @var Channel $obj */
282
                $obj = new $cls();
283
                $obj->hydrate($row);
284
                $results[] = $obj;
285
                ChannelTableMap::addInstanceToPool($obj, $key);
286
            } // if key exists
287
        }
288
289
        return $results;
290
    }
291
    /**
292
     * Add all the columns needed to create a new object.
293
     *

src/cli/Database/Map/ConnectionTableMap.php 1 location

@@ 284-308 (lines=25) @@
281
     * @throws PropelException Any exceptions caught during processing will be
282
     *                         rethrown wrapped into a PropelException.
283
     */
284
    public static function populateObjects(DataFetcherInterface $dataFetcher)
285
    {
286
        $results = array();
287
288
        // set the class once to avoid overhead in the loop
289
        $cls = static::getOMClass(false);
290
        // populate the object(s)
291
        while ($row = $dataFetcher->fetch()) {
292
            $key = ConnectionTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
293
            if (null !== ($obj = ConnectionTableMap::getInstanceFromPool($key))) {
294
                // We no longer rehydrate the object, since this can cause data loss.
295
                // See http://www.propelorm.org/ticket/509
296
                // $obj->hydrate($row, 0, true); // rehydrate
297
                $results[] = $obj;
298
            } else {
299
                /** @var Connection $obj */
300
                $obj = new $cls();
301
                $obj->hydrate($row);
302
                $results[] = $obj;
303
                ConnectionTableMap::addInstanceToPool($obj, $key);
304
            } // if key exists
305
        }
306
307
        return $results;
308
    }
309
    /**
310
     * Add all the columns needed to create a new object.
311
     *

src/cli/Database/Map/UserTableMap.php 1 location

@@ 273-297 (lines=25) @@
270
     * @throws PropelException Any exceptions caught during processing will be
271
     *                         rethrown wrapped into a PropelException.
272
     */
273
    public static function populateObjects(DataFetcherInterface $dataFetcher)
274
    {
275
        $results = array();
276
277
        // set the class once to avoid overhead in the loop
278
        $cls = static::getOMClass(false);
279
        // populate the object(s)
280
        while ($row = $dataFetcher->fetch()) {
281
            $key = UserTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
282
            if (null !== ($obj = UserTableMap::getInstanceFromPool($key))) {
283
                // We no longer rehydrate the object, since this can cause data loss.
284
                // See http://www.propelorm.org/ticket/509
285
                // $obj->hydrate($row, 0, true); // rehydrate
286
                $results[] = $obj;
287
            } else {
288
                /** @var User $obj */
289
                $obj = new $cls();
290
                $obj->hydrate($row);
291
                $results[] = $obj;
292
                UserTableMap::addInstanceToPool($obj, $key);
293
            } // if key exists
294
        }
295
296
        return $results;
297
    }
298
    /**
299
     * Add all the columns needed to create a new object.
300
     *

src/cli/Database/Map/InputTableMap.php 1 location

@@ 290-314 (lines=25) @@
287
     * @throws PropelException Any exceptions caught during processing will be
288
     *                         rethrown wrapped into a PropelException.
289
     */
290
    public static function populateObjects(DataFetcherInterface $dataFetcher)
291
    {
292
        $results = array();
293
294
        // set the class once to avoid overhead in the loop
295
        $cls = static::getOMClass(false);
296
        // populate the object(s)
297
        while ($row = $dataFetcher->fetch()) {
298
            $key = InputTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
299
            if (null !== ($obj = InputTableMap::getInstanceFromPool($key))) {
300
                // We no longer rehydrate the object, since this can cause data loss.
301
                // See http://www.propelorm.org/ticket/509
302
                // $obj->hydrate($row, 0, true); // rehydrate
303
                $results[] = $obj;
304
            } else {
305
                /** @var Input $obj */
306
                $obj = new $cls();
307
                $obj->hydrate($row);
308
                $results[] = $obj;
309
                InputTableMap::addInstanceToPool($obj, $key);
310
            } // if key exists
311
        }
312
313
        return $results;
314
    }
315
    /**
316
     * Add all the columns needed to create a new object.
317
     *

src/cli/Database/Map/InstanceTableMap.php 1 location

@@ 275-299 (lines=25) @@
272
     * @throws PropelException Any exceptions caught during processing will be
273
     *                         rethrown wrapped into a PropelException.
274
     */
275
    public static function populateObjects(DataFetcherInterface $dataFetcher)
276
    {
277
        $results = array();
278
279
        // set the class once to avoid overhead in the loop
280
        $cls = static::getOMClass(false);
281
        // populate the object(s)
282
        while ($row = $dataFetcher->fetch()) {
283
            $key = InstanceTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
284
            if (null !== ($obj = InstanceTableMap::getInstanceFromPool($key))) {
285
                // We no longer rehydrate the object, since this can cause data loss.
286
                // See http://www.propelorm.org/ticket/509
287
                // $obj->hydrate($row, 0, true); // rehydrate
288
                $results[] = $obj;
289
            } else {
290
                /** @var Instance $obj */
291
                $obj = new $cls();
292
                $obj->hydrate($row);
293
                $results[] = $obj;
294
                InstanceTableMap::addInstanceToPool($obj, $key);
295
            } // if key exists
296
        }
297
298
        return $results;
299
    }
300
    /**
301
     * Add all the columns needed to create a new object.
302
     *

src/cli/Database/Map/SubscriptionTableMap.php 1 location

@@ 322-346 (lines=25) @@
319
     * @throws PropelException Any exceptions caught during processing will be
320
     *                         rethrown wrapped into a PropelException.
321
     */
322
    public static function populateObjects(DataFetcherInterface $dataFetcher)
323
    {
324
        $results = array();
325
326
        // set the class once to avoid overhead in the loop
327
        $cls = static::getOMClass(false);
328
        // populate the object(s)
329
        while ($row = $dataFetcher->fetch()) {
330
            $key = SubscriptionTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
331
            if (null !== ($obj = SubscriptionTableMap::getInstanceFromPool($key))) {
332
                // We no longer rehydrate the object, since this can cause data loss.
333
                // See http://www.propelorm.org/ticket/509
334
                // $obj->hydrate($row, 0, true); // rehydrate
335
                $results[] = $obj;
336
            } else {
337
                /** @var Subscription $obj */
338
                $obj = new $cls();
339
                $obj->hydrate($row);
340
                $results[] = $obj;
341
                SubscriptionTableMap::addInstanceToPool($obj, $key);
342
            } // if key exists
343
        }
344
345
        return $results;
346
    }
347
    /**
348
     * Add all the columns needed to create a new object.
349
     *