aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/statsController.php
diff options
context:
space:
mode:
authorGravatar Luc SANCHEZ <4697568+ColonelMoutarde@users.noreply.github.com> 2023-01-20 23:37:41 +0100
committerGravatar GitHub <noreply@github.com> 2023-01-20 23:37:41 +0100
commit75a203fff233901b0276beccdf2f64c34ef53f40 (patch)
treefa5784cb71ea531e7ae777b3bf5fea5e0341d11f /app/Controllers/statsController.php
parentc13f1de13969d6ab012520d621d4aba2a888532e (diff)
Type hinting statsController.php (#5024)
Diffstat (limited to 'app/Controllers/statsController.php')
-rw-r--r--app/Controllers/statsController.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php
index 1798ee3cf..0ab7df09b 100644
--- a/app/Controllers/statsController.php
+++ b/app/Controllers/statsController.php
@@ -10,7 +10,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
* the common boiler plate for every action. It is triggered by the
* underlying framework.
*/
- public function firstAction() {
+ public function firstAction(): void {
if (!FreshRSS_Auth::hasAccess()) {
Minz_Error::error(403);
}
@@ -32,7 +32,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
FreshRSS_View::prependTitle(_t('admin.stats.title') . ' ยท ');
}
- private function convertToSeries($data) {
+ private function convertToSeries($data): array {
$series = array();
foreach ($data as $key => $value) {
@@ -42,7 +42,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
return $series;
}
- private function convertToPieSeries($data) {
+ private function convertToPieSeries(array $data): array {
$series = array();
foreach ($data as $value) {
@@ -64,7 +64,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
* - number of article by category (entryByCategory)
* - list of most prolific feed (topFeed)
*/
- public function indexAction() {
+ public function indexAction(): void {
$statsDAO = FreshRSS_Factory::createStatsDAO();
FreshRSS_View::appendScript(Minz_Url::display('/scripts/vendor/chart.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/vendor/chart.min.js')));
@@ -106,7 +106,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
* to use the subscription controller to save it,
* but shows the stats idle page
*/
- public function feedAction() {
+ public function feedAction(): void {
$id = Minz_Request::param('id');
$ajax = Minz_Request::param('ajax');
if ($ajax) {
@@ -131,7 +131,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
* - last month
* - last week
*/
- public function idleAction() {
+ public function idleAction(): void {
FreshRSS_View::appendScript(Minz_Url::display('/scripts/feed.js?' . @filemtime(PUBLIC_PATH . '/scripts/feed.js')));
$feed_dao = FreshRSS_Factory::createFeedDao();
$statsDAO = FreshRSS_Factory::createStatsDAO();
@@ -216,7 +216,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
* @todo verify that the metrics used here make some sense. Especially
* for the average.
*/
- public function repartitionAction() {
+ public function repartitionAction(): void {
$statsDAO = FreshRSS_Factory::createStatsDAO();
$categoryDAO = FreshRSS_Factory::createCategoryDao();
$feedDAO = FreshRSS_Factory::createFeedDao();