summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/OC_API.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/private/legacy/OC_API.php b/lib/private/legacy/OC_API.php
index 9e9c28e2dba..46ee3495572 100644
--- a/lib/private/legacy/OC_API.php
+++ b/lib/private/legacy/OC_API.php
@@ -98,13 +98,10 @@ class OC_API {
}
}
- /**
- * @return string
- */
- public static function requestedFormat() {
+ public static function requestedFormat(): string {
$formats = ['json', 'xml'];
- $format = !empty($_GET['format']) && in_array($_GET['format'], $formats) ? $_GET['format'] : 'xml';
+ $format = (isset($_GET['format']) && in_array($_GET['format'], $formats)) ? $_GET['format'] : 'xml';
return $format;
}