src/ActiveDoctrine/Entity/Entity.php
public static function create(Connection $connection, $amount = 0)
    {
        $entities = [];
        for ($i = 0; $i < (int) $amount; $i++) {
            $entities[] = new static($connection);
        }

        return static::newCollection($entities);
    }
public static function create(Connection $connection, $amount = 0)
    {
        $entities = [];
        for ($i = 0; $i < (int) $amount; $i++) {
            $entities[] = new static($connection);
        }

        return static::newCollection($entities);
    }
public static function create ( Connection $ connection , $ amount = 0 ) { $ entities = [ ] ; for ( $ i = 0 ; $ i < ( int ) $ amount ; $ i ++ ) { $ entities [ ] = new static ( $ connection ) ; } return static :: newCollection ( $ entities ) ; }
Create a new collection with an amount of empty entities.

@param Connection $connection A connection instance
@param int        $amount     The amount of new Entities to create
Create a new collection with an amount of empty entities .