Gets the maximum number of attempts.
Null means an unlimited number of attempts.
public function getMaxAttempts() : ?int { return $this->attempts; }