account = $account; parent::__construct($config); } public function agreeWithLatestRules() : bool { $account = $this->getAccount(); $account->rules_agreement_version = LATEST_RULES_VERSION; if (!$account->save()) { throw new ErrorException('Cannot set user rules version'); } return true; } public function getAccount() : Account { return $this->account; } }