Code Duplication    Length = 25-25 lines in 3 locations

app/Models/Task/Map/TaskTableMap.php 1 location

@@ 252-276 (lines=25) @@
249
     * @throws PropelException Any exceptions caught during processing will be
250
     *                         rethrown wrapped into a PropelException.
251
     */
252
    public static function populateObjects(DataFetcherInterface $dataFetcher)
253
    {
254
        $results = array();
255
256
        // set the class once to avoid overhead in the loop
257
        $cls = static::getOMClass(false);
258
        // populate the object(s)
259
        while ($row = $dataFetcher->fetch()) {
260
            $key = TaskTableMap::getPrimaryKeyHashFromRow($row, 0, $dataFetcher->getIndexType());
261
            if (null !== ($obj = TaskTableMap::getInstanceFromPool($key))) {
262
                // We no longer rehydrate the object, since this can cause data loss.
263
                // See http://www.propelorm.org/ticket/509
264
                // $obj->hydrate($row, 0, true); // rehydrate
265
                $results[] = $obj;
266
            } else {
267
                /** @var Task $obj */
268
                $obj = new $cls();
269
                $obj->hydrate($row);
270
                $results[] = $obj;
271
                TaskTableMap::addInstanceToPool($obj, $key);
272
            } // if key exists
273
        }
274
275
        return $results;
276
    }
277
    /**
278
     * Add all the columns needed to create a new object.
279
     *

app/Models/User/Map/UserTableMap.php 1 location

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

packages/Price/Models/Selfprice/Map/SelfpriceTableMap.php 1 location

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