summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-11-19 19:35:29 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2020-11-19 20:34:42 +0100
commit1e111b2ad21acfc500737fd0726eccc797f76038 (patch)
treec92c2fbae9578bc2d49b3e268a84381426810b94 /lib
parentd602aa18253d5ed0a00e59293bb8d041382425b7 (diff)
downloadnextcloud-server-1e111b2ad21acfc500737fd0726eccc797f76038.tar.gz
nextcloud-server-1e111b2ad21acfc500737fd0726eccc797f76038.zip
Fix DataResponse typehints
We use this already in several places where we just pass strings or numbers. This all works because we just convert it to a json response in the end. So better to have the typehints reflect this. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/public/AppFramework/Http/DataResponse.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/public/AppFramework/Http/DataResponse.php b/lib/public/AppFramework/Http/DataResponse.php
index 7ae53f6f531..d1b5a989221 100644
--- a/lib/public/AppFramework/Http/DataResponse.php
+++ b/lib/public/AppFramework/Http/DataResponse.php
@@ -41,13 +41,13 @@ class DataResponse extends Response {
/**
* response data
- * @var array|object
+ * @var array|int|float|string|bool|object
*/
protected $data;
/**
- * @param array|object $data the object or array that should be transformed
+ * @param array|int|float|string|bool|object $data the object or array that should be transformed
* @param int $statusCode the Http status code, defaults to 200
* @param array $headers additional key value based headers
* @since 8.0.0
@@ -64,7 +64,7 @@ class DataResponse extends Response {
/**
* Sets values in the data json array
- * @param array|object $data an array or object which will be transformed
+ * @param array|int|float|string|object $data an array or object which will be transformed
* @return DataResponse Reference to this object
* @since 8.0.0
*/
@@ -77,7 +77,7 @@ class DataResponse extends Response {
/**
* Used to get the set parameters
- * @return array the data
+ * @return array|int|float|string|bool|object the data
* @since 8.0.0
*/
public function getData() {