/** * @return \Gumer\PSN\Authentication\UserInterface * @throws \RuntimeException */ public function user() { if (!$this->user) { if (!($user = $this->manager->user())) { throw new RuntimeException('The request object requires a valid user instance for the request to be authenticated.'); } $this->user = $user; } return $this->user; }