From 1e111b2ad21acfc500737fd0726eccc797f76038 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 19 Nov 2020 19:35:29 +0100 Subject: [PATCH] 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 --- lib/public/AppFramework/Http/DataResponse.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/public/AppFramework/Http/DataResponse.php b/lib/public/AppFramework/Http/DataResponse.php index 7ae53f6f53..d1b5a98922 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() {