Since $formats is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $formats to at least protected.
Loading history...
25
throw UnknownOtpFormat::createForName($name);
26
}
27
28
return static::$formats[$name];
29
}
30
31
public function register(FormatContract $format): void
Since $formats is declared private, accessing it with static will lead to errors in possible sub-classes; you can either use self, or increase the visibility of $formats to at least protected.