Fix PHP8 error: Non-static method cannot be called statically

This commit is contained in:
Steffen Lange 2022-11-03 12:22:57 +01:00
parent 72df0c3510
commit 27f5363069

View file

@ -26,11 +26,11 @@ abstract class Bundesland {
const Schleswig_Holstein = 14;
const Thueringen = 15;
public function Count() {
public static function Count() {
return count(self::$Namen);
}
public function GetName(int $land, bool $code = false) {
public static function GetName(int $land, bool $code = false) {
if ($land >= 0 && $land < self::Count())
return ($code) ? self::$Namen[$land][1] : self::$Namen[$land][0];
else