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
64
64
65
65
/**
66
66
* 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.
69
69
*
70
- * @var string
70
+ * @var string|null
71
+ * @phpstan-var 'json'|'xml'|null
71
72
*/
72
73
protected $ format = 'json ' ;
73
74
@@ -294,7 +295,7 @@ protected function failServerError(string $description = 'Internal Server Error'
294
295
// --------------------------------------------------------------------
295
296
296
297
/**
297
- * Handles formatting a response. Currently makes some heavy assumptions
298
+ * Handles formatting a response. Currently, makes some heavy assumptions
298
299
* and needs updating! :)
299
300
*
300
301
* @param array|string|null $data
@@ -350,6 +351,9 @@ protected function format($data = null)
350
351
/**
351
352
* Sets the format the response should be in.
352
353
*
354
+ * @param string|null $format Response format
355
+ * @phpstan-param 'json'|'xml' $format
356
+ *
353
357
* @return $this
354
358
*/
355
359
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)
106
106
/**
107
107
* Set/change the expected response representation for returned objects
108
108
*
109
- * @param string $format json/xml
109
+ * @param string $format Response format
110
110
* @phpstan-param 'json'|'xml' $format
111
111
*
112
112
* @return void
You can’t perform that action at this time.
0 commit comments