@@ -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; |