From 62f676f2ff605d42bafa3f05f95d6f173af59099 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Wed, 14 Dec 2011 18:44:12 +0100 Subject: [PATCH] Qual: Uniformize code --- .../comm/propal/class/propalestats.class.php | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index dc355ef14ca..1a070e87d8a 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (c) 2005 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (c) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,10 +47,9 @@ class PropaleStats extends Stats /** * Constructor * - * @param $DB Database handler - * @param $socid Id third party - * @param $userid Id user for filter - * @return PropaleStats + * @param DoliDB $DB Database handler + * @param int $socid Id third party + * @param int $userid Id user for filter */ function PropaleStats($DB, $socid=0, $userid=0) { @@ -78,8 +78,10 @@ class PropaleStats extends Stats /** - * Renvoie le nombre de proposition par mois pour une ann�e donn�e - * + * Return propals number by month for a year + * + * @param int $year year for stats + * @return array array with number by month */ function getNbByMonth($year) { @@ -97,7 +99,9 @@ class PropaleStats extends Stats } /** - * Renvoie le nombre de propale par annee + * Return propals number by year + * + * @return array array with number by year * */ function getNbByYear() @@ -113,9 +117,12 @@ class PropaleStats extends Stats return $this->_getNbByYear($sql); } + /** - * Renvoie le nombre de propale par mois pour une annee donnee + * Return the propals amount by month for a year * + * @param int $year year for stats + * @return array array with number by month */ function getAmountByMonth($year) { @@ -131,9 +138,12 @@ class PropaleStats extends Stats return $this->_getAmountByMonth($year, $sql); } + /** + * Return the propals amount average by month for a year * - * + * @param int $year year for stats + * @return array array with number by month */ function getAverageByMonth($year) { @@ -150,10 +160,10 @@ class PropaleStats extends Stats return $this->_getAverageByMonth($year, $sql); } - /** - * \brief Return nb, total and average - * \return array Array of values + * Return nb, total and average + * + * @return array Array of values */ function getAllByYear() {