public function readSynonymsFromCommaSeparatedArray(array $synonymsAsCommaSeparatedArray): array
    {
        return array_filter(array_map(function (string $line) {
            if (empty($line)) {
                return false;
            }

            $words = explode(',', $line);

            if (count($words) <= 1) {
                return false;
            }

            return Synonym::createByWords($words);
        }, $synonymsAsCommaSeparatedArray));
    }
public function readSynonymsFromCommaSeparatedArray(array $synonymsAsCommaSeparatedArray): array
    {
        return array_filter(array_map(function (string $line) {
            if (empty($line)) {
                return false;
            }

            $words = explode(',', $line);

            if (count($words) <= 1) {
                return false;
            }

            return Synonym::createByWords($words);
        }, $synonymsAsCommaSeparatedArray));
    }
public function readSynonymsFromCommaSeparatedArray ( array $ synonymsAsCommaSeparatedArray ) : array { return array_filter ( array_map ( function ( string $ line ) { if ( empty ( $ line ) ) { return false ; } $ words = explode ( ',' , $ line ) ; if ( count ( $ words ) <= 1 ) { return false ; } return Synonym :: createByWords ( $ words ) ; } , $ synonymsAsCommaSeparatedArray ) ) ; }
Read synonyms from comma separated array.

@param array $synonymsAsCommaSeparatedArray

@return Synonym[]
Read synonyms from comma separated array .