Skip to content

Commit 2b036a0

Browse files
Steveb-palongosz
andcommitted
Fixed redundant condition
Co-authored-by: Andrew Longosz <[email protected]>
1 parent 12d9118 commit 2b036a0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/lib/Server/Output/ValueObjectVisitor/RestContent.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,7 @@ public function visit(Visitor $visitor, Generator $generator, $data)
150150

151151
// Published date will not exist if we're visiting the content draft
152152
if ($contentInfo->publishedDate !== null) {
153-
$generator->valueElement(
154-
'publishedDate',
155-
($contentInfo->publishedDate !== null
156-
? $contentInfo->publishedDate->format('c')
157-
: null)
158-
);
153+
$generator->valueElement('publishedDate', $contentInfo->publishedDate->format('c'));
159154
}
160155

161156
$generator->valueElement(

0 commit comments

Comments
 (0)