public function __construct(User $user, $action, $token) { $this->user = $user; $this->action = (string) $action; $this->token = (string) $token; $this->created = new \DateTime(); }