@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | if ($type->is(CalendarType::SINGLE()) && empty($endDate)) { |
| 61 | - throw new \UnexpectedValueException('End date can not be empty for calendar type: ' . $type . '.'); |
|
| 61 | + throw new \UnexpectedValueException('End date can not be empty for calendar type: ' . $type . '.'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | if ($type->is(CalendarType::PERIODIC()) && (empty($startDate) || empty($endDate))) { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | ); |
| 94 | 94 | |
| 95 | 95 | $calendar = [ |
| 96 | - 'type' => $this->type, |
|
| 96 | + 'type' => $this->type, |
|
| 97 | 97 | ]; |
| 98 | 98 | |
| 99 | 99 | empty($this->startDate) ?: $calendar['startDate'] = $this->startDate->format(DateTime::ATOM); |
@@ -201,9 +201,9 @@ discard block |
||
| 201 | 201 | $jsonLd['subEvent'] = array(); |
| 202 | 202 | foreach ($timestamps as $timestamp) { |
| 203 | 203 | $jsonLd['subEvent'][] = array( |
| 204 | - '@type' => 'Event', |
|
| 205 | - 'startDate' => $timestamp->getStartDate()->format(DateTime::ATOM), |
|
| 206 | - 'endDate' => $timestamp->getEndDate()->format(DateTime::ATOM), |
|
| 204 | + '@type' => 'Event', |
|
| 205 | + 'startDate' => $timestamp->getStartDate()->format(DateTime::ATOM), |
|
| 206 | + 'endDate' => $timestamp->getEndDate()->format(DateTime::ATOM), |
|
| 207 | 207 | ); |
| 208 | 208 | } |
| 209 | 209 | } |
@@ -54,11 +54,11 @@ discard block |
||
| 54 | 54 | array $openingHours = array() |
| 55 | 55 | ) { |
| 56 | 56 | if (($type->is(CalendarType::MULTIPLE()) || $type->is(CalendarType::SINGLE())) && empty($startDate)) { |
| 57 | - throw new \UnexpectedValueException('Start date can not be empty for calendar type: ' . $type . '.'); |
|
| 57 | + throw new \UnexpectedValueException('Start date can not be empty for calendar type: '.$type.'.'); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | if ($type->is(CalendarType::SINGLE()) && empty($endDate)) { |
| 61 | - throw new \UnexpectedValueException('End date can not be empty for calendar type: ' . $type . '.'); |
|
| 61 | + throw new \UnexpectedValueException('End date can not be empty for calendar type: '.$type.'.'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | if ($type->is(CalendarType::PERIODIC()) && (empty($startDate) || empty($endDate))) { |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | public function serialize() |
| 87 | 87 | { |
| 88 | 88 | $serializedTimestamps = array_map( |
| 89 | - function (Timestamp $timestamp) { |
|
| 89 | + function(Timestamp $timestamp) { |
|
| 90 | 90 | return $timestamp->serialize(); |
| 91 | 91 | }, |
| 92 | 92 | $this->timestamps |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | !empty($data['startDate']) ? self::deserializeDateTime($data['startDate']) : null, |
| 115 | 115 | !empty($data['endDate']) ? self::deserializeDateTime($data['endDate']) : null, |
| 116 | 116 | !empty($data['timestamps']) ? array_map( |
| 117 | - function ($timestamp) { |
|
| 117 | + function($timestamp) { |
|
| 118 | 118 | return Timestamp::deserialize($timestamp); |
| 119 | 119 | }, |
| 120 | 120 | $data['timestamps'] |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | // Permanent - with openingtimes |
| 215 | 215 | $openingHours = $this->getOpeningHours(); |
| 216 | 216 | if (!empty($openingHours)) { |
| 217 | - $jsonLd['openingHours'] = (array) $openingHours; |
|
| 217 | + $jsonLd['openingHours'] = (array)$openingHours; |
|
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | return $jsonLd; |