/** * @param Uuid $id * @return User * @throws AggregateNotFoundException */ public function findById(Uuid $id) { $events = $this->storage->getEventsForAggregate($id); $user = new User($id); $user->loadFromHistory($events); return $user; }