File tree Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Expand file tree Collapse file tree 2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -29,19 +29,19 @@ class Document
2929 /**
3030 * The actual data to store to the document
3131 *
32- * @var array
32+ * @var array|null
3333 */
3434 protected $ data ;
3535
3636 /**
3737 * The version that has been assigned to this document.
3838 *
39- * @var int
39+ * @var int|null
4040 */
4141 protected $ version ;
4242
4343 /**
44- * @var string
44+ * @var string|null
4545 */
4646 protected $ id ;
4747
@@ -115,9 +115,9 @@ public function isDirty(): bool
115115 }
116116
117117 /**
118- * @return int
118+ * @return int|nulll
119119 */
120- public function getVersion (): int
120+ public function getVersion (): ? int
121121 {
122122 return $ this ->version ;
123123 }
@@ -144,9 +144,9 @@ public function setData(array $data): void
144144 }
145145
146146 /**
147- * @return string
147+ * @return string|null
148148 */
149- public function getId (): string
149+ public function getId (): ? string
150150 {
151151 return $ this ->id ;
152152 }
@@ -178,9 +178,9 @@ public function getType(): AbstractType
178178
179179 /**
180180 * @param string $method
181- * @param string $path
181+ * @param string|null $path
182182 * @param array $arguments
183- * @param string $content
183+ * @param string|null $content
184184 * @return Response
185185 * @throws ElasticSearchException
186186 * @throws \Neos\Flow\Http\Exception
@@ -198,5 +198,4 @@ protected function setDirty(bool $dirty = true): void
198198 {
199199 $ this ->dirty = $ dirty ;
200200 }
201-
202201}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function idOfFreshNewDocumentIsPopulatedAfterStoring(array $data = null)
4242 $ document = new Document (new TwitterType ($ this ->testingIndex ), $ data );
4343 static ::assertNull ($ document ->getId ());
4444 $ document ->store ();
45- static ::assertRegExp ('/\w+/ ' , $ document ->getId ());
45+ static ::assertMatchesRegularExpression ('/\w+/ ' , $ document ->getId ());
4646 }
4747
4848 /**
You can’t perform that action at this time.
0 commit comments