diff --git a/src/MobileDetect.php b/src/MobileDetect.php index 0922a840..9336e9de 100644 --- a/src/MobileDetect.php +++ b/src/MobileDetect.php @@ -919,7 +919,7 @@ public function getHttpHeader(string $header): ?string public function getMobileHeaders(): array { - return self::$mobileHeaders; + return static::$mobileHeaders; } /** @@ -930,7 +930,7 @@ public function getMobileHeaders(): array */ public function getUaHttpHeaders(): array { - return self::$uaHttpHeaders; + return static::$uaHttpHeaders; } @@ -1046,7 +1046,7 @@ public function getMatchesArray(): ?array */ public static function getPhoneDevices(): array { - return self::$phoneDevices; + return static::$phoneDevices; } /** @@ -1056,7 +1056,7 @@ public static function getPhoneDevices(): array */ public static function getTabletDevices(): array { - return self::$tabletDevices; + return static::$tabletDevices; } /** @@ -1066,7 +1066,7 @@ public static function getTabletDevices(): array */ public static function getUserAgents(): array { - return self::getBrowsers(); + return static::getBrowsers(); } /** @@ -1076,7 +1076,7 @@ public static function getUserAgents(): array */ public static function getBrowsers(): array { - return self::$browsers; + return static::$browsers; } /** @@ -1091,10 +1091,10 @@ public function getRules(): array if (!$rules) { $rules = array_merge( - self::$phoneDevices, - self::$tabletDevices, - self::$operatingSystems, - self::$browsers + static::$phoneDevices, + static::$tabletDevices, + static::$operatingSystems, + static::$browsers ); } @@ -1108,7 +1108,7 @@ public function getRules(): array */ public static function getOperatingSystems(): array { - return self::$operatingSystems; + return static::$operatingSystems; } /** @@ -1267,7 +1267,7 @@ public function isTablet(string $userAgent = null, array $httpHeaders = null): b } } - foreach (self::$tabletDevices as $_regex) { + foreach (static::$tabletDevices as $_regex) { if ($this->match($_regex, $userAgent)) { return true; } @@ -1342,7 +1342,7 @@ public function match(string $regex, string $userAgent = null): bool */ public static function getProperties(): array { - return self::$properties; + return static::$properties; } /**