summaryrefslogtreecommitdiff
path: root/app/Models/StatsDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-03-11 22:57:20 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-03-11 22:57:20 +0100
commit8dcc0fd65a36adedb12e5d54bafb39e7e553d38b (patch)
treebf47fd99928a6782a309cdd1171516029d4f9611 /app/Models/StatsDAO.php
parent919c9c83013ea310f01c309f00dea3f8afa9033e (diff)
parent8f4c61a4154641ac22e6d541b6994add3c4803cb (diff)
Merge pull request #1119 from FreshRSS/dev1.3.1-beta
Merge dev in 1.3.1-beta
Diffstat (limited to 'app/Models/StatsDAO.php')
-rw-r--r--app/Models/StatsDAO.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/Models/StatsDAO.php b/app/Models/StatsDAO.php
index 80caccc49..5ca333396 100644
--- a/app/Models/StatsDAO.php
+++ b/app/Models/StatsDAO.php
@@ -55,9 +55,9 @@ SQL;
/**
* Calculates entry count per day on a 30 days period.
- * Returns the result as a JSON string.
+ * Returns the result as a JSON object.
*
- * @return string
+ * @return JSON object
*/
public function calculateEntryCount() {
$count = $this->initEntryCountArray();
@@ -257,9 +257,9 @@ SQL;
/**
* Calculates feed count per category.
- * Returns the result as a JSON string.
+ * Returns the result as a JSON object.
*
- * @return string
+ * @return JSON object
*/
public function calculateFeedByCategory() {
$sql = <<<SQL
@@ -282,7 +282,7 @@ SQL;
* Calculates entry count per category.
* Returns the result as a JSON string.
*
- * @return string
+ * @return JSON object
*/
public function calculateEntryByCategory() {
$sql = <<<SQL
@@ -357,7 +357,7 @@ SQL;
$serie[] = array($key, $value);
}
- return json_encode($serie);
+ return $serie;
}
protected function convertToPieSerie($data) {
@@ -368,7 +368,7 @@ SQL;
$serie[] = $value;
}
- return json_encode($serie);
+ return $serie;
}
/**
@@ -411,17 +411,17 @@ SQL;
}
/**
- * Translates array content and encode it as JSON
+ * Translates array content
*
* @param array $data
- * @return string
+ * @return JSON object
*/
private function convertToTranslatedJson($data = array()) {
$translated = array_map(function($a) {
return _t('gen.date.' . $a);
}, $data);
- return json_encode($translated);
+ return $translated;
}
}