Conditions | 3 |
Paths | 3 |
Total Lines | 23 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function produceReport(): array |
||
25 | { |
||
26 | $report = []; |
||
27 | $tickets = $this->em->getRepository(TicketRecord::class)->findAll(); |
||
28 | foreach ($tickets as $ticket) |
||
29 | { |
||
30 | /** @var TicketRecord $ticket */ |
||
31 | $item = [ |
||
32 | 'firstname' => $ticket->getDelegate()->getFirstname(), |
||
33 | 'lastname' => $ticket->getDelegate()->getLastname(), |
||
34 | 'company' => $ticket->getDelegate()->getCompany(), |
||
35 | 'twitter' => $ticket->getDelegate()->getTwitter(), |
||
36 | 'type' => $ticket->getTicketType()->getDisplayName(), |
||
37 | ]; |
||
38 | |||
39 | foreach ($ticket->getDelegate()->getAdditionalInformation()->getQuestions() as $question) { |
||
40 | $item[$question->getHandle()] = $question->getHandle(); |
||
41 | } |
||
42 | |||
43 | $report[] = $item; |
||
44 | } |
||
45 | |||
46 | return $report; |
||
47 | } |
||
48 | } |