aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/OCS/Result.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/OCS/Result.php')
-rw-r--r--lib/private/OCS/Result.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/OCS/Result.php b/lib/private/OCS/Result.php
index 0be12f3a234..8f42179f1a0 100644
--- a/lib/private/OCS/Result.php
+++ b/lib/private/OCS/Result.php
@@ -59,9 +59,9 @@ class Result {
*/
public function __construct($data = null, $code = 100, $message = null, $headers = []) {
if ($data === null) {
- $this->data = array();
+ $this->data = [];
} elseif (!is_array($data)) {
- $this->data = array($this->data);
+ $this->data = [$this->data];
} else {
$this->data = $data;
}
@@ -99,7 +99,7 @@ class Result {
* @return array
*/
public function getMeta() {
- $meta = array();
+ $meta = [];
$meta['status'] = $this->succeeded() ? 'ok' : 'failure';
$meta['statuscode'] = $this->statusCode;
$meta['message'] = $this->message;