@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | Assert::keyExists($data['lastUpdated'], 'by'); |
| 38 | 38 | Assert::isArray($data['lastUpdated']['by']); |
| 39 | 39 | |
| 40 | - if(isset($data['latest'])) { |
|
| 40 | + if (isset($data['latest'])) { |
|
| 41 | 41 | Assert::boolean($data['latest']); |
| 42 | 42 | $contentHistory->setLatest($data['latest']); |
| 43 | 43 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $contentHistory->setLastVersionNumber($data['lastUpdated']['number']); |
| 52 | 52 | |
| 53 | - if(isset($data['previousVersion'])) { |
|
| 53 | + if (isset($data['previousVersion'])) { |
|
| 54 | 54 | Assert::isArray($data['previousVersion']); |
| 55 | 55 | Assert::keyExists($data['previousVersion'], 'number'); |
| 56 | 56 | $contentHistory->setPreviousVersionNumber($data['previousVersion']['number']); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | private static function getDateTimeFromString(string $dateString): DateTimeInterface |
| 66 | 66 | { |
| 67 | 67 | $dateTimeImmutable = DateTimeImmutable::createFromFormat('Y-m-d\TH:i:s.vZ', $dateString); |
| 68 | - if($dateTimeImmutable === false) { |
|
| 68 | + if ($dateTimeImmutable === false) { |
|
| 69 | 69 | throw new HydrationException('Invalid date string: ' . $dateString); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | $searchResult->setSize($data['size']); |
| 42 | 42 | |
| 43 | - if(isset($data['start']) && isset($data['limit'])) { |
|
| 43 | + if (isset($data['start']) && isset($data['limit'])) { |
|
| 44 | 44 | Assert::integer($data['start']); |
| 45 | 45 | Assert::integer($data['limit']); |
| 46 | 46 | $searchResult->setStart($data['start']); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /* if there is a next link, then it is not the last page */ |
| 60 | - if(isset($data['_links']['next'])) { |
|
| 60 | + if (isset($data['_links']['next'])) { |
|
| 61 | 61 | $searchResult->setLastPage(false); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -271,10 +271,10 @@ discard block |
||
| 271 | 271 | * @return AbstractContent|ContentPage|ContentComment |
| 272 | 272 | * @throws HydrationException |
| 273 | 273 | */ |
| 274 | - public static function load(array $data): ContentComment|AbstractContent|ContentPage |
|
| 274 | + public static function load(array $data): ContentComment | AbstractContent | ContentPage |
|
| 275 | 275 | { |
| 276 | 276 | /* handle older content versions */ |
| 277 | - if(isset($data['content'], $data['when'])) { |
|
| 277 | + if (isset($data['content'], $data['when'])) { |
|
| 278 | 278 | return self::load($data['content']); |
| 279 | 279 | } |
| 280 | 280 | |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | $content->setContent((string)$data['body']['storage']['value']); |
| 305 | 305 | } |
| 306 | 306 | |
| 307 | - if(isset($data['status'])) { |
|
| 307 | + if (isset($data['status'])) { |
|
| 308 | 308 | Assert::string($data['status']); |
| 309 | 309 | $content->setLatest($data['status'] === 'current'); |
| 310 | 310 | } |
@@ -86,11 +86,11 @@ |
||
| 86 | 86 | |
| 87 | 87 | $queryParameter['expand'] = self::DEFAULT_EXPAND; |
| 88 | 88 | |
| 89 | - if($limit !== null) { |
|
| 89 | + if ($limit !== null) { |
|
| 90 | 90 | $queryParameter['limit'] = $limit; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - if($start !== null) { |
|
| 93 | + if ($start !== null) { |
|
| 94 | 94 | $queryParameter['start'] = $start; |
| 95 | 95 | } |
| 96 | 96 | |