src/Helper/System.php
public static function getOperatingSystem()
    {
        if (is_null(self::$operatingSystem)) {
            $name = strtolower(php_uname());
            $operatingSystem   = OS::UNKNOWN;
            if (strpos($name, 'darwin') !== false) {
                $operatingSystem = OS::DARWIN;
            } elseif (strpos($name, 'win') !== false) {
                $operatingSystem = OS::WINDOWS;
            } elseif (strpos($name, 'linux') !== false) {
                $operatingSystem = OS::LINUX;
            }
            self::$operatingSystem = new OS($operatingSystem);
        }


        return self::$operatingSystem;
    }
public static function getOperatingSystem()
    {
        if (is_null(self::$operatingSystem)) {
            $name = strtolower(php_uname());
            $operatingSystem   = OS::UNKNOWN;
            if (strpos($name, 'darwin') !== false) {
                $operatingSystem = OS::DARWIN;
            } elseif (strpos($name, 'win') !== false) {
                $operatingSystem = OS::WINDOWS;
            } elseif (strpos($name, 'linux') !== false) {
                $operatingSystem = OS::LINUX;
            }
            self::$operatingSystem = new OS($operatingSystem);
        }


        return self::$operatingSystem;
    }
Get the current operating system

@return OS