diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml
index 6fbe9458c7a..1a18710b0d1 100644
--- a/dev/setup/codesniffer/ruleset.xml
+++ b/dev/setup/codesniffer/ruleset.xml
@@ -201,6 +201,7 @@
0
+
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 48c48f608d9..9b55957b0f0 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -551,10 +551,10 @@ class Commande extends CommonOrder
$this->db->rollback();
return -1;
}
- }
+ }
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Tag the order as validated (opened)
* Function used when order is reopend after being closed.
@@ -1768,7 +1768,7 @@ class Commande extends CommonOrder
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Adding line of fixed discount in the order in DB
*
@@ -3727,7 +3727,7 @@ class Commande extends CommonOrder
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Charge indicateurs this->nb de tableau de bord
*
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index d12817ebc67..6008c53b617 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -455,7 +455,7 @@ class FactureRec extends CommonInvoice
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Recupere les lignes de factures predefinies dans this->lines
*
diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php
index 49cf2ec4560..1cb304fe519 100644
--- a/htdocs/compta/sociales/class/cchargesociales.class.php
+++ b/htdocs/compta/sociales/class/cchargesociales.class.php
@@ -404,7 +404,7 @@ class Cchargesociales
* @param string $morecss Add more css on link
* @return string String with URL
*/
- function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '')
+ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '')
{
global $langs, $conf, $db;
global $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -438,12 +438,12 @@ class Cchargesociales
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
- function getLibStatut($mode = 0)
+ public function getLibStatut($mode = 0)
{
return $this->LibStatut($this->status, $mode);
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoi le libelle d'un status donne
*
@@ -451,7 +451,7 @@ class Cchargesociales
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
- function LibStatut($status, $mode = 0)
+ public function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index c66e19ea5f2..ee9863a8a5a 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -81,7 +81,7 @@ class Tva extends CommonObject
*
* @param DoliDB $db Database handler
*/
- function __construct($db)
+ public function __construct($db)
{
$this->db = $db;
}
@@ -93,7 +93,7 @@ class Tva extends CommonObject
* @param User $user User that create
* @return int <0 if KO, >0 if OK
*/
- function create($user)
+ public function create($user)
{
global $conf, $langs;
@@ -173,7 +173,7 @@ class Tva extends CommonObject
* @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK
*/
- function update($user, $notrigger = 0)
+ public function update($user, $notrigger = 0)
{
global $conf, $langs;
@@ -241,7 +241,7 @@ class Tva extends CommonObject
* @param User $user User that load
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $user = null)
+ public function fetch($id, $user = null)
{
global $langs;
$sql = "SELECT";
@@ -309,7 +309,7 @@ class Tva extends CommonObject
* @param User $user User that delete
* @return int <0 if KO, >0 if OK
*/
- function delete($user)
+ public function delete($user)
{
global $conf, $langs;
@@ -343,7 +343,7 @@ class Tva extends CommonObject
*
* @return void
*/
- function initAsSpecimen()
+ public function initAsSpecimen()
{
$this->id=0;
@@ -365,7 +365,7 @@ class Tva extends CommonObject
* @param int $year Year
* @return double Amount
*/
- function solde($year = 0)
+ public function solde($year = 0)
{
$reglee = $this->tva_sum_reglee($year);
@@ -385,7 +385,7 @@ class Tva extends CommonObject
* @param int $year Year
* @return double Amount
*/
- function tva_sum_collectee($year = 0)
+ public function tva_sum_collectee($year = 0)
{
// phpcs:enable
@@ -419,14 +419,14 @@ class Tva extends CommonObject
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* VAT payed
*
* @param int $year Year
* @return double Amount
*/
- function tva_sum_payee($year = 0)
+ public function tva_sum_payee($year = 0)
{
// phpcs:enable
@@ -461,14 +461,14 @@ class Tva extends CommonObject
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Total of the VAT payed
*
* @param int $year Year
* @return double Amount
*/
- function tva_sum_reglee($year = 0)
+ public function tva_sum_reglee($year = 0)
{
// phpcs:enable
@@ -510,7 +510,7 @@ class Tva extends CommonObject
* @param User $user Object user that insert
* @return int <0 if KO, rowid in tva table if OK
*/
- function addPayment($user)
+ public function addPayment($user)
{
global $conf,$langs;
@@ -654,14 +654,14 @@ class Tva extends CommonObject
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Update link between payment tva and line generate into llx_bank
*
* @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK
*/
- function update_fk_bank($id_bank)
+ public function update_fk_bank($id_bank)
{
// phpcs:enable
$sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.(int) $id_bank;
@@ -687,7 +687,7 @@ class Tva extends CommonObject
* @param string $morecss More CSS
* @return string Chaine with URL
*/
- function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '')
+ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '')
{
global $langs, $conf;
@@ -733,7 +733,7 @@ class Tva extends CommonObject
*
* @return int Amount of payment already done, <0 if KO
*/
- function getSommePaiement()
+ public function getSommePaiement()
{
$table='paiementcharge';
$field='fk_charge';
@@ -766,7 +766,7 @@ class Tva extends CommonObject
* @param int $id Id of vat payment
* @return int <0 if KO, >0 if OK
*/
- function info($id)
+ public function info($id)
{
$sql = "SELECT t.rowid, t.tms, t.fk_user_modif, t.datec, t.fk_user_creat";
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
@@ -813,12 +813,12 @@ class Tva extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle
*/
- function getLibStatut($mode = 0)
+ public function getLibStatut($mode = 0)
{
return $this->LibStatut($this->statut, $mode);
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoi le libelle d'un statut donne
*
@@ -826,7 +826,7 @@ class Tva extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut
*/
- function LibStatut($status, $mode = 0)
+ public function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index d007885895c..65364e0a343 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -183,11 +183,11 @@ class FormFile
else {
$rename='checked';
}
-
+
$out .= '
';
if (! empty($options)) $out .= '| '.$options.' | ';
$out .= '';
- $out .= ' '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/',$langs->transnoentitiesnoconv("OriginFileName"),$savingdocmask), $langs->transnoentitiesnoconv("OriginFileName"));
+ $out .= ' '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/', $langs->transnoentitiesnoconv("OriginFileName"), $savingdocmask), $langs->transnoentitiesnoconv("OriginFileName"));
$out .= ' | ';
$out .= '
';
}
@@ -1571,7 +1571,7 @@ class FormFile
{
preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref=(isset($reg[1])?$reg[1]:'');
}
-
+
if (! $id && ! $ref) continue;
$found=0;
if (! empty($this->cache_objects[$modulepart.'_'.$id.'_'.$ref]))
diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php
index 2eb0e03ec63..3dfa0533cbe 100644
--- a/htdocs/core/modules/contract/mod_contract_magre.php
+++ b/htdocs/core/modules/contract/mod_contract_magre.php
@@ -59,7 +59,7 @@ class mod_contract_magre extends ModelNumRefContracts
*
* @return string text description
*/
- public function info()
+ public function info()
{
global $conf,$langs;
@@ -137,14 +137,14 @@ class mod_contract_magre extends ModelNumRefContracts
return $numFinal;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next value
*
- * @param Societe $objsoc third party object
- * @param Object $objforref contract object
- * @return string Value if OK, 0 if KO
- */
+ * @param Societe $objsoc third party object
+ * @param Object $objforref contract object
+ * @return string Value if OK, 0 if KO
+ */
public function contract_get_num($objsoc, $objforref)
{
// phpcs:enable
diff --git a/htdocs/core/modules/expensereport/modules_expensereport.php b/htdocs/core/modules/expensereport/modules_expensereport.php
index a31a61f67e1..09759b808cf 100644
--- a/htdocs/core/modules/expensereport/modules_expensereport.php
+++ b/htdocs/core/modules/expensereport/modules_expensereport.php
@@ -111,7 +111,7 @@ abstract class ModeleNumRefExpenseReport
*
* @return string Example
*/
- function getExample()
+ public function getExample()
{
global $langs;
$langs->load("trips");
@@ -123,7 +123,7 @@ abstract class ModeleNumRefExpenseReport
*
* @return boolean false if conflict, true if ok
*/
- function canBeActivated()
+ public function canBeActivated()
{
return true;
}
@@ -134,7 +134,7 @@ abstract class ModeleNumRefExpenseReport
* @param Object $object Object we need next value for
* @return string Value
*/
- function getNextValue($object)
+ public function getNextValue($object)
{
global $langs;
return $langs->trans("NotAvailable");
@@ -145,7 +145,7 @@ abstract class ModeleNumRefExpenseReport
*
* @return string Value
*/
- function getVersion()
+ public function getVersion()
{
global $langs;
$langs->load("admin");
diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php
index 7bda83efc83..aee5255911b 100644
--- a/htdocs/core/modules/export/export_excel2007.modules.php
+++ b/htdocs/core/modules/export/export_excel2007.modules.php
@@ -114,7 +114,7 @@ class ExportExcel2007 extends ExportExcel
*
* @return int <0 if KO, >0 if OK
*/
- function close_file()
+ public function close_file()
{
// phpcs:enable
global $conf;
diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
index c5405d9c3a9..06782a7b033 100644
--- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
+++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
@@ -63,7 +63,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
*
* @param DoliDB $db Database handler
*/
- function __construct($db)
+ public function __construct($db)
{
global $conf, $langs, $mysoc;
@@ -108,7 +108,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
* @param Translate $langs Lang object to use for output
* @return string Description
*/
- function info($langs)
+ public function info($langs)
{
global $conf, $langs;
@@ -202,7 +202,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
- function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
+ public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager;
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index 3eb5905ccd2..5b321364aa4 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -230,7 +230,7 @@ class pdf_crabe extends ModelePDFFactures
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
- function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
+ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php
index 65a424941b8..61be7fd8a5e 100644
--- a/htdocs/core/modules/project/modules_project.php
+++ b/htdocs/core/modules/project/modules_project.php
@@ -77,7 +77,7 @@ abstract class ModeleNumRefProjects
*
* @return boolean true if module can be used
*/
- function isEnabled()
+ public function isEnabled()
{
return true;
}
@@ -87,7 +87,7 @@ abstract class ModeleNumRefProjects
*
* @return string Texte descripif
*/
- function info()
+ public function info()
{
global $langs;
$langs->load("projects");
@@ -99,7 +99,7 @@ abstract class ModeleNumRefProjects
*
* @return string Example
*/
- function getExample()
+ public function getExample()
{
global $langs;
$langs->load("projects");
@@ -112,7 +112,7 @@ abstract class ModeleNumRefProjects
*
* @return boolean false si conflit, true si ok
*/
- function canBeActivated()
+ public function canBeActivated()
{
return true;
}
@@ -124,7 +124,7 @@ abstract class ModeleNumRefProjects
* @param Project $project Object project
* @return string Valeur
*/
- function getNextValue($objsoc, $project)
+ public function getNextValue($objsoc, $project)
{
global $langs;
return $langs->trans("NotAvailable");
@@ -135,7 +135,7 @@ abstract class ModeleNumRefProjects
*
* @return string Valeur
*/
- function getVersion()
+ public function getVersion()
{
global $langs;
$langs->load("admin");
diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php
index b92fe03ae3f..cef8338a535 100644
--- a/htdocs/core/modules/project/task/mod_task_universal.php
+++ b/htdocs/core/modules/project/task/mod_task_universal.php
@@ -59,7 +59,7 @@ class mod_task_universal extends ModeleNumRefTask
*
* @return string Texte descripif
*/
- function info()
+ public function info()
{
global $conf,$langs;
diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php
index 3e1b00fcf47..1778e498f69 100644
--- a/htdocs/core/modules/project/task/modules_task.php
+++ b/htdocs/core/modules/project/task/modules_task.php
@@ -78,7 +78,7 @@ abstract class ModeleNumRefTask
*
* @return boolean true if module can be used
*/
- function isEnabled()
+ public function isEnabled()
{
return true;
}
@@ -88,7 +88,7 @@ abstract class ModeleNumRefTask
*
* @return string Texte descripif
*/
- function info()
+ public function info()
{
global $langs;
$langs->load("projects");
@@ -100,7 +100,7 @@ abstract class ModeleNumRefTask
*
* @return string Example
*/
- function getExample()
+ public function getExample()
{
global $langs;
$langs->load("projects");
@@ -113,7 +113,7 @@ abstract class ModeleNumRefTask
*
* @return boolean false si conflit, true si ok
*/
- function canBeActivated()
+ public function canBeActivated()
{
return true;
}
@@ -125,7 +125,7 @@ abstract class ModeleNumRefTask
* @param Project $project Object project
* @return string Valeur
*/
- function getNextValue($objsoc, $project)
+ public function getNextValue($objsoc, $project)
{
global $langs;
return $langs->trans("NotAvailable");
@@ -136,7 +136,7 @@ abstract class ModeleNumRefTask
*
* @return string Valeur
*/
- function getVersion()
+ public function getVersion()
{
global $langs;
$langs->load("admin");
diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php
index a92d5a562ad..f8d4f137048 100644
--- a/htdocs/core/modules/societe/mod_codeclient_elephant.php
+++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php
@@ -238,7 +238,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Check if mask/numbering use prefix
*
@@ -315,7 +315,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoi si un code est pris ou non (par autre tiers)
*
diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php
index 593d4f9d51a..898c69a64b1 100644
--- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php
+++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php
@@ -77,7 +77,7 @@ abstract class ModeleNumRefSuppliersInvoices
*
* @return boolean true if model can be used
*/
- function isEnabled()
+ public function isEnabled()
{
return true;
}
@@ -86,7 +86,7 @@ abstract class ModeleNumRefSuppliersInvoices
*
* @return string Description Text
*/
- function info()
+ public function info()
{
global $langs;
$langs->load("invoices");
@@ -97,7 +97,7 @@ abstract class ModeleNumRefSuppliersInvoices
*
* @return string Example
*/
- function getExample()
+ public function getExample()
{
global $langs;
$langs->load("invoices");
@@ -108,7 +108,7 @@ abstract class ModeleNumRefSuppliersInvoices
*
* @return boolean false if conflict, true if ok
*/
- function canBeActivated()
+ public function canBeActivated()
{
return true;
}
@@ -130,7 +130,7 @@ abstract class ModeleNumRefSuppliersInvoices
*
* @return string Value
*/
- function getVersion()
+ public function getVersion()
{
global $langs;
$langs->load("admin");
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 2d2164ebeb1..dcaacb834fc 100644
--- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
@@ -117,8 +117,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
*
* @param DoliDB $db Database handler
*/
- function __construct($db)
- {
+ public function __construct($db)
+ {
global $conf, $langs, $mysoc;
// Load translation files required by the page
@@ -180,10 +180,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->localtax2=array();
$this->atleastoneratenotnull=0;
$this->atleastonediscount=0;
- }
+ }
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@@ -195,8 +195,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
- function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
- {
+ public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
+ {
// phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes;
@@ -608,7 +608,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->error=$langs->trans("ErrorConstantNotDefined", "SUPPLIER_OUTPUTDIR");
return 0;
}
- }
+ }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
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 556ca56d2db..73350e85c30 100644
--- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php
+++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php
@@ -61,7 +61,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
*
* @return string Texte descripif
*/
- function info()
+ public function info()
{
global $db, $conf, $langs;
diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php
index b462814f624..0dadee51592 100644
--- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php
+++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php
@@ -82,7 +82,7 @@ abstract class ModeleNumRefSuppliersOrders
*
* @return boolean true if model can be used
*/
- function isEnabled()
+ public function isEnabled()
{
return true;
}
@@ -91,7 +91,7 @@ abstract class ModeleNumRefSuppliersOrders
*
* @return string Description Text
*/
- function info()
+ public function info()
{
global $langs;
$langs->load("orders");
@@ -102,7 +102,7 @@ abstract class ModeleNumRefSuppliersOrders
*
* @return string Example
*/
- function getExample()
+ public function getExample()
{
global $langs;
$langs->load("orders");
@@ -113,7 +113,7 @@ abstract class ModeleNumRefSuppliersOrders
*
* @return boolean false if conflict, true if ok
*/
- function canBeActivated()
+ public function canBeActivated()
{
return true;
}
@@ -122,7 +122,7 @@ abstract class ModeleNumRefSuppliersOrders
*
* @return string Valeur
*/
- function getNextValue()
+ public function getNextValue()
{
global $langs;
return $langs->trans("NotAvailable");
@@ -132,7 +132,7 @@ abstract class ModeleNumRefSuppliersOrders
*
* @return string Value
*/
- function getVersion()
+ public function getVersion()
{
global $langs;
$langs->load("admin");
diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
index 87b4791524e..cb52a14f721 100644
--- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
@@ -117,7 +117,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
*
* @param DoliDB $db Database handler
*/
- function __construct($db)
+ public function __construct($db)
{
global $conf, $langs, $mysoc;
@@ -176,7 +176,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@@ -188,7 +188,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
- function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
+ public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user, $langs, $conf, $mysoc, $hookmanager;
@@ -517,7 +517,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show total to pay
*
@@ -527,7 +527,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
- function _tableau_cheque(&$pdf, $object, $posy, $outputlangs)
+ private function _tableau_cheque(&$pdf, $object, $posy, $outputlangs)
{
// phpcs:enable
global $conf,$mysoc;
@@ -590,7 +590,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param string $currency Currency code
* @return void
*/
- function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
+ private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
{
global $conf,$mysoc;
@@ -631,7 +631,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param Translate $outputlangs Object lang for output
* @return void
*/
- function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
+ private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $langs, $conf, $mysoc;
@@ -810,7 +810,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
- function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
+ private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php
index a947573dd1a..c1f6e003d6d 100644
--- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php
+++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php
@@ -59,7 +59,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
*
* @return string Texte descripif
*/
- function info()
+ public function info()
{
global $conf, $langs;
@@ -99,7 +99,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
*
* @return string Example
*/
- function getExample()
+ public function getExample()
{
global $conf,$langs,$mysoc;
@@ -122,7 +122,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
* @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO
*/
- function getNextValue($objsoc, $object)
+ public function getNextValue($objsoc, $object)
{
global $db,$conf;
@@ -143,7 +143,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next free value
*
@@ -151,7 +151,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
* @param string $objforref Object for number to search
* @return string Next free value
*/
- function commande_get_num($objsoc, $objforref)
+ public function commande_get_num($objsoc, $objforref)
{
// phpcs:enable
return $this->getNextValue($objsoc, $objforref);
diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php
index 23b94b69ed2..e071f8d5505 100644
--- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php
+++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php
@@ -155,7 +155,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return next free value
*
diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
index 4eb5bc402ea..d2dffce83c4 100644
--- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
@@ -221,7 +221,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
return $texte;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build a document on disk using the generic odt module.
*
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 95e92a9fc58..daed4c8d432 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -193,7 +193,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->atleastonediscount=0;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php
index 8e68afd6001..731767e78cd 100644
--- a/htdocs/hrm/class/establishment.class.php
+++ b/htdocs/hrm/class/establishment.class.php
@@ -303,7 +303,7 @@ class Establishment extends CommonObject
return $this->LibStatut($this->status, $mode);
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Give a label from a status
*
diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php
index f4c7c954156..424cb8ce39b 100644
--- a/htdocs/product/class/productcustomerprice.class.php
+++ b/htdocs/product/class/productcustomerprice.class.php
@@ -321,7 +321,7 @@ class Productcustomerprice extends CommonObject
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Load all customer prices in memory from database
*
@@ -436,7 +436,7 @@ class Productcustomerprice extends CommonObject
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Load all objects in memory from database
*
@@ -742,7 +742,7 @@ class Productcustomerprice extends CommonObject
$this->db->commit();
return 1;
}
- }
+ }
/**
* Force update price on child price
@@ -835,7 +835,7 @@ class Productcustomerprice extends CommonObject
$this->error = "Error " . $this->db->lasterror();
return - 1;
}
- }
+ }
/**
* Delete object in database
@@ -890,7 +890,7 @@ class Productcustomerprice extends CommonObject
$this->db->commit();
return 1;
}
- }
+ }
/**
* Load an object from its id and create a new one in database
@@ -942,7 +942,7 @@ class Productcustomerprice extends CommonObject
$this->db->rollback();
return - 1;
}
- }
+ }
/**
* Initialise object with example values
@@ -972,7 +972,7 @@ class Productcustomerprice extends CommonObject
$this->localtax2_tx = '';
$this->fk_user = '';
$this->import_key = '';
- }
+ }
}
/**
diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php
index 89512848c1b..0882490446d 100644
--- a/htdocs/product/class/propalmergepdfproduct.class.php
+++ b/htdocs/product/class/propalmergepdfproduct.class.php
@@ -220,7 +220,7 @@ class Propalmergepdfproduct extends CommonObject
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Load object in memory from the database
*
@@ -337,10 +337,10 @@ class Propalmergepdfproduct extends CommonObject
$resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
- if (! $error)
- {
- if (! $notrigger)
- {
+ //if (! $error)
+ //{
+ // if (! $notrigger)
+ // {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
@@ -350,8 +350,8 @@ class Propalmergepdfproduct extends CommonObject
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
- }
- }
+ // }
+ //}
// Commit or rollback
if ($error)
@@ -430,7 +430,7 @@ class Propalmergepdfproduct extends CommonObject
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Delete object in database
*
@@ -448,10 +448,10 @@ class Propalmergepdfproduct extends CommonObject
$this->db->begin();
- if (! $error)
- {
- if (! $notrigger)
- {
+ //if (! $error)
+ //{
+ // if (! $notrigger)
+ // {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
@@ -461,8 +461,8 @@ class Propalmergepdfproduct extends CommonObject
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
- }
- }
+ // }
+ //}
if (! $error)
{
@@ -496,7 +496,7 @@ class Propalmergepdfproduct extends CommonObject
}
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Delete object in database
*
@@ -511,10 +511,10 @@ class Propalmergepdfproduct extends CommonObject
$this->db->begin();
- if (! $error)
- {
- if (! $notrigger)
- {
+ //if (! $error)
+ //{
+ // if (! $notrigger)
+ // {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
@@ -524,8 +524,8 @@ class Propalmergepdfproduct extends CommonObject
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
- }
- }
+ // }
+ //}
if (! $error)
{
diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php
index 4713da6e901..0032d17f97e 100644
--- a/htdocs/product/stock/class/entrepot.class.php
+++ b/htdocs/product/stock/class/entrepot.class.php
@@ -444,7 +444,7 @@ class Entrepot extends CommonObject
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of all warehouses
*
@@ -477,7 +477,7 @@ class Entrepot extends CommonObject
return $liste;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return number of unique different product into a warehouse
*
@@ -511,7 +511,7 @@ class Entrepot extends CommonObject
return $ret;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return stock and value of warehosue
*
@@ -557,7 +557,7 @@ class Entrepot extends CommonObject
return $this->LibStatut($this->statut, $mode);
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return label of a given status
*
@@ -684,7 +684,7 @@ class Entrepot extends CommonObject
$this->country_code='FR';
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return full path to current warehouse
*
@@ -726,7 +726,7 @@ class Entrepot extends CommonObject
return implode(' >> ', array_reverse($TArbo));
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return array of children warehouses ids from $id warehouse (recursive function)
*
@@ -751,7 +751,7 @@ class Entrepot extends CommonObject
}
return $TChildWarehouses;
- }
+ }
/**
* Create object on disk
diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php
index 19c5a1a0178..39a9bb94bed 100644
--- a/htdocs/product/stock/class/mouvementstock.class.php
+++ b/htdocs/product/stock/class/mouvementstock.class.php
@@ -111,7 +111,7 @@ class MouvementStock extends CommonObject
* @param int $id_product_batch Id product_batch (when skip_batch is false and we already know which record of product_batch to use)
* @return int <0 if KO, 0 if fk_product is null, >0 if OK
*/
- public function _create($user, $fk_product, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $skip_batch = false, $id_product_batch = 0)
+ private function _create($user, $fk_product, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $skip_batch = false, $id_product_batch = 0)
{
global $conf, $langs;
@@ -877,7 +877,7 @@ class MouvementStock extends CommonObject
return $result;
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return Url link of origin object
*
@@ -1032,7 +1032,7 @@ class MouvementStock extends CommonObject
return $this->LibStatut($mode);
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Renvoi le libelle d'un status donne
*
diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php
index 8bb3a984634..989caa232fb 100644
--- a/htdocs/product/stock/class/productlot.class.php
+++ b/htdocs/product/stock/class/productlot.class.php
@@ -490,7 +490,7 @@ class Productlot extends CommonObject
return $this->LibStatut(0, $mode);
}
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return label of a given status
*