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>
pull/24225/head
Roeland Jago Douma 4 years ago
parent d602aa1825
commit 1e111b2ad2
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 8
      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() {

Loading…
Cancel
Save