Skip to content

Commit f86e4b2

Browse files
authored
Merge pull request #56 from collecthor/fix/fix-multiple-choice-parser
fix: use the correct way to generate the name of multiple choice questions
2 parents 4d46f60 + 668a3d3 commit f86e4b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Parsers/MultipleChoiceQuestionParser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Collecthor\SurveyjsParser\SurveyConfiguration;
1010
use Collecthor\SurveyjsParser\Values\StringValueOption;
1111
use Collecthor\SurveyjsParser\Variables\MultipleChoiceVariable;
12+
use function implode;
1213

1314
final class MultipleChoiceQuestionParser implements ElementParserInterface
1415
{
@@ -18,7 +19,7 @@ public function parse(ElementParserInterface $root, array $questionConfig, Surve
1819
{
1920
$dataPath = [...$dataPrefix, $this->extractValueName($questionConfig)];
2021

21-
$name = $this->extractName($questionConfig);
22+
$name = implode(".", $dataPath);
2223

2324
$titles = $this->extractTitles($questionConfig);
2425

0 commit comments

Comments
 (0)