| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 1 | public function build(Week $week) |
|
| 19 | { |
||
| 20 | 1 | $events = []; |
|
| 21 | 1 | foreach ($week->getTrainings() as $training) { |
|
| 22 | 1 | $event = new CalendarEvent(); |
|
| 23 | 1 | $event->setUid(md5(uniqid())); |
|
| 24 | 1 | $event->setSummary($training->getContent()); |
|
| 25 | 1 | $event->setDescription($training->getContent()); |
|
| 26 | 1 | $events[] = $event; |
|
| 27 | 1 | } |
|
| 28 | |||
| 29 | 1 | return $events; |
|
| 30 | } |
||
| 31 | } |
||
| 32 |