File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,10 @@ public function getSpace(): ?string
9090 }
9191
9292 /**
93- * @param string $space
93+ * @param string|null $space
9494 * @return self
9595 */
96- public function setSpace (string $ space ): self
96+ public function setSpace (? string $ space ): self
9797 {
9898 $ this ->space = $ space ;
9999 return $ this ;
@@ -181,9 +181,7 @@ public function createComment(string $comment): ContentComment
181181 $ contentComment ->setContainerId ($ this ->getId ());
182182 $ contentComment ->setContainerType ($ this ->getType ());
183183 $ contentComment ->setContent ($ comment );
184- if ($ this ->getSpace ()) {
185- $ contentComment ->setSpace ($ this ->getSpace ());
186- }
184+ $ contentComment ->setSpace ($ this ->getSpace ());
187185 return $ contentComment ;
188186 }
189187
@@ -195,13 +193,11 @@ public function createComment(string $comment): ContentComment
195193 public function createSubpage (string $ title , string $ body ): ContentPage
196194 {
197195 $ contentPage = new ContentPage ();
198- if ($ this ->id ) {
199- $ contentPage ->addAncestor ($ this ->id );
200- }
201196 $ contentPage ->setContent ($ body );
202197 $ contentPage ->setTitle ($ title );
203- if ($ this ->getSpace ()) {
204- $ contentPage ->setSpace ($ this ->getSpace ());
198+ $ contentPage ->setSpace ($ this ->getSpace ());
199+ if ($ this ->id ) {
200+ $ contentPage ->addAncestor ($ this ->id );
205201 }
206202 return $ contentPage ;
207203 }
You can’t perform that action at this time.
0 commit comments