From 607f7e725487ce0eb0339b288ce9e58036dad4a0 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 8 May 2021 10:27:18 +0200 Subject: Fix several comments syntaxes (#3615) Mainly wrong `@return` types in comments --- app/Models/ConfigurationSetter.php | 4 ++-- app/Models/Share.php | 4 ++-- app/Models/StatsDAO.php | 13 ++++--------- 3 files changed, 8 insertions(+), 13 deletions(-) (limited to 'app/Models') diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php index 2a5f59226..6fc056eb2 100644 --- a/app/Models/ConfigurationSetter.php +++ b/app/Models/ConfigurationSetter.php @@ -4,7 +4,7 @@ class FreshRSS_ConfigurationSetter { /** * Return if the given key is supported by this setter. * @param $key the key to test. - * @return true if the key is supported, false else. + * @return boolean true if the key is supported, false else. */ public function support($key) { $name_setter = '_' . $key; @@ -26,7 +26,7 @@ class FreshRSS_ConfigurationSetter { * A helper to set boolean values. * * @param $value the tested value. - * @return true if value is true and different from no, false else. + * @return boolean true if value is true and different from no, false else. */ private function handleBool($value) { return ((bool)$value) && $value !== 'no'; diff --git a/app/Models/Share.php b/app/Models/Share.php index 7988a021f..f536418fc 100644 --- a/app/Models/Share.php +++ b/app/Models/Share.php @@ -51,7 +51,7 @@ class FreshRSS_Share { /** * Return the list of sharing options. - * @return an array of FreshRSS_Share objects. + * @return array[FreshRSS_Share] */ public static function enum() { return self::$list_sharing; @@ -255,7 +255,7 @@ class FreshRSS_Share { * Transform a data with the given functions. * @param $data the data to transform. * @param $tranform an array containing a list of functions to apply. - * @return the transformed data. + * @return mixed the transformed data. */ private static function transform($data, $transform) { if (!is_array($transform) || empty($transform)) { diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php index a73657e9a..824535c2d 100644 --- a/app/Models/StatsDAO.php +++ b/app/Models/StatsDAO.php @@ -57,9 +57,8 @@ SQL; /** * Calculates entry count per day on a 30 days period. - * Returns the result as a JSON object. * - * @return JSON object + * @return array */ public function calculateEntryCount() { $count = $this->initEntryCountArray(); @@ -238,9 +237,7 @@ SQL; /** * Calculates feed count per category. - * Returns the result as a JSON object. - * - * @return JSON object + * @return array */ public function calculateFeedByCategory() { $sql = <<