From 0420a989391c9af30ee6d85638c81bfb4f605132 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 21 Sep 2014 11:51:53 -0400 Subject: Add comments on the stat controller --- app/Controllers/statsController.php | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'app/Controllers/statsController.php') diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php index 000b41dd2..64f66f2fa 100644 --- a/app/Controllers/statsController.php +++ b/app/Controllers/statsController.php @@ -1,7 +1,21 @@ view->topFeed = $statsDAO->calculateTopFeed(); } + /** + * This action handles the idle feed statistic page. + * + * It displays the list of idle feed for different period. The supported + * periods are: + * - last year + * - last 6 months + * - last 3 months + * - last month + * - last week + */ public function idleAction() { $statsDAO = FreshRSS_Factory::createStatsDAO(); $feeds = $statsDAO->calculateFeedLastDate(); @@ -56,6 +81,18 @@ class FreshRSS_stats_Controller extends Minz_ActionController { $this->view->idleFeeds = $idleFeeds; } + /** + * This action handles the article repartition statistic page. + * + * It displays the number of article and the average of article for the + * following periods: + * - hour of the day + * - day of the week + * - month + * + * @todo verify that the metrics used here make some sense. Especially + * for the average. + */ public function repartitionAction() { $statsDAO = FreshRSS_Factory::createStatsDAO(); $categoryDAO = new FreshRSS_CategoryDAO(); @@ -74,6 +111,11 @@ class FreshRSS_stats_Controller extends Minz_ActionController { $this->view->averageMonth = $statsDAO->calculateEntryAveragePerFeedPerMonth($id); } + /** + * This action is called before every other action in that class. It is + * the common boiler plate for every action. It is triggered by the + * underlying framework. + */ public function firstAction() { if (!$this->view->loginOk) { Minz_Error::error( -- cgit v1.2.3 From 5889ef35c8ecbbae948420af9f2b05e7010593ae Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 21 Sep 2014 12:01:36 -0400 Subject: Change todo align --- app/Controllers/configureController.php | 14 +++++++------- app/Controllers/statsController.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'app/Controllers/statsController.php') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 99c72d869..7b8dd672f 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -10,7 +10,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { * underlying framework. * * @todo see if the category default configuration is needed here or if - * we can move it to the categorize action + * we can move it to the categorize action */ public function firstAction() { if (!$this->view->loginOk) { @@ -357,7 +357,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { * tab and up. * * @todo remove numbers from the list of authorized shortcuts since they - * are used to access shortcuts and user queries + * are used to access shortcuts and user queries * @todo change the notification code */ public function shortcutAction() { @@ -418,10 +418,10 @@ class FreshRSS_configure_Controller extends Minz_ActionController { * - refresh frequency (default: -2) * * @todo explain why the default value is -2 but this value does not - * exist in the drop-down list + * exist in the drop-down list * @todo change the notification code * @todo refactor configuration setting syntax to be consistent with the - * other methods + * other methods */ public function archivingAction() { if (Minz_Request::isPost()) { @@ -550,9 +550,9 @@ class FreshRSS_configure_Controller extends Minz_ActionController { * lean data. * * @todo change the way of keeping lean data to have a more defensive - * code. At the moment, the code accepts any parameters and discard those - * on the black list. I think it is safer if we maintain a whitelist - * instead. + * code. At the moment, the code accepts any parameters and discard + * those on the black list. I think it is safer if we maintain a + * whitelist instead. */ public function addQueryAction() { $queries = $this->view->conf->queries; diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php index 64f66f2fa..256543f37 100644 --- a/app/Controllers/statsController.php +++ b/app/Controllers/statsController.php @@ -91,7 +91,7 @@ class FreshRSS_stats_Controller extends Minz_ActionController { * - month * * @todo verify that the metrics used here make some sense. Especially - * for the average. + * for the average. */ public function repartitionAction() { $statsDAO = FreshRSS_Factory::createStatsDAO(); -- cgit v1.2.3