/** * @param DataMapper $mapper * @return Account * @throws \Doctrine\ORM\NoResultException */ public function getAccount(DataMapper $mapper) { $this->assert($mapper->getEntityClass() == Account::class); return $mapper->one(1); }