<?php

namespace PerFi\PerFiBundle\Repository;

use Doctrine\ORM\EntityRepository;
use PerFi\Domain\Account\Account;
use PerFi\Domain\Account\AccountRepository as AccountRepositoryInterface;

/**
 * AccountRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class AccountRepository extends EntityRepository
    implements AccountRepositoryInterface
{
    public function add(Account $account)
    {
    }

    public function getAll() : array
    {
        return [];
    }
}

<?php

namespace PerFi\PerFiBundle\Repository;

use Doctrine\ORM\EntityRepository;
use PerFi\Domain\Account\Account;
use PerFi\Domain\Account\AccountRepository as AccountRepositoryInterface;
use PerFi\PerFiBundle\Entity;

/**
 * AccountRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class AccountRepository extends EntityRepository
    implements AccountRepositoryInterface
{
    public function add(Account $account)
    {
        $entity = new Entity\Account();
        $entity->setAccountId((string) $account->id());

        $em = $this->getEntityManager();
        $em->persist($entity);
        $em->flush();
    }

    public function getAll() : array
    {
        return [];
    }
}

Save account entity to the database
Save account entity to the database
