| @@ 78-84 (lines=7) @@ | ||
| 75 |     { | |
| 76 | $em = $this->getDoctrine()->getManager(); | |
| 77 | $answers = $em->getRepository(SurveyAnswer::class)->findAnswersBySurvey($survey); | |
| 78 |         if ($answers) { | |
| 79 |             foreach ($answers as $answer) { | |
| 80 | $questions[] = $answer->getQuestion()->getId(); | |
| 81 | $contents[] = $answer->getContent(); | |
| 82 | } | |
| 83 | $questionAnswer = array_combine($questions, $contents); | |
| 84 | } | |
| 85 |         if (!$answers) { | |
| 86 | $questionAnswer = null; | |
| 87 | } | |
| @@ 128-134 (lines=7) @@ | ||
| 125 |     { | |
| 126 | $em = $this->getDoctrine()->getManager(); | |
| 127 | $answers = $em->getRepository(SurveyAnswer::class)->findAnswersBySurvey($survey); | |
| 128 |         if ($answers) { | |
| 129 |             foreach ($answers as $answer) { | |
| 130 | $questions[] = $answer->getQuestion()->getId(); | |
| 131 | $contents[] = $answer->getContent(); | |
| 132 | } | |
| 133 | $questionAnswer = array_combine($questions, $contents); | |
| 134 | } | |
| 135 |         if (!$answers) { | |
| 136 | $questionAnswer = null; | |
| 137 | } | |