public static function normalize(string $path) : string
    {
        if (strpos($path, 'data://') === 0) {
            return $path;
        }


        $path = self::stringReplaceIgnoringStreamWrapper(['\\', '/'], DIRECTORY_SEPARATOR, $path);

        $startOfPath = strpos($path, '://') === false ? 0 : strpos($path, '://') + strlen('://');

        while (strpos($path, DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, $startOfPath) !== false) {
            $path = self::stringReplaceIgnoringStreamWrapper(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path);
        }

        return $path;
    }
public static function normalize(string $path) : string
    {
        if (strpos($path, 'data://') === 0) {
            return $path;
        }


        $path = self::stringReplaceIgnoringStreamWrapper(['\\', '/'], DIRECTORY_SEPARATOR, $path);

        $startOfPath = strpos($path, '://') === false ? 0 : strpos($path, '://') + strlen('://');

        while (strpos($path, DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, $startOfPath) !== false) {
            $path = self::stringReplaceIgnoringStreamWrapper(DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $path);
        }

        return $path;
    }
public static function normalize ( string $ path ) : string { if ( strpos ( $ path , 'data://' ) === 0 ) { return $ path ; } $ path = self :: stringReplaceIgnoringStreamWrapper ( [ '\\' , '/' ] , DIRECTORY_SEPARATOR , $ path ) ; $ startOfPath = strpos ( $ path , '://' ) === false ? 0 : strpos ( $ path , '://' ) + strlen ( '://' ) ; while ( strpos ( $ path , DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR , $ startOfPath ) !== false ) { $ path = self :: stringReplaceIgnoringStreamWrapper ( DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR , DIRECTORY_SEPARATOR , $ path ) ; } return $ path ; }
Normalizes the supplied path

@param string $path

@return string
Normalizes the supplied path