public static function exportSynonymsToTxt(array $synonyms) : string
    {
        if (empty($synonyms)) {
            throw new \InvalidArgumentException('Nothing to export!', 1502978329);
        }

        $contentLines = '';
        foreach ($synonyms as $synonymBaseWord => $synonymWords) {
            $contentLines .= $synonymBaseWord . ' => ' . implode(',', $synonymWords) . PHP_EOL;
        }
        return rtrim($contentLines);
    }
public static function exportSynonymsToTxt(array $synonyms) : string
    {
        if (empty($synonyms)) {
            throw new \InvalidArgumentException('Nothing to export!', 1502978329);
        }

        $contentLines = '';
        foreach ($synonyms as $synonymBaseWord => $synonymWords) {
            $contentLines .= $synonymBaseWord . ' => ' . implode(',', $synonymWords) . PHP_EOL;
        }
        return rtrim($contentLines);
    }
public static function exportSynonymsToTxt ( array $ synonyms ) : string { if ( empty ( $ synonyms ) ) { throw new \ InvalidArgumentException ( 'Nothing to export!' , 1502978329 ) ; } $ contentLines = '' ; foreach ( $ synonyms as $ synonymBaseWord => $ synonymWords ) { $ contentLines .= $ synonymBaseWord . ' => ' . implode ( ',' , $ synonymWords ) . PHP_EOL ; } return rtrim ( $ contentLines ) ; }
Export synonyms in plain text format
@param array $synonyms
@return string
Export synonyms in plain text format