app/maguttiCms/Tools/FileHelper.php
/**
     * This method is used to detect the most frequent EOL in a string.
     *
     * @param $str
     *
     * @return string
     */
This method is used to detect the most frequent EOL in a string.
@param $str

@return string
This method is used to detect the most frequent EOL in a string . @param $str @return string
public static function detectStringEOL($str): string
    {
        $eolTypes = EOLTypes::toArray();
        $mostFrequentCount = 0;
        $mostFrequentType = '';
        foreach ($eolTypes as $type) {
            if (($count = substr_count($str, $type)) > $mostFrequentCount) {
                $mostFrequentCount = $count;
                $mostFrequentType = $type;
            }
        }
        return $mostFrequentType;
    }
public static function detectStringEOL ( $ str ) : string { $ eolTypes = EOLTypes :: toArray ( ) ; $ mostFrequentCount = 0 ; $ mostFrequentType = '' ; foreach ( $ eolTypes as $ type ) { if ( ( $ count = substr_count ( $ str , $ type ) ) > $ mostFrequentCount ) { $ mostFrequentCount = $ count ; $ mostFrequentType = $ type ; } } return $ mostFrequentType ; }
This method is used to detect the most frequent EOL in a string.
This method is used to detect the most frequent EOL in a string .
// This is the most frequent EOL.