From a0c5c918866db7707a91f4434b446e78313877b5 Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 12 Nov 2021 20:13:04 +0100 Subject: [PATCH] Simplify code --- src/Module/Api/ApiResponse.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Module/Api/ApiResponse.php b/src/Module/Api/ApiResponse.php index ed3b446d0..82801f2e6 100644 --- a/src/Module/Api/ApiResponse.php +++ b/src/Module/Api/ApiResponse.php @@ -96,14 +96,11 @@ class ApiResponse case 'atom': case 'rss': case 'xml': - $ret = $this->createXML($data, $root_element); - break; + return $this->createXML($data, $root_element); case 'json': default: - $ret = $data; - break; + return $data; } - return $ret; } /**