src/Util/Strings.php
public static function normalizeNewLines(string $s): string
    {
        if (\strpos($s, "\r") === false) {
            return $s;
        }

        return \str_replace(["\r\n", "\r"], "\n", $s);
    }
public static function normalizeNewLines(string $s): string
    {
        if (\strpos($s, "\r") === false) {
            return $s;
        }

        return \str_replace(["\r\n", "\r"], "\n", $s);
    }
public static function normalizeNewLines ( string $ s ) : string { if ( \ strpos ( $ s , "\r" ) === false ) { return $ s ; } return \ str_replace ( [ "\r\n" , "\r" ] , "\n" , $ s ) ; }
Standardize line endings to unix-like.

@param  string $s UTF-8 encoding or 8-bit

@return string
Standardize line endings to unix - like .