File tree 1 file changed +6
-10
lines changed
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
90
90
}
91
91
92
92
/**
93
- * @param string $space
93
+ * @param string|null $space
94
94
* @return self
95
95
*/
96
- public function setSpace (string $ space ): self
96
+ public function setSpace (? string $ space ): self
97
97
{
98
98
$ this ->space = $ space ;
99
99
return $ this ;
@@ -181,9 +181,7 @@ public function createComment(string $comment): ContentComment
181
181
$ contentComment ->setContainerId ($ this ->getId ());
182
182
$ contentComment ->setContainerType ($ this ->getType ());
183
183
$ contentComment ->setContent ($ comment );
184
- if ($ this ->getSpace ()) {
185
- $ contentComment ->setSpace ($ this ->getSpace ());
186
- }
184
+ $ contentComment ->setSpace ($ this ->getSpace ());
187
185
return $ contentComment ;
188
186
}
189
187
@@ -195,13 +193,11 @@ public function createComment(string $comment): ContentComment
195
193
public function createSubpage (string $ title , string $ body ): ContentPage
196
194
{
197
195
$ contentPage = new ContentPage ();
198
- if ($ this ->id ) {
199
- $ contentPage ->addAncestor ($ this ->id );
200
- }
201
196
$ contentPage ->setContent ($ body );
202
197
$ 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 );
205
201
}
206
202
return $ contentPage ;
207
203
}
You can’t perform that action at this time.
0 commit comments