diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 014ab3d1d9..90796e988f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -17355,11 +17355,6 @@ parameters: count: 1 path: src/Server/SysInfo/SunOs.php - - - message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#" - count: 1 - path: src/Server/SysInfo/SysInfo.php - - message: "#^Class COM referenced with incorrect case\\: com\\.$#" count: 1 diff --git a/src/Server/SysInfo/SysInfo.php b/src/Server/SysInfo/SysInfo.php index ee30929a4c..ae0e277424 100644 --- a/src/Server/SysInfo/SysInfo.php +++ b/src/Server/SysInfo/SysInfo.php @@ -28,9 +28,8 @@ class SysInfo public static function getOs(string $phpOs = PHP_OS): string { // look for common UNIX-like systems - $unixLike = ['FreeBSD', 'DragonFly']; - if (in_array($phpOs, $unixLike)) { - $phpOs = 'Linux'; + if (in_array($phpOs, ['FreeBSD', 'DragonFly'], true)) { + return 'Linux'; } return ucfirst($phpOs);