diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 16d2b4b7542..51eafd3ef7a 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -35,9 +35,9 @@ class Interfaces * @var DoliDB Database handler. */ public $db; - + var $dir; // Directory with all core and external triggers files - + /** * @var string[] Error codes (or messages) */ @@ -53,6 +53,7 @@ class Interfaces $this->db = $db; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Function called when a Dolibarr business event occurs * This function call all qualified triggers. @@ -64,9 +65,9 @@ class Interfaces * @param Conf $conf Objet conf * @return int Nb of triggers ran if no error, -Nb of triggers with errors otherwise. */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function run_triggers($action,$object,$user,$langs,$conf) { + // phpcs:enable // Check parameters if (! is_object($object) || ! is_object($conf)) // Error { diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 2a791dc9a0e..38f7a1f2f53 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -38,7 +38,7 @@ class Ldap * @var string[] Array of error strings */ public $errors = array(); - + /** * Tableau des serveurs (IP addresses ou nom d'hotes) */ @@ -149,6 +149,7 @@ class Ldap // Connection handling methods ------------------------------------------- + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Connect and bind * Use this->server, this->serverPort, this->ldapProtocolVersion, this->serverType, this->searchUser, this->searchPassword @@ -156,9 +157,9 @@ class Ldap * * @return int <0 if KO, 1 if bind anonymous, 2 if bind auth */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function connect_bind() { + // phpcs:enable global $langs, $conf; $connected=0; @@ -655,6 +656,7 @@ class Ldap return -1; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Build a LDAP message * @@ -662,9 +664,9 @@ class Ldap * @param array $info Attributes array * @return string Content of file */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function dump_content($dn, $info) { + // phpcs:enable $content=''; // Create file content @@ -1436,15 +1438,16 @@ class Ldap return($retval); } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Convertit le temps ActiveDirectory en Unix timestamp * * @param string $value AD time to convert * @return integer Unix timestamp */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function convert_time($value) { + // phpcs:enable $dateLargeInt=$value; // nano secondes depuis 1601 !!!! $secsAfterADEpoch = $dateLargeInt / (10000000); // secondes depuis le 1 jan 1601 $ADToUnixConvertor=((1970-1601) * 365.242190) * 86400; // UNIX start date - AD start date * jours * secondes diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php index b31ebc34d01..9af073267ae 100644 --- a/htdocs/core/modules/cheque/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/modules_chequereceipts.php @@ -127,6 +127,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator */ public $error=''; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return list of active generation modules * @@ -134,9 +135,9 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps static function liste_modeles($db,$maxfilenamelength=0) { + // phpcs:enable global $conf; $type='chequereceipt'; diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index d6b998da357..93f11bddb43 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -64,6 +64,7 @@ class html_cerfafr extends ModeleDon } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Write the object to document file to disk * @@ -72,9 +73,9 @@ class html_cerfafr extends ModeleDon * @param string $currency Currency code * @return int >0 if OK, <0 if KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_file($don,$outputlangs,$currency='') { + // phpcs:enable global $user,$conf,$langs,$mysoc; $now=dol_now(); diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index 37cd11260f3..51f41978732 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -42,6 +42,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator public $error=''; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return list of active generation modules * @@ -49,9 +50,9 @@ abstract class ModelePdfExpedition extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of templates */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps static function liste_modeles($db,$maxfilenamelength=0) { + // phpcs:enable global $conf; $type='shipping'; diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 7c5e5f3acf4..74ba4775447 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -93,6 +93,7 @@ class pdf_timespent extends ModelePDFProjects } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Fonction generant le projet sur le disque * @@ -100,9 +101,9 @@ class pdf_timespent extends ModelePDFProjects * @param Translate $outputlangs Lang output object * @return int 1 if OK, <=0 if KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_file($object,$outputlangs) { + // phpcs:enable global $conf, $hookmanager, $langs, $user; if (! is_object($outputlangs)) $outputlangs=$langs; diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 20957f26415..6319798d65b 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -191,6 +191,7 @@ class doc_generic_stock_odt extends ModelePDFStock return $texte; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Function to build a document on disk using the generic odt module. * @@ -202,9 +203,9 @@ class doc_generic_stock_odt extends ModelePDFStock * @param int $hideref Do not show ref * @return int 1 if OK, <=0 if KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0) { + // phpcs:enable global $stock,$langs,$conf,$mysoc,$hookmanager,$user; if (empty($srctemplatepath)) 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 fc8ccc9e24e..c20e57f2d5c 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,8 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->atleastonediscount=0; } - /** + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + /** * Function to build pdf onto disk * * @param Object $object Object to generate @@ -204,9 +205,9 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param int $hideref Do not show ref * @return int 1=OK, 0=KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0) { + // phpcs:enable global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; if (! is_object($outputlangs)) $outputlangs=$langs; @@ -697,6 +698,7 @@ class pdf_aurore extends ModelePDFSupplierProposal } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Show payments table * @@ -706,12 +708,13 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param Translate $outputlangs Object langs for output * @return int <0 if KO, >0 if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _tableau_versements(&$pdf, $object, $posy, $outputlangs) { + // phpcs:enable } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Show miscellaneous information (payment mode, payment term, ...) * @@ -721,9 +724,9 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param Translate $outputlangs Langs object * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _tableau_info(&$pdf, $object, $posy, $outputlangs) { + // phpcs:enable global $conf; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -879,6 +882,7 @@ class pdf_aurore extends ModelePDFSupplierProposal } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Show total to pay * @@ -889,9 +893,9 @@ class pdf_aurore extends ModelePDFSupplierProposal * @param Translate $outputlangs Objet langs * @return int Position pour suite */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs) { + // phpcs:enable global $conf,$mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs);