protected function createEntities($count = 1)
 {
     $entities = [];
     for ($i = 1; $i <= $count; $i++) {
         $entity = new StubEntity();
         $entity->setId($i);
         $entity->setName('name-' . $i);
         $entities[] = $entity;
     }
     return $entities;
 }
 protected function createEntities($count = 1)
 {
     $entities = array();
     for ($i = 0; $i < $count; $i++) {
         $entity = new StubEntity();
         $entity->setId($i);
         $entity->setName('name-' . $i);
         $entities[] = array('id' => $i, 'entity' => $entity);
     }
     return $entities;
 }