From d8becd3cdbc1576456b1b00f6bfc4cf014810ad8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 17 Mar 2012 01:13:10 +0100 Subject: [PATCH] Doxygen --- .../modules/expedition/modules_expedition.php | 16 ++++-- .../modules/livraison/mod_livraison_jade.php | 29 ++++++----- .../livraison/mod_livraison_saphir.php | 4 +- .../modules/livraison/modules_livraison.php | 51 ++++++++++++------- .../modules/mailings/contacts1.modules.php | 3 +- .../modules/rapport/pdf_paiement.class.php | 13 ++--- .../societe/mod_codeclient_elephant.php | 40 ++++++++------- .../societe/mod_codeclient_leopard.php | 29 ++++++----- .../modules/societe/mod_codeclient_monkey.php | 51 ++++++++++--------- .../societe/mod_codecompta_aquarium.php | 17 ++++--- .../societe/mod_codecompta_panicum.php | 7 +-- .../pdf/pdf_canelle.modules.php | 14 ++--- .../mod_commande_fournisseur_orchidee.php | 8 +-- 13 files changed, 159 insertions(+), 123 deletions(-) diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index c2a166aeaf4..9c69070e0c7 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -79,6 +79,7 @@ abstract class ModelNumRefExpedition /** * Return default description of numbering model + * * @return string text description */ function info() @@ -90,6 +91,7 @@ abstract class ModelNumRefExpedition /** * Return numbering example + * * @return string Example */ function getExample() @@ -101,6 +103,7 @@ abstract class ModelNumRefExpedition /** * Test if existing numbers make problems with numbering + * * @return boolean false if conflit, true if ok */ function canBeActivated() @@ -110,6 +113,7 @@ abstract class ModelNumRefExpedition /** * Return next value + * * @return string Value */ function getNextValue() @@ -120,6 +124,7 @@ abstract class ModelNumRefExpedition /** * Return numbering version module + * * @return string Value */ function getVersion() @@ -136,11 +141,12 @@ abstract class ModelNumRefExpedition /** * Cree un bon d'expedition sur disque - * @param db objet base de donnee - * @param object object expedition - * @param modele force le modele a utiliser ('' to not force) - * @param outputlangs objet lang a utiliser pour traduction - * @return int <=0 if KO, >0 if OK + * + * @param DoliDB $db Objet base de donnee + * @param Object $object Object expedition + * @param string $modele Force le modele a utiliser ('' to not force) + * @param Translate $outputlangs Objet lang a utiliser pour traduction + * @return int <=0 if KO, >0 if OK */ function expedition_pdf_create($db, $object, $modele, $outputlangs) { diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php index 950c284924f..6e8dad3afc2 100644 --- a/htdocs/core/modules/livraison/mod_livraison_jade.php +++ b/htdocs/core/modules/livraison/mod_livraison_jade.php @@ -100,12 +100,13 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder } /** - * \brief Return next value - * \param objsoc Object third party - * \param delivery Object delivery - * \return string Value if OK, 0 if KO + * Return next free value + * + * @param Societe $objsoc Object thirdparty + * @param Object $object Object we need next value for + * @return string Value if KO, <0 if KO */ - function getNextValue($objsoc=0,$delivery='') + function getNextValue($objsoc=0,$object='') { global $db,$conf; @@ -130,7 +131,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder return -1; } - $date=$delivery->date_delivery; + $date=$object->date_delivery; if (empty($date)) $date=dol_now(); $yymm = strftime("%y%m",$date); $num = sprintf("%04s",$max+1); @@ -140,15 +141,17 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder } - /** - * \brief Renvoie la reference de commande suivante non utilisee - * \param objsoc Objet societe - * \param livraison Objet livraison - * \return string Texte descripif + /** + * Return next free ref + * + * @param Societe $objsoc Object thirdparty + * @param Object $object Object livraison + * @return string Texte descripif */ - function livraison_get_num($objsoc=0,$livraison='') + function livraison_get_num($objsoc=0,$object='') { - return $this->getNextValue($objsoc,$livraison); + return $this->getNextValue($objsoc,$object); } + } ?> diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index 8a3c9536b92..40fe0660def 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -146,9 +146,9 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder * @param Object $livraison Objet livraison * @return string Texte descripif */ - function livraison_get_num($objsoc=0,$livraison='') + function livraison_get_num($objsoc=0,$object='') { - return $this->getNextValue($objsoc,$livraison); + return $this->getNextValue($objsoc,$object); } } diff --git a/htdocs/core/modules/livraison/modules_livraison.php b/htdocs/core/modules/livraison/modules_livraison.php index fcf30795157..b0ae1760ef9 100644 --- a/htdocs/core/modules/livraison/modules_livraison.php +++ b/htdocs/core/modules/livraison/modules_livraison.php @@ -68,16 +68,20 @@ abstract class ModeleNumRefDeliveryOrder { var $error=''; - /** \brief Return if a module can be used or not - * \return boolean true if module can be used + /** + * Return if a module can be used or not + * + * @return boolean true if module can be used */ function isEnabled() { return true; } - /** \brief Renvoi la description par defaut du modele de numerotation - * \return string Texte descripif + /** + * Renvoi la description par defaut du modele de numerotation + * + * @return string Texte descripif */ function info() { @@ -86,8 +90,10 @@ abstract class ModeleNumRefDeliveryOrder return $langs->trans("NoDescription"); } - /** \brief Renvoi un exemple de numerotation - * \return string Example + /** + * Renvoi un exemple de numerotation + * + * @return string Example */ function getExample() { @@ -96,17 +102,21 @@ abstract class ModeleNumRefDeliveryOrder return $langs->trans("NoExample"); } - /** \brief Test si les numeros deja en vigueur dans la base ne provoquent pas d - * de conflits qui empechera cette numerotation de fonctionner. - * \return boolean false si conflit, true si ok + /** + * Test si les numeros deja en vigueur dans la base ne provoquent pas d + * de conflits qui empechera cette numerotation de fonctionner. + * + * @return boolean false si conflit, true si ok */ function canBeActivated() { return true; } - /** \brief Renvoi prochaine valeur attribuee - * \return string Valeur + /** + * Renvoi prochaine valeur attribuee + * + * @return string Valeur */ function getNextValue() { @@ -114,8 +124,10 @@ abstract class ModeleNumRefDeliveryOrder return $langs->trans("NotAvailable"); } - /** \brief Renvoi version du module numerotation - * \return string Valeur + /** + * Renvoi version du module numerotation + * + * @return string Valeur */ function getVersion() { @@ -132,12 +144,13 @@ abstract class ModeleNumRefDeliveryOrder /** - * Create object on disk - * @param db objet base de donnee - * @param object object delivery - * @param model force le modele a utiliser ('' to not force) - * @param outputlangs objet lang a utiliser pour traduction - * @return int 0 si KO, 1 si OK + * Create object on disk + * + * @param DoliDB $db objet base de donnee + * @param Object $object object delivery + * @param string $model force le modele a utiliser ('' to not force) + * @param Translate $outputlangs objet lang a utiliser pour traduction + * @return int 0 if KO, 1 if OK */ function delivery_order_pdf_create($db, $object, $model='', $outputlangs='') { diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 15657559b2b..63a87521e9b 100755 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -34,7 +34,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php'; class mailing_contacts1 extends MailingTargets { var $name='ContactCompanies'; // Identifiant du module mailing - var $desc='Contacts des tiers (prospects, clients, fournisseurs...)'; // Libell� utilis� si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e + // This label is used if no translation is found for key MailingModuleDescXXX where XXX=name is found + var $desc='Contacts des tiers (prospects, clients, fournisseurs...)'; var $require_module=array("societe"); // Module mailing actif si modules require_module actifs var $require_admin=0; // Module mailing actif pour user admin ou non var $picto='contact'; diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 944e770ae50..394369f4df9 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -72,6 +72,7 @@ class pdf_paiement * @param int $month mois du rapport * @param int $year annee du rapport * @param string $outputlangs Lang output object + * @return int <0 if KO, >0 if OK */ function write_file($_dir, $month, $year, $outputlangs) { @@ -210,7 +211,7 @@ class pdf_paiement * Show top header of page. * * @param PDF &$pdf Object PDF - * @param Object $object Object to show + * @param int $page Object to show * @param int $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output * @return void @@ -257,7 +258,7 @@ class pdf_paiement $pdf->SetXY(162, $this->tab_top+2); $pdf->MultiCell(40, 2, $outputlangs->transnoentities("AmountPayment"), 0, 'L'); - $pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10 ); + $pdf->line(10, $this->tab_top + 10, 200, $this->tab_top + 10); $pdf->Rect(9, $this->tab_top, 192, $this->tab_height + 10); } @@ -266,10 +267,10 @@ class pdf_paiement /** * Output body * - * @param PDF &$pdf PDF object - * @param string $page Page - * @param array $lines Array of lines - * @param Translate $langs Object langs + * @param PDF &$pdf PDF object + * @param string $page Page + * @param array $lines Array of lines + * @param Translate $outputlangs Object langs * @return void */ function Body(&$pdf, $page, $lines, $outputlangs) diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index da960e26fce..218b62af140 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -110,11 +110,13 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode } - /** Return an example of result returned by getNextValue + /** + * Return an example of result returned by getNextValue * - * @param $langs Object langs - * @param $objsoc Object thirdparty - * @param $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param Translate $langs Object langs + * @param societe $objsoc Object thirdparty + * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example */ function getExample($langs,$objsoc=0,$type=-1) { @@ -196,7 +198,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode /** * Check if mask/numbering use prefix * - * @param int 0=no, 1=yes + * @return int 0 or 1 */ function verif_prefixIsUsed() { @@ -213,17 +215,17 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode /** - * Check validity of code according to its rules + * Check validity of code according to its rules * - * @param $db Database handler - * @param $code Code to check/correct - * @param $soc Object third party - * @param $type 0 = customer/prospect , 1 = supplier - * @return int 0 if OK - * -1 ErrorBadCustomerCodeSyntax - * -2 ErrorCustomerCodeRequired - * -3 ErrorCustomerCodeAlreadyUsed - * -4 ErrorPrefixRequired + * @param DoliDB $db Database handler + * @param string &$code Code to check/correct + * @param Societe $soc Object third party + * @param int $type 0 = customer/prospect , 1 = supplier + * @return int 0 if OK + * -1 ErrorBadCustomerCodeSyntax + * -2 ErrorCustomerCodeRequired + * -3 ErrorCustomerCodeAlreadyUsed + * -4 ErrorPrefixRequired */ function verif($db, &$code, $soc, $type) { @@ -265,10 +267,10 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode /** * Renvoi si un code est pris ou non (par autre tiers) * - * @param $db Handler acces base - * @param $code Code a verifier - * @param $soc Objet societe - * @return int 0 si dispo, <0 si erreur + * @param DoliDB $db Handler acces base + * @param string $code Code a verifier + * @param Societe $soc Objet societe + * @return int 0 if available, <0 if KO */ function verif_dispo($db, $code, $soc) { diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index bf963876368..be43447734d 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -72,11 +72,12 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode } - /** Return an example of result returned by getNextValue + /** + * Return an example of result returned by getNextValue * - * @param $langs Object langs - * @param $objsoc Object thirdparty - * @param $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param societe $objsoc Object thirdparty + * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return next value */ function getNextValue($objsoc=0,$type=-1) { @@ -86,17 +87,17 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode /** - * Check validity of code according to its rules + * Check validity of code according to its rules * - * @param $db Database handler - * @param $code Code to check/correct - * @param $soc Object third party - * @param $type 0 = customer/prospect , 1 = supplier - * @return int 0 if OK - * -1 ErrorBadCustomerCodeSyntax - * -2 ErrorCustomerCodeRequired - * -3 ErrorCustomerCodeAlreadyUsed - * -4 ErrorPrefixRequired + * @param DoliDB $db Database handler + * @param string &$code Code to check/correct + * @param Societe $soc Object third party + * @param int $type 0 = customer/prospect , 1 = supplier + * @return int 0 if OK + * -1 ErrorBadCustomerCodeSyntax + * -2 ErrorCustomerCodeRequired + * -3 ErrorCustomerCodeAlreadyUsed + * -4 ErrorPrefixRequired */ function verif($db, &$code, $soc, $type) { diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 66750c6c5dc..34153caafb5 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -71,11 +71,13 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode } - /** Return an example of result returned by getNextValue + /** + * Return an example of result returned by getNextValue * - * @param $langs Object langs - * @param $objsoc Object thirdparty - * @param $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param Translate $langs Object langs + * @param societe $objsoc Object thirdparty + * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example */ function getExample($langs,$objsoc=0,$type=-1) { @@ -83,11 +85,12 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode } - /** Return next value + /** + * Return next value * - * @param objsoc Object third party - * @param type Client ou fournisseur (1:client, 2:fournisseur) - * @return string Value if OK, '' if module not configured, <0 if KO + * @param Societe $objsoc Object third party + * @param int $type Client ou fournisseur (1:client, 2:fournisseur) + * @return string Value if OK, '' if module not configured, <0 if KO */ function getNextValue($objsoc=0,$type=-1) { @@ -143,17 +146,17 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode /** - * Check validity of code according to its rules + * Check validity of code according to its rules * - * @param $db Database handler - * @param $code Code to check/correct - * @param $soc Object third party - * @param $type 0 = customer/prospect , 1 = supplier - * @return int 0 if OK - * -1 ErrorBadCustomerCodeSyntax - * -2 ErrorCustomerCodeRequired - * -3 ErrorCustomerCodeAlreadyUsed - * -4 ErrorPrefixRequired + * @param DoliDB $db Database handler + * @param string &$code Code to check/correct + * @param Societe $soc Object third party + * @param int $type 0 = customer/prospect , 1 = supplier + * @return int 0 if OK + * -1 ErrorBadCustomerCodeSyntax + * -2 ErrorCustomerCodeRequired + * -3 ErrorCustomerCodeAlreadyUsed + * -4 ErrorPrefixRequired */ function verif($db, &$code, $soc, $type) { @@ -205,10 +208,10 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode /** * Renvoi si un code est pris ou non (par autre tiers) * - * @param $db Handler acces base - * @param $code Code a verifier - * @param $soc Objet societe - * @return int 0 si dispo, <0 si erreur + * @param DoliDB $db Handler acces base + * @param string $code Code a verifier + * @param Societe $soc Objet societe + * @return int 0 if available, <0 if KO */ function verif_dispo($db, $code, $soc) { @@ -243,8 +246,8 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode /** * Renvoi si un code respecte la syntaxe * - * @param $code Code a verifier -* * @return int 0 si OK, <0 si KO + * @param string $code Code a verifier +* * @return int 0 si OK, <0 si KO */ function verif_syntax($code) { diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index 0116c4866e5..d153c9690e3 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -51,10 +51,11 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode } - /** Return description of module + /** + * Return description of module * - * @param Translate $langs Object langs - * @return string Description of module + * @param Translate $langs Object langs + * @return string Description of module */ function info($langs) { @@ -82,11 +83,13 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode return $texte; } - /** Return an example of result returned by getNextValue + /** + * Return an example of result returned by getNextValue * - * @param $langs Object langs - * @param $objsoc Object thirdparty - * @param $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param Translate $langs Object langs + * @param societe $objsoc Object thirdparty + * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example */ function getExample($langs,$objsoc=0,$type=-1) { diff --git a/htdocs/core/modules/societe/mod_codecompta_panicum.php b/htdocs/core/modules/societe/mod_codecompta_panicum.php index e5c39a2ed34..06790783d48 100644 --- a/htdocs/core/modules/societe/mod_codecompta_panicum.php +++ b/htdocs/core/modules/societe/mod_codecompta_panicum.php @@ -43,10 +43,11 @@ class mod_codecompta_panicum extends ModeleAccountancyCode } - /** Return description of module + /** + * Return description of module * - * @param string $langs Object langs - * @return string Description of module + * @param string $langs Object langs + * @return string Description of module */ function info($langs) { diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index a1145f80846..02af7cba055 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -58,7 +58,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** * Constructor * - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler + * @param Societe $object Third party providing invoice */ function __construct($db,$object) { @@ -688,11 +689,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** * Show payments table - * @param pdf Object PDF - * @param object Object invoice - * @param posy Position y in PDF - * @param outputlangs Object langs for output - * @return int <0 if KO, >0 if OK + * + * @param PDF &$pdf Object PDF + * @param Object $object Object invoice + * @param int $posy Position y in PDF + * @param Translate $outputlangs Object langs for output + * @return int <0 if KO, >0 if OK */ function _tableau_versements(&$pdf, $object, $posy, $outputlangs) { diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 7e0c7e8719e..33e4f352868 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -107,7 +107,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Value if OK, 0 if KO */ - function getNextValue($objsoc=0,$commande='') + function getNextValue($objsoc=0,$object='') { global $db,$conf; @@ -122,7 +122,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders return 0; } - $numFinal=get_next_value($db,$mask,'commande_fournisseur','ref','',$objsoc->code_fournisseur,$commande->date_commande); + $numFinal=get_next_value($db,$mask,'commande_fournisseur','ref','',$objsoc->code_fournisseur,$object->date_commande); return $numFinal; } @@ -135,9 +135,9 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders * @param Object $object Object * @return string Texte descripif */ - function commande_get_num($objsoc=0,$commande='') + function commande_get_num($objsoc=0,$object='') { - return $this->getNextValue($objsoc,$commande); + return $this->getNextValue($objsoc,$object); } }