/** * Get User id * * @return string */ public function getUserId() { if ($this->user instanceof \Newscoop\Entity\User) { return $this->user->getId(); } return null; }
/** * Get user id * * @return int */ public function getUserId() { return $this->user !== null ? $this->user->getId() : null; }