Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public static function calendar(Calendar $calendar) |
||
25 | { |
||
26 | $offerCalenderUpdate = function ($body) use ($calendar) { |
||
27 | // Purge any existing calendar data |
||
28 | unset( |
||
29 | $body->calendarType, |
||
30 | $body->startDate, |
||
31 | $body->endDate, |
||
32 | $body->subEvent, |
||
33 | $body->openingHours |
||
34 | ); |
||
35 | |||
36 | return (object) array_merge( |
||
37 | (array) $body, |
||
38 | $calendar->toJsonLd() |
||
39 | ); |
||
40 | }; |
||
41 | |||
42 | return $offerCalenderUpdate; |
||
43 | } |
||
44 | } |
||
45 |