File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,11 @@ trait ResponseTrait
6464
6565 /**
6666 * How to format the response data.
67- * Either 'json' or 'xml'. If blank will be
68- * determined through content negotiation.
67+ * Either 'json' or 'xml'. If null is set, it will be determined through
68+ * content negotiation.
6969 *
70- * @var string
70+ * @var string|null
71+ * @phpstan-var 'json'|'xml'|null
7172 */
7273 protected $ format = 'json ' ;
7374
@@ -294,7 +295,7 @@ protected function failServerError(string $description = 'Internal Server Error'
294295 // --------------------------------------------------------------------
295296
296297 /**
297- * Handles formatting a response. Currently makes some heavy assumptions
298+ * Handles formatting a response. Currently, makes some heavy assumptions
298299 * and needs updating! :)
299300 *
300301 * @param array|string|null $data
@@ -350,6 +351,9 @@ protected function format($data = null)
350351 /**
351352 * Sets the format the response should be in.
352353 *
354+ * @param string|null $format Response format
355+ * @phpstan-param 'json'|'xml' $format
356+ *
353357 * @return $this
354358 */
355359 protected function setResponseFormat (?string $ format = null )
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public function delete($id = null)
106106 /**
107107 * Set/change the expected response representation for returned objects
108108 *
109- * @param string $format json/xml
109+ * @param string $format Response format
110110 * @phpstan-param 'json'|'xml' $format
111111 *
112112 * @return void
You can’t perform that action at this time.
0 commit comments