@@ 63-69 (lines=7) @@ | ||
60 | { |
|
61 | $em = $this->getDoctrine()->getManager(); |
|
62 | $answers = $em->getRepository(SurveyAnswer::class)->findAnswersBySurvey($survey); |
|
63 | if ($answers) { |
|
64 | foreach ($answers as $answer) { |
|
65 | $questions[] = $answer->getQuestion()->getId(); |
|
66 | $contents[] = $answer->getContent(); |
|
67 | } |
|
68 | $questionAnswer = array_combine($questions, $contents); |
|
69 | } |
|
70 | if (!$answers) { |
|
71 | $questionAnswer = null; |
|
72 | } |
|
@@ 113-119 (lines=7) @@ | ||
110 | { |
|
111 | $em = $this->getDoctrine()->getManager(); |
|
112 | $answers = $em->getRepository(SurveyAnswer::class)->findAnswersBySurvey($survey); |
|
113 | if ($answers) { |
|
114 | foreach ($answers as $answer) { |
|
115 | $questions[] = $answer->getQuestion()->getId(); |
|
116 | $contents[] = $answer->getContent(); |
|
117 | } |
|
118 | $questionAnswer = array_combine($questions, $contents); |
|
119 | } |
|
120 | if (!$answers) { |
|
121 | $questionAnswer = null; |
|
122 | } |