src/ChrisKonnertz/DeepLy/ResponseBag/TranslationBag.php
public function getTranslationAlternatives()
    {
        if (sizeof($this->responseContent->translations) === 0) {
            return [];
        }

        if (sizeof($this->responseContent->translations) > 1) {
            throw new \LogicException('This method does not operate on more than one source text', 290);
        }

        $beams = $this->responseContent->translations[0]->beams;

        $translationAlternatives = [];
        foreach ($beams as $beam) {
            $translationAlternatives[] = $beam->postprocessed_sentence;
        }

        return $translationAlternatives;
    }
public function getTranslationAlternatives()
    {
        if (sizeof($this->responseContent->translations) === 0) {
            return [];
        }

        if (sizeof($this->responseContent->translations) > 1) {
            throw new \LogicException('This method does not operate on more than one source text', 290);
        }

        $beams = $this->responseContent->translations[0]->beams;

        $translationAlternatives = [];
        foreach ($beams as $beam) {
            $translationAlternatives[] = $beam->postprocessed_sentence;
        }

        return $translationAlternatives;
    }
Returns the translation alternatives for a single translation / sentence
as a string array. Might return an empty array.

@return string[]