private function getSelectedAssociativeChoices(array $answers) : array
    {
        $selectedChoices = [];

        foreach ($answers as $answer) {
            if (array_key_exists($answer, $this->choices)) {
                $selectedChoices[] = $this->choices[$answer];
            }
        }

        return $selectedChoices;
    }
private function getSelectedAssociativeChoices(array $answers) : array
    {
        $selectedChoices = [];

        foreach ($answers as $answer) {
            if (array_key_exists($answer, $this->choices)) {
                $selectedChoices[] = $this->choices[$answer];
            }
        }

        return $selectedChoices;
    }
private function getSelectedAssociativeChoices ( array $ answers ) : array { $ selectedChoices = [ ] ; foreach ( $ answers as $ answer ) { if ( array_key_exists ( $ answer , $ this -> choices ) ) { $ selectedChoices [ ] = $ this -> choices [ $ answer ] ; } } return $ selectedChoices ; }
Gets the list of selected associative choices from a list of answers

@param array $answers The list of answers
@return array The list of selected choices
Gets the list of selected associative choices from a list of answers