Skip to content

Commit

Permalink
Fix arg order
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Nov 6, 2024
1 parent de42bd0 commit 5ce8077
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Util/UserAgentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public function __construct(?string $userAgent)
$this->phpVersion = (strtolower($matches['engine']) === 'hhvm' ? 'hhvm-' : '') . $matches['php'];
$this->platformPhpVersion = null !== $matches['platform_php'] ? (strtolower($matches['engine']) === 'hhvm' ? 'hhvm-' : '') . $matches['platform_php'] : null;
$this->os = Preg::replace('{^cygwin_nt-.*}', 'cygwin', strtolower($matches['os']));
if (str_contains('microsoft', strtolower((string) $matches['osversion']))) { // likely WSL 1 e.g. version-Microsoft
if (str_contains(strtolower((string) $matches['osversion']), 'microsoft')) { // likely WSL 1 e.g. version-Microsoft
$this->os = 'wsl';
} elseif (str_contains('WSL', (string) $matches['osversion'])) { // likely WSL2 e.g. version-microsoft-standard-WSL2
} elseif (str_contains((string) $matches['osversion'], 'WSL')) { // likely WSL2 e.g. version-microsoft-standard-WSL2
$this->os = 'wsl';
}
$this->httpVersion = null !== $matches['http'] ? strtolower($matches['http']) : null;
Expand Down

0 comments on commit 5ce8077

Please sign in to comment.