diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 44a3ed233db..f7d0ce19f61 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -83,8 +83,9 @@ class pdf_sepamandate extends ModeleBankAccountDoc } - /** - * Fonction generant le projet sur le disque + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + /** + * Fonction generant le projet sur le disque * * @param Project $object Object project a generer * @param Translate $outputlangs Lang output object @@ -95,7 +96,6 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param null|array $moreparams More parameters * @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, $moreparams=null) { global $conf, $hookmanager, $langs, $user, $mysoc; @@ -427,6 +427,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Show miscellaneous information (payment mode, payment term, ...) * @@ -436,10 +437,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param Translate $outputlangs Langs object * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _tableau_info(&$pdf, $object, $posy, $outputlangs) { - global $conf, $mysoc; + // phpcs:enable + global $conf, $mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); @@ -472,7 +473,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc * @param Translate $outputlangs Objet langs * @return int Position pour suite */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _signature_area(&$pdf, $object, $posy, $outputlangs) { $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index e3a755fa523..1a4b732246d 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -44,16 +44,17 @@ abstract class ModelePDFCommandes extends CommonDocGenerator */ public $error=''; - /** - * Return list of active generation modules - * + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + /** + * Return list of active generation modules + * * @param DoliDB $db Database handler * @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 = 'order'; diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php index 8705d985661..ae0dcb6a74f 100644 --- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php @@ -174,7 +174,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder } - /** + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + /** * Function to build pdf onto disk * * @param Object $object Object to generate @@ -184,10 +185,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @param int $hidedesc Do not show desc * @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,$hookmanager; if (! is_object($outputlangs)) $outputlangs=$langs; @@ -630,6 +631,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder return 0; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Show miscellaneous information (payment mode, payment term, ...) * @@ -639,9 +641,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder * @param Translate $outputlangs Langs object * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _tableau_info(&$pdf, $object, $posy, $outputlangs) { + // phpcs:enable global $conf,$mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index d0a1497c0a0..5b78a8d61c7 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -1,6 +1,6 @@ + * Copyright (C) 2014-2018 Frederic France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,24 +35,24 @@ use OAuth\OAuth2\Service\Google; */ class printing_printgcp extends PrintingDriver { - var $name = 'printgcp'; - var $desc = 'PrintGCPDesc'; - var $picto = 'printer'; - var $active = 'PRINTING_PRINTGCP'; - var $conf = array(); - var $google_id = ''; - var $google_secret = ''; - + public $name = 'printgcp'; + public $desc = 'PrintGCPDesc'; + public $picto = 'printer'; + public $active = 'PRINTING_PRINTGCP'; + public $conf = array(); + public $google_id = ''; + public $google_secret = ''; + /** * @var string Error code (or message) */ public $error=''; - + /** * @var string[] Error codes (or messages) */ public $errors = array(); - + /** * @var DoliDB Database handler. */ @@ -227,14 +227,15 @@ class printing_printgcp extends PrintingDriver } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return list of available printers * * @return array list of printers */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function getlist_available_printers() { + // phpcs:enable // Token storage $storage = new DoliStorage($this->db, $this->conf); // Setup the credentials for the requests @@ -292,6 +293,7 @@ class printing_printgcp extends PrintingDriver return $ret; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Print selected file * @@ -300,9 +302,9 @@ class printing_printgcp extends PrintingDriver * @param string $subdir subdir for file * @return int 0 if OK, >0 if KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function print_file($file, $module, $subdir='') { + // phpcs:enable require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; global $conf, $user; @@ -412,14 +414,15 @@ class printing_printgcp extends PrintingDriver } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * List jobs print * * @return int 0 if OK, >0 if KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function list_jobs() { + // phpcs:enable global $conf, $db, $langs, $bc; $error = 0; diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index d9f65560705..eb7fb0184f4 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -210,6 +210,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Renvoi si un code est pris ou non (par autre tiers) * @@ -219,9 +220,9 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode * @param int $type 0 = customer/prospect , 1 = supplier * @return int 0 if available, <0 if KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function verif_dispo($db, $code, $soc, $type=0) { + // phpcs:enable global $conf, $mc; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; @@ -250,15 +251,16 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Renvoi si un code respecte la syntaxe * * @param string $code Code a verifier * @return int 0 si OK, <0 si KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function verif_syntax($code) { + // phpcs:enable $res = 0; if (dol_strlen($code) < 11) diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index baf1978ceae..f6a2a08bee7 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -107,6 +107,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Set accountancy account code for a third party into this->code * @@ -115,9 +116,9 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode * @param string $type 'customer' or 'supplier' * @return int >=0 if OK, <0 if KO */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_code($db, $societe, $type='') { + // phpcs:enable global $conf; $i = 0; diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php index 3423c4b2547..064be2e1f41 100644 --- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php @@ -1,8 +1,8 @@ - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013-2016 Philippe Grand - * Copyright (C) 2014 Marcos García +/* Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013-2016 Philippe Grand + * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,6 +40,7 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator public $error=''; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return list of active generation models * @@ -47,9 +48,9 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator * @param integer $maxfilenamelength Max length of value to show * @return array List of numbers */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps static function liste_modeles($db, $maxfilenamelength=0) { + // phpcs:enable global $conf; $type = 'invoice_supplier'; 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 fe225447e3b..5c409559491 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php @@ -176,7 +176,8 @@ class pdf_standard extends ModelePDFSuppliersPayments } - /** + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + /** * Function to build pdf onto disk * * @param PaiementFourn $object Id of object to generate @@ -187,9 +188,9 @@ class pdf_standard extends ModelePDFSuppliersPayments * @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,$hookmanager; if (! is_object($outputlangs)) $outputlangs=$langs; @@ -513,6 +514,7 @@ class pdf_standard extends ModelePDFSuppliersPayments } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Show total to pay * @@ -522,9 +524,9 @@ class pdf_standard extends ModelePDFSuppliersPayments * @param Translate $outputlangs Objet langs * @return int Position pour suite */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _tableau_cheque(&$pdf, $object, $posy, $outputlangs) { + // phpcs:enable global $conf,$mysoc; $default_font_size = pdf_getPDFFontSize($outputlangs); diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 100fa286763..887a4cda084 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -192,6 +192,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup return $texte; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Function to build a document on disk using the generic odt module. * @@ -203,9 +204,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup * @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 $user,$langs,$conf,$mysoc,$hookmanager; if (empty($srctemplatepath))