From ee204e2e64694b86358c61916d632cb603ebb655 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Aug 2018 15:37:35 +0200 Subject: [PATCH] Fix regression in php style --- .../class/accountancycategory.class.php | 12 ++++++------ .../class/accountingaccount.class.php | 18 +++++++++--------- htdocs/adherents/class/adherent.class.php | 10 +++++----- .../class/html.formadvtargetemailing.class.php | 10 +++++----- .../compta/localtax/class/localtax.class.php | 10 +++++----- .../salaries/class/paymentsalary.class.php | 6 +++--- .../class/paymentsocialcontribution.class.php | 6 +++--- htdocs/core/class/comment.class.php | 4 ++-- htdocs/core/class/events.class.php | 6 +++--- htdocs/core/class/menubase.class.php | 6 +++--- htdocs/cron/class/cronjob.class.php | 6 +++--- htdocs/don/class/paymentdonation.class.php | 6 +++--- .../expedition/class/expeditionbatch.class.php | 4 ++-- .../class/expensereport.class.php | 6 +++--- .../fourn/class/fournisseur.commande.class.php | 12 ++++++------ .../fournisseur.commande.dispatch.class.php | 10 +++++----- htdocs/loan/class/loan.class.php | 4 ++-- htdocs/loan/class/loanschedule.class.php | 6 +++--- htdocs/loan/class/paymentloan.class.php | 4 ++-- .../class/opensurveysondage.class.php | 6 +++--- htdocs/product/class/productbatch.class.php | 4 ++-- .../class/productcustomerprice.class.php | 10 +++++----- .../class/propalmergepdfproduct.class.php | 6 +++--- htdocs/projet/class/project.class.php | 14 +++++++------- htdocs/projet/class/task.class.php | 12 ++++++------ htdocs/resource/class/dolresource.class.php | 9 ++++----- htdocs/ticket/class/ticketlogs.class.php | 12 ++++++------ 27 files changed, 109 insertions(+), 110 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 7f0b2be0071..b01becd4fcb 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -34,27 +34,27 @@ class AccountancyCategory // extends CommonObject * @var DoliDB Database handler. */ public $db; - + /** * @var string Error string * @see errors */ public $error; - + /** * @var string[] Error codes (or messages) */ public $errors = array(); - + /** * @var string ID to identify managed object */ - public $element='c_accounting_category'; - + public $element='c_accounting_category'; + /** * @var string Name of table without prefix where object is stored */ - public $table_element='c_accounting_category'; + public $table_element='c_accounting_category'; public $id; public $code; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 6a72b881aab..65861951a55 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -31,12 +31,12 @@ class AccountingAccount extends CommonObject { public $element='accounting_account'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='accounting_account'; - + public $picto = 'billr'; /** @@ -44,7 +44,7 @@ class AccountingAccount extends CommonObject * @var int */ public $ismultientitymanaged = 1; - + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -55,22 +55,22 @@ class AccountingAccount extends CommonObject * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ - public $error=''; + public $error=''; /** * @var string[] Error codes (or messages) */ public $errors = array(); - + /** * @var int ID */ public $id; - + var $rowid; var $datec; // Creation date var $fk_pcg_version; @@ -79,12 +79,12 @@ class AccountingAccount extends CommonObject var $account_number; var $account_parent; var $account_category; - + /** * @var string proper name for given parameter */ public $label; - + var $fk_user_author; var $fk_user_modif; var $active; // duplicate with status diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index a2e6c708186..bf4fe0d73c2 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -45,12 +45,12 @@ class Adherent extends CommonObject * @var string ID to identify managed object */ public $element='member'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='adherent'; - + public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $mesgs; @@ -542,10 +542,10 @@ class Adherent extends CommonObject $luser->birth=$this->birth; $luser->address=$this->address; $luser->zip=$this->zip; - $luser->town=$this->town; - $luser->country_id=$this->country_id; + $luser->town=$this->town; + $luser->country_id=$this->country_id; $luser->state_id=$this->state_id; - + $luser->email=$this->email; $luser->skype=$this->skype; $luser->office_phone=$this->phone; diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index fffb69bea2f..3fdcd6178b0 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -30,7 +30,7 @@ class FormAdvTargetEmailing extends Form * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -378,10 +378,10 @@ class FormAdvTargetEmailing extends Form /** * Return combo list of categories * - * @param string $htmlname Name of categorie - * @param array $selected_array value selected - * @param int $type type - * @return string HTML combo + * @param string $htmlname Name of categorie + * @param array $selected_array Value selected + * @param int $type Type + * @return string HTML combo */ public function multiselectCategories($htmlname='',$selected_array = array(), $type=0) { diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 7e9691f9b3a..b83379f028c 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -32,13 +32,13 @@ class Localtax extends CommonObject /** * @var string ID to identify managed object */ - public $element='localtax'; - + public $element='localtax'; + /** * @var string Name of table without prefix where object is stored */ public $table_element='localtax'; - + public $picto='payment'; var $ltt; @@ -46,12 +46,12 @@ class Localtax extends CommonObject var $datep; var $datev; var $amount; - + /** * @var string proper name for given parameter */ public $label; - + var $fk_bank; var $fk_user_creat; var $fk_user_modif; diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index babd5323fce..613a51f45b0 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -35,12 +35,12 @@ class PaymentSalary extends CommonObject * @var string ID to identify managed object */ public $element='payment_salary'; - + /** * @var string Name of table without prefix where object is stored */ - public $table_element='payment_salary'; - + public $table_element='payment_salary'; + public $picto='payment'; public $tms; diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 560e47abe7c..091886bc6a3 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -35,12 +35,12 @@ class PaymentSocialContribution extends CommonObject * @var string ID to identify managed object */ public $element='paiementcharge'; - + /** * @var string Name of table without prefix where object is stored */ - public $table_element='paiementcharge'; - + public $table_element='paiementcharge'; + public $picto = 'payment'; var $fk_charge; diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index 027d3193031..ec85a228c82 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -8,11 +8,11 @@ class Comment extends CommonObject * @var string ID to identify managed object */ public $element='comment'; - + /** * @var string Name of table without prefix where object is stored */ - public $table_element='comment'; + public $table_element='comment'; public $fk_element; public $element_type; diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index bbdf7e9c3ab..0cbbbbde226 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -38,17 +38,17 @@ class Events // extends CommonObject * @var string ID to identify managed object */ public $element='events'; - + /** * @var string Name of table without prefix where object is stored */ - public $table_element='events'; + public $table_element='events'; /** * @var int ID */ public $id; - + /** * @var DoliDB Database handler. */ diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 715f17b5a92..efcbb60a5c2 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -31,13 +31,13 @@ class Menubase /** * @var DoliDB Database handler. */ - public $db; - + public $db; + /** * @var string Error code (or message) */ public $error; - + /** * @var string[] Error codes (or messages) */ diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index b898b4eb238..53acd0976b4 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -34,12 +34,12 @@ class Cronjob extends CommonObject * @var string ID to identify managed object */ public $element='cronjob'; - + /** * @var string Name of table without prefix where object is stored */ - public $table_element='cronjob'; - + public $table_element='cronjob'; + public $picto = 'cron'; public $entity; diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index f866f20a02f..b45068ea939 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -32,13 +32,13 @@ class PaymentDonation extends CommonObject /** * @var string ID to identify managed object */ - public $element='payment_donation'; - + public $element='payment_donation'; + /** * @var string Name of table without prefix where object is stored */ public $table_element='payment_donation'; - + public $picto = 'payment'; public $rowid; diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php index 540b584590b..5981963bb75 100644 --- a/htdocs/expedition/class/expeditionbatch.class.php +++ b/htdocs/expedition/class/expeditionbatch.class.php @@ -31,8 +31,8 @@ class ExpeditionLineBatch extends CommonObject /** * @var string ID to identify managed object */ - public $element='expeditionlignebatch'; - + public $element='expeditionlignebatch'; + private static $_table_element='expeditiondet_batch'; //!< Name of table without prefix where object is stored var $sellby; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index b223174a6f8..5de34c41caa 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -37,12 +37,12 @@ class ExpenseReport extends CommonObject * @var string ID to identify managed object */ public $element='expensereport'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='expensereport'; - + var $table_element_line = 'expensereport_det'; var $fk_element = 'fk_expensereport'; var $picto = 'trip'; @@ -2390,7 +2390,7 @@ class ExpenseReportLine * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 3672e1dd1ac..9ea7febfbd9 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -44,22 +44,22 @@ class CommandeFournisseur extends CommonOrder * @var string ID to identify managed object */ public $element='order_supplier'; - + /** * @var string Name of table without prefix where object is stored */ public $table_element='commande_fournisseur'; - + public $table_element_line = 'commande_fournisseurdet'; public $fk_element = 'fk_commande'; public $picto='order'; - + /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe * @var int */ public $ismultientitymanaged = 1; - + /** * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user * @var integer @@ -78,7 +78,7 @@ class CommandeFournisseur extends CommonOrder * @var string */ public $ref; - + public $ref_supplier; public $brouillon; public $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Ordered/Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially @@ -3099,7 +3099,7 @@ class CommandeFournisseurLigne extends CommonOrderLine * @var string ID to identify managed object */ public $element='commande_fournisseurdet'; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 818a09c2bfb..90dd1ac5e94 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -37,23 +37,23 @@ class CommandeFournisseurDispatch extends CommonObject /** * @var DoliDB Database handler. */ - public $db; - + public $db; + /** * @var string Error code (or message) */ public $error; - + /** * @var string[] Error codes (or messages) */ public $errors = array(); - + /** * @var string ID to identify managed object */ public $element='commandefournisseurdispatch'; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 8f382c8dc1d..ce7a1a9c57f 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -33,9 +33,9 @@ class Loan extends CommonObject * @var string ID to identify managed object */ public $element='loan'; - + public $table='loan'; - + /** * @var string Name of table without prefix where object is stored */ diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index 5a33d9995bc..7aa7663fb7e 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -17,7 +17,7 @@ /** * \file htdocs/loan/class/loanschedule.class.php - * \ingroup facture + * \ingroup loan * \brief File of class to manage schedule of loans */ @@ -33,11 +33,11 @@ class LoanSchedule extends CommonObject * @var string ID to identify managed object */ public $element='loan_schedule'; - + /** * @var string Name of table without prefix where object is stored */ - public $table_element='loan_schedule'; + public $table_element='loan_schedule'; var $fk_loan; var $datec=''; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 1f20590f6e1..733d1420838 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -34,11 +34,11 @@ class PaymentLoan extends CommonObject * @var string ID to identify managed object */ public $element='payment_loan'; - + /** * @var string Name of table without prefix where object is stored */ - public $table_element='payment_loan'; + public $table_element='payment_loan'; var $fk_loan; var $datec=''; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index c2036525b62..5d3129f1585 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -38,12 +38,12 @@ class Opensurveysondage extends CommonObject * @var string ID to identify managed object */ public $element='opensurvey_sondage'; - + /** * @var string Name of table without prefix where object is stored */ - public $table_element='opensurvey_sondage'; - + public $table_element='opensurvey_sondage'; + public $picto = 'opensurvey'; public $id_sondage; diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index 4533013d6b6..0c0ed55855f 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -33,8 +33,8 @@ class Productbatch extends CommonObject /** * @var string ID to identify managed object */ - public $element='productbatch'; - + public $element='productbatch'; + private static $_table_element='product_batch'; //!< Name of table without prefix where object is stored var $tms=''; diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index c0f645b66b2..4155045ec29 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -31,13 +31,13 @@ class Productcustomerprice extends CommonObject /** * @var string ID to identify managed object */ - public $element = 'product_customer_price'; - + public $element = 'product_customer_price'; + /** * @var string Name of table without prefix where object is stored */ - public $table_element = 'product_customer_price'; - + public $table_element = 'product_customer_price'; + var $entity; var $datec = ''; var $tms = ''; @@ -962,7 +962,7 @@ class PriceByCustomerLine * @var int ID */ public $id; - + var $entity; var $datec = ''; var $tms = ''; diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index 771a60be60e..23282586d22 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -34,12 +34,12 @@ class Propalmergepdfproduct extends CommonObject /** * @var string ID to identify managed object */ - public $element='propal_merge_pdf_product'; - + public $element='propal_merge_pdf_product'; + /** * @var string Name of table without prefix where object is stored */ - public $table_element='propal_merge_pdf_product'; + public $table_element='propal_merge_pdf_product'; var $fk_product; var $file_name; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 1b18c0545e9..91cc8dbbcad 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -36,13 +36,13 @@ class Project extends CommonObject /** * @var string ID to identify managed object */ - public $element = 'project'; - + public $element = 'project'; + /** * @var string Name of table without prefix where object is stored */ - public $table_element = 'projet'; - + public $table_element = 'projet'; + public $table_element_line = 'projet_task'; public $fk_element = 'fk_projet'; public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe @@ -732,10 +732,10 @@ class Project extends CommonObject return -1; } } - + /** * Delete tasks with no children first, then task with children recursively - * + * * @param User $user User * @return int <0 if KO, 1 if OK */ @@ -763,7 +763,7 @@ class Project extends CommonObject { if (count($this->lines)) $this->deleteTasks($this->lines); } - + return 1; } diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 1a8de04158e..0224e5521fe 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -34,24 +34,24 @@ class Task extends CommonObject /** * @var string ID to identify managed object */ - public $element='project_task'; - + public $element='project_task'; + /** * @var string Name of table without prefix where object is stored */ - public $table_element='projet_task'; - + public $table_element='projet_task'; + public $fk_element='fk_task'; public $picto = 'task'; protected $childtables=array('projet_task_time'); // To test if we can delete object var $fk_task_parent; - + /** * @var string proper name for given parameter */ public $label; - + var $description; var $duration_effective; // total of time spent on this task var $planned_workload; diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 604e4f8849d..f08e3e75921 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -19,7 +19,6 @@ * \file resource/class/resource.class.php * \ingroup resource * \brief Class file for resource object - */ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; @@ -33,13 +32,13 @@ class Dolresource extends CommonObject /** * @var string ID to identify managed object */ - public $element='dolresource'; - + public $element='dolresource'; + /** * @var string Name of table without prefix where object is stored */ - public $table_element='resource'; - + public $table_element='resource'; + public $picto = 'resource'; public $resource_id; diff --git a/htdocs/ticket/class/ticketlogs.class.php b/htdocs/ticket/class/ticketlogs.class.php index cf5f8dc122b..4b7ebc3e361 100644 --- a/htdocs/ticket/class/ticketlogs.class.php +++ b/htdocs/ticket/class/ticketlogs.class.php @@ -36,22 +36,22 @@ class Ticketlogs// extends CommonObject * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ - public $error; - + public $error; + /** * @var string[] Error codes (or messages) */ public $errors = array(); - + /** * @var string ID to identify managed object */ - public $element = 'ticketlogs'; - + public $element = 'ticketlogs'; + /** * @var string Name of table without prefix where object is stored */