addArgument( 'username', InputArgument::OPTIONAL, 'User to send the notification to' ) ; } /** * Fetches a user from its username. * * @param string $username * * @return \Wallabag\UserBundle\Entity\User */ protected function getUser($username) { return $this->getDoctrine()->getRepository('WallabagUserBundle:User')->findOneByUserName($username); } protected function getDoctrine() { return $this->getContainer()->get('doctrine'); } }