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