]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/ApiResponse.php
Merge remote-tracking branch 'upstream/develop' into inbox-gsid
[friendica.git] / src / Module / Api / ApiResponse.php
index 960ce3d2cb67460157939e99eaf9f6506a056454..a113dab84f3b110f400b5cf4d8e2d5def81fa4c6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -107,6 +107,7 @@ class ApiResponse extends Response
         *
         * @param array $arr Array to be passed to template
         * @param int   $cid Contact ID of template
+        *
         * @return array
         */
        private function addRSSValues(array $arr, int $cid): array
@@ -149,6 +150,7 @@ class ApiResponse extends Response
                        case 'atom':
                        case 'xml':
                                return $this->createXML($data, $root_element);
+
                        case 'json':
                        default:
                                return $data;
@@ -219,6 +221,7 @@ class ApiResponse extends Response
                        case 'xml':
                                $this->setType(static::TYPE_XML);
                                break;
+
                        case 'json':
                                $this->setType(static::TYPE_JSON);
                                if (!empty($return)) {
@@ -229,9 +232,11 @@ class ApiResponse extends Response
                                        $return = $json;
                                }
                                break;
+
                        case 'rss':
                                $this->setType(static::TYPE_RSS);
                                break;
+
                        case 'atom':
                                $this->setType(static::TYPE_ATOM);
                                break;