From 52f4f72e6f8a4dfc7774e88da7e310dd2cc537c7 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 26 Mar 2012 22:39:43 +0200
Subject: [PATCH] Checkstyle

---
 htdocs/admin/mails.php                         | 15 ++++++++++++---
 htdocs/cashdesk/affContenu.php                 |  4 ++--
 htdocs/cashdesk/class/Facturation.class.php    | 12 ++++++------
 htdocs/cashdesk/tpl/facturation1.tpl.php       |  2 +-
 htdocs/cashdesk/tpl/liste_articles.tpl.php     |  2 +-
 htdocs/cashdesk/tpl/ticket.tpl.php             |  6 +++---
 htdocs/cashdesk/tpl/validation1.tpl.php        |  8 ++++----
 htdocs/cashdesk/validation_verif.php           | 14 +++++++-------
 .../core/modules/facture/modules_facture.php   | 18 +++++++++---------
 .../modules/fichinter/modules_fichinter.php    |  7 +++++--
 10 files changed, 50 insertions(+), 38 deletions(-)

diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php
index 8e5a7b1afc2..fbbf3356eae 100644
--- a/htdocs/admin/mails.php
+++ b/htdocs/admin/mails.php
@@ -212,9 +212,18 @@ if (($action == 'send' || $action == 'sendhtml')
 
 		require_once(DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php");
 		$mailfile = new CMailFile(
-			$subject, $sendto, $email_from, $body,
-			$filepath, $mimetype, $filename,
-			$sendtocc, $sendtoccc, $deliveryreceipt, $msgishtml, $errors_to
+			$subject,
+			$sendto,
+			$email_from,
+			$body,
+			$filepath,
+			$mimetype,
+			$filename,
+			$sendtocc,
+			$sendtoccc,
+			$deliveryreceipt,
+			$msgishtml,
+			$errors_to
 		);
 
 		$result=$mailfile->sendfile();
diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php
index dc5c99daa22..a4e3db7863b 100644
--- a/htdocs/cashdesk/affContenu.php
+++ b/htdocs/cashdesk/affContenu.php
@@ -47,8 +47,8 @@ print '<div class="liste_articles">';
 
 require ('tpl/liste_articles.tpl.php');
 
-$obj_facturation->prix_total_ht($lst_total_ht);
-$obj_facturation->prix_total_ttc($lst_total_ttc);
+$obj_facturation->prixTotalHt($lst_total_ht);
+$obj_facturation->prixTotalTtc($lst_total_ttc);
 
 print '</div>';
 
diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php
index fcad5848c17..eff1cfbf590 100644
--- a/htdocs/cashdesk/class/Facturation.class.php
+++ b/htdocs/cashdesk/class/Facturation.class.php
@@ -253,9 +253,9 @@ class Facturation
         $this->montantRendu('RESET');
         $this->paiementLe('RESET');
 
-        $this->prix_total_ht('RESET');
-        $this->montant_tva('RESET');
-        $this->prix_total_ttc('RESET');
+        $this->prixTotalHt('RESET');
+        $this->montantTva('RESET');
+        $this->prixTotalTtc('RESET');
 
     }
 
@@ -588,7 +588,7 @@ class Facturation
      * @param	int		$aTotalHt		Total amount
      * @return	int						Total amount
      */
-    public function prix_total_ht( $aTotalHt=null )
+    public function prixTotalHt( $aTotalHt=null )
     {
         if ( !$aTotalHt ) {
 
@@ -611,7 +611,7 @@ class Facturation
      * @param	int		$aMontantTva	Amount vat
      * @return	int						Amount vat
      */
-    public function montant_tva( $aMontantTva=null )
+    public function montantTva( $aMontantTva=null )
     {
         if ( !$aMontantTva ) {
 
@@ -635,7 +635,7 @@ class Facturation
      * @param	int		$aTotalTtc		Amount ttc
      * @return	int						Amount ttc
      */
-    public function prix_total_ttc( $aTotalTtc=null )
+    public function prixTotalTtc( $aTotalTtc=null )
     {
         if ( !$aTotalTtc )
         {
diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php
index 6963695c78e..59c3a6fb65d 100644
--- a/htdocs/cashdesk/tpl/facturation1.tpl.php
+++ b/htdocs/cashdesk/tpl/facturation1.tpl.php
@@ -169,7 +169,7 @@ $langs->load("cashdesk");
 			<tr><th class="label1"><?php echo $langs->trans("TotalTicket"); ?></th><th class="label1"><?php echo $langs->trans("Received"); ?></th><th class="label1"><?php echo $langs->trans("Change"); ?></th></tr>
 			<tr>
 			<!-- Affichage du montant du -->
-			<td><input class="texte2_off" type="text" name="txtDu" value="<?php echo price2num($obj_facturation->prix_total_ttc(), 'MT'); ?>" disabled="disabled" /></td>
+			<td><input class="texte2_off" type="text" name="txtDu" value="<?php echo price2num($obj_facturation->prixTotalTtc(), 'MT'); ?>" disabled="disabled" /></td>
 			<!-- Choix du montant encaisse -->
 			<td><input class="texte2" type="text" name="txtEncaisse" value="" onkeyup="javascript: verifDifference();" onfocus="javascript: this.select();" /></td>
 			<!-- Affichage du montant rendu -->
diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php
index 79e7359cc10..cf9fd00cbe6 100644
--- a/htdocs/cashdesk/tpl/liste_articles.tpl.php
+++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php
@@ -68,7 +68,7 @@ else
 }
 
 $obj_facturation->calculTotaux();
-$total_ttc = $obj_facturation->prix_total_ttc();
+$total_ttc = $obj_facturation->prixTotalTtc();
 echo ('<p class="cadre_prix_total">'.$langs->trans("Total").' : '.price2num($total_ttc, 'MT').' '.$conf->currency.'<br></p>'."\n");
 
 ?></div>
diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php
index a3a055ac082..52a58a2bad8 100644
--- a/htdocs/cashdesk/tpl/ticket.tpl.php
+++ b/htdocs/cashdesk/tpl/ticket.tpl.php
@@ -138,9 +138,9 @@ print $object->ref;
 
 <table class="totaux">
 <?php
-echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalHT").'</th><td nowrap="nowrap">'.price2num($obj_facturation->prix_total_ht(),'MT')." ".$conf->currency."</td></tr>\n";
-echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalVAT").'</th><td nowrap="nowrap">'.price2num($obj_facturation->montant_tva(),'MT')." ".$conf->currency."</td></tr>\n";
-echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalTTC").'</th><td nowrap="nowrap">'.price2num($obj_facturation->prix_total_ttc(),'MT')." ".$conf->currency."</td></tr>\n";
+echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalHT").'</th><td nowrap="nowrap">'.price2num($obj_facturation->prixTotalHt(),'MT')." ".$conf->currency."</td></tr>\n";
+echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalVAT").'</th><td nowrap="nowrap">'.price2num($obj_facturation->montantTva(),'MT')." ".$conf->currency."</td></tr>\n";
+echo '<tr><th nowrap="nowrap">'.$langs->trans("TotalTTC").'</th><td nowrap="nowrap">'.price2num($obj_facturation->prixTotalTtc(),'MT')." ".$conf->currency."</td></tr>\n";
 ?>
 </table>
 
diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php
index fdcda6e3e7c..5cca10af8eb 100644
--- a/htdocs/cashdesk/tpl/validation1.tpl.php
+++ b/htdocs/cashdesk/tpl/validation1.tpl.php
@@ -26,12 +26,12 @@ $langs->load("main");
 	<table class="table_resume">
 
 		<tr><td class="resume_label"><?php echo $langs->trans("Invoice"); ?></td><td><?php  echo $obj_facturation->numInvoice(); ?></td></tr>
-		<tr><td class="resume_label"><?php echo $langs->trans("TotalHT"); ?></td><td><?php echo price2num($obj_facturation->prix_total_ht(),'MT').' '.$conf->currency; ?></td></tr>
+		<tr><td class="resume_label"><?php echo $langs->trans("TotalHT"); ?></td><td><?php echo price2num($obj_facturation->prixTotalHt(),'MT').' '.$conf->currency; ?></td></tr>
 		<?php
 			// Affichage de la tva par taux
-			if ( $obj_facturation->montant_tva() ) {
+			if ( $obj_facturation->montantTva() ) {
 
-				echo ('<tr><td class="resume_label">'.$langs->trans("VAT").'</td><td>'.price2num($obj_facturation->montant_tva(),'MT').' '.$conf->currency.'</td></tr>');
+				echo ('<tr><td class="resume_label">'.$langs->trans("VAT").'</td><td>'.price2num($obj_facturation->montantTva(),'MT').' '.$conf->currency.'</td></tr>');
 
 			}
 			else
@@ -41,7 +41,7 @@ $langs->load("main");
 
 			}
 		?>
-		<tr><td class="resume_label"><?php echo $langs->trans("TotalTTC"); ?> </td><td><?php echo price2num($obj_facturation->prix_total_ttc(),'MT').' '.$conf->currency; ?></td></tr>
+		<tr><td class="resume_label"><?php echo $langs->trans("TotalTTC"); ?> </td><td><?php echo price2num($obj_facturation->prixTotalTtc(),'MT').' '.$conf->currency; ?></td></tr>
 		<tr><td class="resume_label"><?php echo $langs->trans("PaymentMode"); ?> </td><td>
 		<?php
 		switch ($obj_facturation->getSetPaymentMode())
diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php
index 5bf7bdab68b..f3772d617fa 100644
--- a/htdocs/cashdesk/validation_verif.php
+++ b/htdocs/cashdesk/validation_verif.php
@@ -57,7 +57,7 @@ switch ($action)
 		// Si paiement autre qu'en especes, montant encaisse = prix total
 		$mode_reglement = $obj_facturation->getSetPaymentMode();
 		if ( $mode_reglement != 'ESP' ) {
-			$montant = $obj_facturation->prix_total_ttc();
+			$montant = $obj_facturation->prixTotalTtc();
 		} else {
 			$montant = $_POST['txtEncaisse'];
 		}
@@ -66,7 +66,7 @@ switch ($action)
 			$obj_facturation->montantEncaisse($montant);
 
 			//Determination de la somme rendue
-			$total = $obj_facturation->prix_total_ttc();
+			$total = $obj_facturation->prixTotalTtc();
 			$encaisse = $obj_facturation->montantEncaisse();
 
 			$obj_facturation->montantRendu($encaisse - $total);
@@ -198,9 +198,9 @@ switch ($action)
 		$invoice->date_creation=$now;
 		$invoice->date=$now;
 		$invoice->date_lim_reglement=0;
-		$invoice->total_ht=$obj_facturation->prix_total_ht();
-		$invoice->total_tva=$obj_facturation->montant_tva();
-		$invoice->total_ttc=$obj_facturation->prix_total_ttc();
+		$invoice->total_ht=$obj_facturation->prixTotalHt();
+		$invoice->total_tva=$obj_facturation->montantTva();
+		$invoice->total_ttc=$obj_facturation->prixTotalTtc();
 		$invoice->note=$note;
 		$invoice->cond_reglement_id=$cond_reglement_id;
 		$invoice->mode_reglement_id=$mode_reglement_id;
@@ -234,7 +234,7 @@ switch ($action)
 				$payment=new Paiement($db);
 				$payment->datepaye=$now;
 				$payment->bank_account=$conf_fkaccount;
-				$payment->amounts[$invoice->id]=$obj_facturation->prix_total_ttc();
+				$payment->amounts[$invoice->id]=$obj_facturation->prixTotalTtc();
 				$payment->note=$langs->trans("Payment").' '.$langs->trans("Invoice").' '.$obj_facturation->numInvoice();
 				$payment->paiementid=$invoice->mode_reglement_id;
 				$payment->num_paiement='';
@@ -254,7 +254,7 @@ switch ($action)
 
                     if (! $error)
                     {
-                    	if ($invoice->total_ttc == $obj_facturation->prix_total_ttc()
+                    	if ($invoice->total_ttc == $obj_facturation->prixTotalTtc()
                     		&& $obj_facturation->getSetPaymentMode() != 'DIFF')
                     	{
                     		// We set status to payed
diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php
index 43b0dae3c33..973a8461799 100644
--- a/htdocs/core/modules/facture/modules_facture.php
+++ b/htdocs/core/modules/facture/modules_facture.php
@@ -147,15 +147,15 @@ abstract class ModeleNumRefFactures
 /**
  *  Create a document onto disk according to template module.
  *
- *	@param   	DoliDB		$db  			Database handler
- *	@param   	Object		$object			Object invoice
- *	@param	    string		$modele			Force template to use ('' to not force)
- *	@param		Translate	$outputlangs	objet lang a utiliser pour traduction
- *  @param      int			$hidedetails    Hide details of lines
- *  @param      int			$hidedesc       Hide description
- *  @param      int			$hideref        Hide ref
- *  @param      HookManager	$hookmanager	Hook manager instance
- *	@return  	int        					<0 if KO, >0 if OK
+ *	@param	DoliDB		$db  			Database handler
+ *	@param  Object		$object			Object invoice
+ *	@param	string		$modele			Force template to use ('' to not force)
+ *	@param	Translate	$outputlangs	objet lang a utiliser pour traduction
+ *  @param  int			$hidedetails    Hide details of lines
+ *  @param  int			$hidedesc       Hide description
+ *  @param  int			$hideref        Hide ref
+ *  @param  HookManager	$hookmanager	Hook manager instance
+ *	@return int        					<0 if KO, >0 if OK
  */
 function facture_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false)
 {
diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php
index c14c4878821..de1a1c79ee2 100644
--- a/htdocs/core/modules/fichinter/modules_fichinter.php
+++ b/htdocs/core/modules/fichinter/modules_fichinter.php
@@ -30,8 +30,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/commondocgenerator.class.php");
 
 
 /**
- *	\class      ModelePDFFicheinter
- *	\brief      Classe mere des modeles de fiche intervention
+ *	Parent class to manage intervention document templates
  */
 abstract class ModelePDFFicheinter extends CommonDocGenerator
 {
@@ -149,6 +148,10 @@ abstract class ModeleNumRefFicheinter
  *  @param	Object		$object			Object fichinter
  *  @param	string		$modele			force le modele a utiliser ('' par defaut)
  *  @param	Translate	$outputlangs	objet lang a utiliser pour traduction
+ *  @param  int			$hidedetails    Hide details of lines
+ *  @param  int			$hidedesc       Hide description
+ *  @param  int			$hideref        Hide ref
+ *  @param  HookManager	$hookmanager	Hook manager instance
  *  @return int         				0 if KO, 1 if OK
  */
 function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false)
-- 
GitLab