From bc137fcfd49defc738d2f87512c0401eba06df57 Mon Sep 17 00:00:00 2001 From: alxndr-w Date: Fri, 15 Dec 2023 14:38:29 +0000 Subject: [PATCH] Apply php-cs-fixer changes --- fragments/FAQPage.json-ld.php | 4 ++-- fragments/qanda.json-ld.php | 4 ++-- lib/qanda.php | 4 ++++ lib/qanda_lang.php | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/fragments/FAQPage.json-ld.php b/fragments/FAQPage.json-ld.php index 34e1fee..6fde917 100644 --- a/fragments/FAQPage.json-ld.php +++ b/fragments/FAQPage.json-ld.php @@ -9,8 +9,8 @@ function htmlEncode($value) function getAuthor($question) { return [ - "@type" => "Person", - "name" => json_encode($question->getAuthor(), $GLOBALS['jsonOptions']) + '@type' => 'Person', + 'name' => json_encode($question->getAuthor(), $GLOBALS['jsonOptions']), ]; } ?> diff --git a/fragments/qanda.json-ld.php b/fragments/qanda.json-ld.php index a911b4a..ff88d67 100644 --- a/fragments/qanda.json-ld.php +++ b/fragments/qanda.json-ld.php @@ -9,8 +9,8 @@ function htmlEncode($value) function getAuthor($question) { return [ - "@type" => "Person", - "name" => json_encode($question->getAuthor(), $GLOBALS['jsonOptions']) + '@type' => 'Person', + 'name' => json_encode($question->getAuthor(), $GLOBALS['jsonOptions']), ]; } diff --git a/lib/qanda.php b/lib/qanda.php index 63bd65e..db25514 100644 --- a/lib/qanda.php +++ b/lib/qanda.php @@ -47,6 +47,7 @@ public function getQuestion(?string $lang = null): string } return $this->getValue('question'); } + /** * Findet Datensätze anhand ihrer IDs. * Finds records by their IDs. @@ -80,6 +81,7 @@ public static function findByCategoryIds(array $category_ids, float $status = 1) $ids = implode(',', $category_ids); return self::query()->whereRAW('status >= ' . $status . ' AND FIND_IN_SET(category_ids, "' . $ids . '")')->find(); } + /** * Gibt die Antwort in der angegebenen Sprache zurück, falls vorhanden, sonst in der Standardsprache. * Returns the answer in the specified language if available, otherwise in the default language. @@ -133,6 +135,7 @@ public function getTranslation(?string $lang = null): mixed } return $this->getRelatedCollection('lang'); } + /** * Gibt den Autor zurück. * Returns the author. @@ -167,6 +170,7 @@ public function getUrl(string $param = 'question-header-'): string return rtrim($host, '/') . '#' . $param . $this->getId(); } + /** * Gibt die JSON-LD-Darstellung einer Frage zurück. * Returns the JSON-LD representation of a question. diff --git a/lib/qanda_lang.php b/lib/qanda_lang.php index 4784af0..684ee33 100644 --- a/lib/qanda_lang.php +++ b/lib/qanda_lang.php @@ -43,6 +43,7 @@ public function getAnswer(): string { return $this->getValue('answer'); } + /** * Setzt den Wert für die Antwort. * Sets the value for the answer. @@ -72,6 +73,7 @@ public function setQuestion(string $question): self $this->setValue('question', $question); return $this; } + /** * Gibt die Übersetzung für eine bestimmte Frage und Sprache zurück. * Returns the translation for a specific question and language.