From 87067b2bc92e75adadd2743fa2d83a77db068118 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 23 Aug 2018 18:35:45 +0200 Subject: [PATCH] Standardize and update code --- htdocs/don/class/don.class.php | 5 ++++- htdocs/don/class/paymentdonation.class.php | 5 ++++- htdocs/ecm/class/ecmdirectory.class.php | 5 ++++- htdocs/expedition/class/expedition.class.php | 7 +++++++ htdocs/expensereport/class/expensereport_ik.class.php | 3 +++ .../expensereport/class/expensereport_rule.class.php | 3 +++ .../expensereport/class/paymentexpensereport.class.php | 5 ++++- htdocs/fichinter/class/fichinter.class.php | 6 ++++++ htdocs/fourn/class/fournisseur.commande.class.php | 10 ++++++++-- .../class/fournisseur.commande.dispatch.class.php | 5 ++++- htdocs/fourn/class/fournisseur.facture.class.php | 8 +++++++- htdocs/fourn/class/paiementfourn.class.php | 3 +++ htdocs/holiday/class/holiday.class.php | 3 +++ htdocs/hrm/class/establishment.class.php | 3 +++ htdocs/livraison/class/livraison.class.php | 7 +++++++ htdocs/loan/class/loan.class.php | 4 ++++ htdocs/loan/class/loanschedule.class.php | 5 ++++- htdocs/loan/class/paymentloan.class.php | 5 ++++- htdocs/opensurvey/class/opensurveysondage.class.php | 5 ++++- htdocs/product/class/product.class.php | 3 +++ htdocs/product/stock/class/entrepot.class.php | 3 +++ 21 files changed, 92 insertions(+), 11 deletions(-) diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 71c8bbd3abb..9aa55945d2b 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -34,7 +34,10 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Don extends CommonObject { - public $element='don'; // Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='don'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index 939c4e33780..f866f20a02f 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -29,7 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class PaymentDonation extends CommonObject { - public $element='payment_donation'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='payment_donation'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index 6f3aefbc9d8..3e3559847b8 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -27,7 +27,10 @@ */ class EcmDirectory // extends CommonObject { - public $element='ecm_directories'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='ecm_directories'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index da911520ead..a4bcfeb2281 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -44,7 +44,11 @@ if (! empty($conf->productbatch->enabled)) require_once DOL_DOCUMENT_ROOT.'/expe */ class Expedition extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element="shipping"; + public $fk_element="fk_expedition"; /** @@ -2272,6 +2276,9 @@ class Expedition extends CommonObject */ class ExpeditionLigne extends CommonObjectLine { + /** + * @var string ID to identify managed object + */ public $element='expeditiondet'; /** diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 849d688ba2a..609ba42c5f5 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -29,6 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php'; */ class ExpenseReportIk extends CoreObject { + /** + * @var string ID to identify managed object + */ public $element='expenseik'; /** diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 2d2dddb1f66..8599cfcc810 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -29,6 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/coreobject.class.php'; */ class ExpenseReportRule extends CoreObject { + /** + * @var string ID to identify managed object + */ public $element='expenserule'; /** diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index d8c5f51647b..a827b095bff 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class PaymentExpenseReport extends CommonObject { - public $element='payment_expensereport'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='payment_expensereport'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index e235ec1ea12..7c772d460a5 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -35,6 +35,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobjectline.class.php'; */ class Fichinter extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='fichinter'; /** @@ -1331,6 +1334,9 @@ class FichinterLigne extends CommonObjectLine var $duration; // Duree de l'intervention var $rang = 0; + /** + * @var string ID to identify managed object + */ public $element='fichinterdet'; /** diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 6ffc8ebc9b3..3672e1dd1ac 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -40,7 +40,10 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; */ class CommandeFournisseur extends CommonOrder { - public $element='order_supplier'; + /** + * @var string ID to identify managed object + */ + public $element='order_supplier'; /** * @var string Name of table without prefix where object is stored @@ -3092,7 +3095,10 @@ class CommandeFournisseur extends CommonOrder */ class CommandeFournisseurLigne extends CommonOrderLine { - public $element='commande_fournisseurdet'; + /** + * @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 0ff73d0d8e3..818a09c2bfb 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -49,7 +49,10 @@ class CommandeFournisseurDispatch extends CommonObject */ public $errors = array(); - public $element='commandefournisseurdispatch'; //!< Id that identify managed objects + /** + * @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/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index b3d62a4f6b8..6acfdaa3530 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -41,7 +41,10 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; */ class FactureFournisseur extends CommonInvoice { - public $element='invoice_supplier'; + /** + * @var string ID to identify managed object + */ + public $element='invoice_supplier'; /** * @var string Name of table without prefix where object is stored @@ -2565,6 +2568,9 @@ class FactureFournisseur extends CommonInvoice */ class SupplierInvoiceLine extends CommonObjectLine { + /** + * @var string ID to identify managed object + */ public $element='facture_fourn_det'; /** diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index d1c71a2cd98..55c6a00d251 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -35,6 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; */ class PaiementFourn extends Paiement { + /** + * @var string ID to identify managed object + */ public $element='payment_supplier'; /** diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 5a1078aad82..833b46b2bca 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -32,6 +32,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Holiday extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='holiday'; /** diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index a39e6a20b08..744e679194e 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -28,6 +28,9 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; */ class Establishment extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='establishment'; /** diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index f61c8eabb2a..763b28fb445 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -39,7 +39,11 @@ if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande */ class Livraison extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element="delivery"; + public $fk_element="fk_livraison"; /** @@ -1095,6 +1099,9 @@ class LivraisonLigne extends CommonObjectLine public $product_ref; public $product_label; + /** + * @var string ID to identify managed object + */ public $element='livraisondet'; /** diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 1e75aa063cf..8f382c8dc1d 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -29,7 +29,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class Loan extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='loan'; + public $table='loan'; /** diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index dbf3f3f3e46..5a33d9995bc 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -29,7 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class LoanSchedule extends CommonObject { - public $element='loan_schedule'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='loan_schedule'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 9d845b7a1cd..1f20590f6e1 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -30,7 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class PaymentLoan extends CommonObject { - public $element='payment_loan'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='payment_loan'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index f62fd69c781..c2036525b62 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -34,7 +34,10 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; */ class Opensurveysondage extends CommonObject { - public $element='opensurvey_sondage'; //!< Id that identify managed objects + /** + * @var string ID to identify managed object + */ + public $element='opensurvey_sondage'; /** * @var string Name of table without prefix where object is stored diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index b02da68cc12..b66bf4eaed0 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -43,6 +43,9 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; */ class Product extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='product'; /** diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index edae2d19f05..f8e60f135b9 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -33,6 +33,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class Entrepot extends CommonObject { + /** + * @var string ID to identify managed object + */ public $element='stock'; /**