浏览代码

fix conflict

Philippe GRAND 6 年之前
父节点
当前提交
5d273960dc
共有 100 个文件被更改,包括 881 次插入287 次删除
  1. 8 3
      .travis.yml
  2. 4 4
      dev/setup/codesniffer/ruleset.xml
  3. 1 0
      dev/translation/autotranslator.class.php
  4. 4 0
      htdocs/accountancy/class/accountingaccount.class.php
  5. 1 0
      htdocs/accountancy/class/accountingjournal.class.php
  6. 5 1
      htdocs/accountancy/class/bookkeeping.class.php
  7. 2 0
      htdocs/adherents/canvas/actions_adherentcard_common.class.php
  8. 2 1
      htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
  9. 12 0
      htdocs/adherents/class/adherent.class.php
  10. 3 0
      htdocs/adherents/class/adherent_type.class.php
  11. 1 0
      htdocs/adherents/class/subscription.class.php
  12. 9 2
      htdocs/admin/dolistore/class/dolistore.class.php
  13. 1 0
      htdocs/api/class/api.class.php
  14. 2 3
      htdocs/api/class/api_access.class.php
  15. 1 0
      htdocs/asset/class/asset.class.php
  16. 1 0
      htdocs/asset/class/asset_type.class.php
  17. 17 0
      htdocs/categories/class/categorie.class.php
  18. 4 2
      htdocs/comm/action/class/actioncomm.class.php
  19. 1 1
      htdocs/comm/action/class/actioncommreminder.class.php
  20. 1 0
      htdocs/comm/action/class/cactioncomm.class.php
  21. 15 0
      htdocs/comm/action/class/ical.class.php
  22. 9 5
      htdocs/comm/mailing/class/advtargetemailing.class.php
  23. 3 1
      htdocs/comm/mailing/class/mailing.class.php
  24. 20 0
      htdocs/comm/propal/class/propal.class.php
  25. 69 50
      htdocs/commande/class/commande.class.php
  26. 23 7
      htdocs/compta/bank/class/account.class.php
  27. 2 0
      htdocs/compta/bank/class/paymentvarious.class.php
  28. 1 1
      htdocs/compta/deplacement/class/deplacement.class.php
  29. 4 2
      htdocs/compta/facture/class/facture-rec.class.php
  30. 22 0
      htdocs/compta/facture/class/facture.class.php
  31. 11 6
      htdocs/compta/localtax/class/localtax.class.php
  32. 7 1
      htdocs/compta/paiement/cheque/class/remisecheque.class.php
  33. 8 3
      htdocs/compta/paiement/class/paiement.class.php
  34. 16 1
      htdocs/compta/prelevement/class/bonprelevement.class.php
  35. 1 1
      htdocs/compta/prelevement/class/ligneprelevement.class.php
  36. 1 1
      htdocs/compta/prelevement/class/rejetprelevement.class.php
  37. 2 0
      htdocs/compta/salaries/class/paymentsalary.class.php
  38. 17 16
      htdocs/compta/sociales/class/cchargesociales.class.php
  39. 3 1
      htdocs/compta/sociales/class/chargesociales.class.php
  40. 2 0
      htdocs/compta/sociales/class/paymentsocialcontribution.class.php
  41. 11 6
      htdocs/compta/tva/class/tva.class.php
  42. 25 24
      htdocs/contact/canvas/actions_contactcard_common.class.php
  43. 2 1
      htdocs/contact/canvas/default/actions_contactcard_default.class.php
  44. 7 0
      htdocs/contact/class/contact.class.php
  45. 12 0
      htdocs/contrat/class/contrat.class.php
  46. 9 1
      htdocs/core/class/CMailFile.class.php
  47. 2 1
      htdocs/core/class/CSMSFile.class.php
  48. 1 1
      htdocs/core/class/antivir.class.php
  49. 2 0
      htdocs/core/class/canvas.class.php
  50. 1 1
      htdocs/core/class/comment.class.php
  51. 14 3
      htdocs/core/class/commondocgenerator.class.php
  52. 4 2
      htdocs/core/class/commoninvoice.class.php
  53. 33 2
      htdocs/core/class/commonobject.class.php
  54. 18 11
      htdocs/core/class/commonstickergenerator.class.php
  55. 2 0
      htdocs/core/class/discount.class.php
  56. 1 1
      htdocs/core/class/doleditor.class.php
  57. 32 1
      htdocs/core/class/dolgraph.class.php
  58. 7 0
      htdocs/core/class/dolreceiptprinter.class.php
  59. 1 0
      htdocs/core/class/emailsenderprofile.class.php
  60. 4 0
      htdocs/core/class/extrafields.class.php
  61. 1 0
      htdocs/core/class/fiscalyear.class.php
  62. 10 11
      htdocs/core/class/genericobject.class.php
  63. 45 1
      htdocs/core/class/html.form.class.php
  64. 6 0
      htdocs/core/class/html.formaccounting.class.php
  65. 2 0
      htdocs/core/class/html.formactions.class.php
  66. 12 7
      htdocs/core/class/html.formadmin.class.php
  67. 2 1
      htdocs/core/class/html.formbarcode.class.php
  68. 12 2
      htdocs/core/class/html.formcompany.class.php
  69. 5 4
      htdocs/core/class/html.formcontract.class.php
  70. 1 0
      htdocs/core/class/html.formcron.class.php
  71. 4 1
      htdocs/core/class/html.formfile.class.php
  72. 1 0
      htdocs/core/class/html.formintervention.class.php
  73. 6 0
      htdocs/core/class/html.formmail.class.php
  74. 18 5
      htdocs/core/class/html.formother.class.php
  75. 4 1
      htdocs/core/class/html.formprojet.class.php
  76. 1 1
      htdocs/core/class/html.formsms.class.php
  77. 1 1
      htdocs/core/class/html.formsocialcontrib.class.php
  78. 1 0
      htdocs/core/class/interfaces.class.php
  79. 3 0
      htdocs/core/class/ldap.class.php
  80. 5 2
      htdocs/core/class/menu.class.php
  81. 27 8
      htdocs/core/class/openid.class.php
  82. 4 1
      htdocs/core/class/rssparser.class.php
  83. 7 0
      htdocs/core/class/smtps.class.php
  84. 3 0
      htdocs/core/class/translate.class.php
  85. 18 0
      htdocs/core/db/Database.interface.php
  86. 20 0
      htdocs/core/db/mssql.class.php
  87. 18 1
      htdocs/core/db/mysqli.class.php
  88. 18 0
      htdocs/core/db/pgsql.class.php
  89. 22 0
      htdocs/core/db/sqlite3.class.php
  90. 18 0
      htdocs/core/modules/DolibarrModules.class.php
  91. 2 0
      htdocs/core/modules/action/modules_action.php
  92. 1 1
      htdocs/core/modules/action/rapport.pdf.php
  93. 9 9
      htdocs/core/modules/bank/doc/pdf_ban.modules.php
  94. 50 48
      htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
  95. 7 7
      htdocs/core/modules/bank/modules_bank.php
  96. 7 6
      htdocs/core/modules/barcode/mod_barcode_product_standard.php
  97. 3 0
      htdocs/core/modules/cheque/doc/pdf_blochet.class.php
  98. 1 0
      htdocs/core/modules/cheque/mod_chequereceipt_mint.php
  99. 1 1
      htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
  100. 1 0
      htdocs/core/modules/cheque/modules_chequereceipts.php

+ 8 - 3
.travis.yml

@@ -37,7 +37,6 @@ php:
 - '7.0'
 - '7.1'
 - '7.2'
-#- hhvm		only with dist: trusty
 - nightly
 
 env:
@@ -63,6 +62,14 @@ matrix:
   - php: nightly
   # We exclude some combinations not usefull to save Travis CPU
   exclude:
+  - php: '5.5'
+    env: DB=mysql
+  - php: '5.6'
+    env: DB=mysql
+  - php: '7.0'
+    env: DB=mysql
+  - php: '7.1'
+    env: DB=mysql
   - php: '5.5'
     env: DB=postgresql
   - php: '5.6'
@@ -71,8 +78,6 @@ matrix:
     env: DB=postgresql
   - php: '7.1'
     env: DB=postgresql
-  - php: hhvm
-    env: DB=postgresql
   - php: nightly
     env: DB=postgresql
 

+ 4 - 4
dev/setup/codesniffer/ruleset.xml

@@ -363,12 +363,12 @@
         <severity>0</severity>
 	</rule>
 
-	<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
+    <!--<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
         <severity>0</severity>
-	</rule>
-	<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
+    </rule>-->
+	<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
         <severity>0</severity>
-	</rule>
+	</rule>-->
 	<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
         <severity>0</severity>
 	</rule>

+ 1 - 0
dev/translation/autotranslator.class.php

@@ -72,6 +72,7 @@ class autoTranslator
 	 *
 	 * 	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
 	private function parse_refLangTranslationFiles()
 	{
 

+ 4 - 0
htdocs/accountancy/class/accountingaccount.class.php

@@ -99,6 +99,7 @@ class AccountingAccount extends CommonObject
     var $active;       // duplicate with status
 
 
+
 	/**
 	 * Constructor
 	 *
@@ -534,6 +535,7 @@ class AccountingAccount extends CommonObject
 	 * @param  int  $id         Id
 	 * @return int              <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function account_desactivate($id)
     {
 		$result = $this->checkUsage();
@@ -567,6 +569,7 @@ class AccountingAccount extends CommonObject
 	 * @param  int  $id         Id
 	 * @return int              <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function account_activate($id)
     {
 		$this->db->begin();
@@ -606,6 +609,7 @@ class AccountingAccount 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              Label of status
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=0)
 	{
 		global $langs;

+ 1 - 0
htdocs/accountancy/class/accountingjournal.class.php

@@ -271,6 +271,7 @@ class AccountingJournal extends CommonObject
 	 *  @param  int		$mode		  	0=libelle long, 1=libelle court
 	 *  @return string 				   	Label of type
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibType($nature,$mode=0)
 	{
 		global $langs;

+ 5 - 1
htdocs/accountancy/class/bookkeeping.class.php

@@ -1560,6 +1560,7 @@ class BookKeeping extends CommonObject
 	 * @param	string	$model	Model
 	 * @return	int				Result
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function export_bookkeping($model = 'ebp')
     {
 		global $conf;
@@ -1717,7 +1718,8 @@ class BookKeeping extends CommonObject
 	* @param int		$select_out	Set value returned by select 0=rowid (default), 1=account_number
 	* @param int		$aabase		Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
 	* @return string	String with HTML select
-	*/
+    */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '')
     {
 		global $conf;
@@ -1782,6 +1784,7 @@ class BookKeeping extends CommonObject
 	 * @param 	string 	$account	Accounting account
 	 * @return 	string 				Root account
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_compte_racine($account = null)
 	{
 		global $conf;
@@ -1822,6 +1825,7 @@ class BookKeeping extends CommonObject
 	 * @param	string	$account	Accounting account
 	 * @return	string				Account desc
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_compte_desc($account = null)
 	{
 		global $conf;

+ 2 - 0
htdocs/adherents/canvas/actions_adherentcard_common.class.php

@@ -82,6 +82,7 @@ abstract class ActionsAdherentCardCommon
      *  @param	int			$id			Id
      *  @return	string					HTML output
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function assign_values(&$action, $id)
     {
         global $conf, $langs, $user, $canvas;
@@ -237,6 +238,7 @@ abstract class ActionsAdherentCardCommon
      *
      *  @return		string					HTML output
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
     private function assign_post()
     {
         global $langs, $mysoc;

+ 2 - 1
htdocs/adherents/canvas/default/actions_adherentcard_default.class.php

@@ -74,6 +74,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
 	 *  @param	int			$id				Id
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function assign_values(&$action, $id)
 	{
 		global $limit, $offset, $sortfield, $sortorder;
@@ -129,6 +130,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
 	 *  @param	string	$sortorder	Sort order ('ASC' or 'DESC')
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LoadListDatas($limit, $offset, $sortfield, $sortorder)
 	{
 		global $conf, $langs;
@@ -138,4 +140,3 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
         $this->list_datas = array();
 	}
 }
-

+ 12 - 0
htdocs/adherents/class/adherent.class.php

@@ -150,6 +150,7 @@ class Adherent extends CommonObject
 	 *  @param	string	$errors_to			erros to
 	 *  @return	int							<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='')
 	{
 		global $conf,$langs;
@@ -647,6 +648,7 @@ class Adherent extends CommonObject
 	 *	@param	User	$user			User making change
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_end_date($user)
 	{
 		$this->db->begin();
@@ -1000,6 +1002,7 @@ class Adherent extends CommonObject
 	 *	@param	string	$login		login of member
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_login($login)
 	{
 		global $conf;
@@ -1030,6 +1033,7 @@ class Adherent extends CommonObject
 	 *	@param	string	$lastname	Lastname
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_name($firstname,$lastname)
 	{
 		global $conf;
@@ -1203,6 +1207,7 @@ class Adherent extends CommonObject
 	 *
 	 *	@return		int			<0 si KO, >0 si OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_subscriptions()
 	{
 		global $langs;
@@ -1753,6 +1758,7 @@ class Adherent extends CommonObject
 	 *
 	 *  @return		int		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_to_abo()
 	{
 		global $conf,$langs;
@@ -1810,6 +1816,7 @@ class Adherent extends CommonObject
 	 *
 	 *  @return     int     <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function del_to_abo()
 	{
 		global $conf,$langs;
@@ -1993,6 +2000,7 @@ class Adherent 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      						Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
 	{
 		global $langs;
@@ -2082,6 +2090,7 @@ class Adherent extends CommonObject
 	 *
 	 *      @return     int         <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_state_board()
 	{
 		global $conf;
@@ -2117,6 +2126,7 @@ class Adherent extends CommonObject
 	 *      @param	User	$user   		Objet user
 	 *      @return WorkboardResponse|int 	<0 if KO, WorkboardResponse if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_board($user)
 	{
 		global $conf, $langs;
@@ -2262,6 +2272,7 @@ class Adherent extends CommonObject
 	 *								2=Return key only (uid=qqq)
 	 *	@return	string				DN
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _load_ldap_dn($info,$mode=0)
 	{
 		global $conf;
@@ -2278,6 +2289,7 @@ class Adherent extends CommonObject
 	 *
 	 *	@return		array		Tableau info des attributs
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _load_ldap_info()
 	{
 		global $conf,$langs;

+ 3 - 0
htdocs/adherents/class/adherent_type.class.php

@@ -295,6 +295,7 @@ class AdherentType extends CommonObject
 	 *
 	 *  @return 	array	List of types of members
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function liste_array()
 	{
 		global $conf,$langs;
@@ -430,6 +431,7 @@ class AdherentType extends CommonObject
 	 *									2=Return key only (uid=qqq)
 	 *	@return		string				DN
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _load_ldap_dn($info,$mode=0)
 	{
 		global $conf;
@@ -446,6 +448,7 @@ class AdherentType extends CommonObject
 	 *
 	 *	@return		array		Tableau info des attributs
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _load_ldap_info()
 	{
 		global $conf,$langs;

+ 1 - 0
htdocs/adherents/class/subscription.class.php

@@ -369,6 +369,7 @@ class Subscription extends CommonObject
 	 *  @param	int			$statut      			Id statut
 	 *  @return string      						Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut)
 	{
 	    global $langs;

+ 9 - 2
htdocs/admin/dolistore/class/dolistore.class.php

@@ -169,6 +169,7 @@ class Dolistore
 	 * @param 	int			$parent		Id of parent category
 	 * @return 	string
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_categories($parent = 0)
 	{
 		if (!isset($this->categories)) die('not possible');
@@ -215,6 +216,7 @@ class Dolistore
 	 *
 	 * @return string			HTML output
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_products()
 	{
 		global $langs, $conf;
@@ -297,6 +299,7 @@ class Dolistore
      * @param   string    $text     symbol previous
      * @return  string              html previous link
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_previous_link($text = '<<')
 	{
 		return '<a href="'.$this->get_previous_url().'" class="button">'.$text.'</a>';
@@ -308,17 +311,19 @@ class Dolistore
      * @param   string    $text     symbol next
      * @return  string              html next link
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_next_link($text = '>>')
 	{
 		return '<a href="'.$this->get_next_url().'" class="button">'.$text.'</a>';
 	}
 
-    /**
+   /**
      * get previous url
      *
      * @return string    previous url
      */
-	function get_previous_url()
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ 	function get_previous_url()
 	{
 		$param_array = array();
 		if ($this->start < $this->per_page) {
@@ -340,6 +345,7 @@ class Dolistore
      *
      * @return string    next url
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_next_url()
 	{
 		$param_array = array();
@@ -364,6 +370,7 @@ class Dolistore
      * @param   string  $v2     version 2
      * @return int              result of compare
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function version_compare($v1, $v2)
 	{
 		$v1       = explode('.', $v1);

+ 1 - 0
htdocs/api/class/api.class.php

@@ -277,6 +277,7 @@ class DolibarrApi
 	 * @param  array    $matches       Array of found string by regex search
 	 * @return string                  Forged criteria. Example: "t.field like 'abc%'"
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	static function _forge_criteria_callback($matches)
 	{
 	    global $db;

+ 2 - 3
htdocs/api/class/api_access.class.php

@@ -59,14 +59,13 @@ class DolibarrApiAccess implements iAuthenticate
 	 */
 	public static $user = '';
 
-    // @codingStandardsIgnoreStart
-
 	/**
 	 * Check access
 	 *
 	 * @return bool
 	 * @throws RestException
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName
 	public function __isAllowed()
 	{
 		global $conf, $db;
@@ -172,11 +171,11 @@ class DolibarrApiAccess implements iAuthenticate
 	 * @example Digest
 	 * @example OAuth
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName
 	public function __getWWWAuthenticateString()
     {
         return '';
     }
-    // @codingStandardsIgnoreEnd
 
 	/**
 	 * Verify access

+ 1 - 0
htdocs/asset/class/asset.class.php

@@ -355,6 +355,7 @@ class Asset extends CommonObject
 	 *  @param  int     $mode           0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
 	 *  @return string                  Label of status
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	static function LibStatut($status,$mode=0)
 	{
 		global $langs;

+ 1 - 0
htdocs/asset/class/asset_type.class.php

@@ -287,6 +287,7 @@ class AssetType extends CommonObject
 	 *
 	 *  @return 	array	List of types of members
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function liste_array()
 	{
 		global $conf,$langs;

+ 17 - 0
htdocs/categories/class/categorie.class.php

@@ -651,6 +651,7 @@ class Categorie extends CommonObject
 	 * @param   string     		$type 	Type of category ('product', ...)
 	 * @return  int                		1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_type($obj, $type)
 	{
 		global $user,$langs,$conf;
@@ -753,6 +754,7 @@ class Categorie extends CommonObject
 	 *
 	 * @return  int          1 if OK, -1 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function del_type($obj,$type)
 	{
 		global $user,$langs,$conf;
@@ -973,6 +975,7 @@ class Categorie extends CommonObject
 	 *
 	 * @return	array|int   <0 KO, array ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_filles()
 	{
 		$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
@@ -1002,6 +1005,7 @@ class Categorie extends CommonObject
 	 *
 	 *	@return		int		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
 	private function load_motherof()
 	{
 		global $conf;
@@ -1046,6 +1050,7 @@ class Categorie extends CommonObject
 	 *
 	 * @return  array               	Array of categories. this->cats and this->motherof are set.
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_full_arbo($type, $markafterid=0)
 	{
 	    global $conf, $langs;
@@ -1129,6 +1134,7 @@ class Categorie extends CommonObject
 	 * 	@param		int		$protection		Deep counter to avoid infinite loop
 	 *	@return		void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function build_path_from_id_categ($id_categ,$protection=1000)
 	{
 		dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG);
@@ -1169,6 +1175,7 @@ class Categorie extends CommonObject
 	 *
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function debug_cats()
 	{
 		// Display $this->cats
@@ -1192,6 +1199,7 @@ class Categorie extends CommonObject
 	 *	@param	boolean		$parent		Just parent categories if true
 	 *	@return	array					Table of Object Category
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_all_categories($type=null, $parent=false)
 	{
 		if (! is_numeric($type)) $type = $this->MAP_ID[$type];
@@ -1227,6 +1235,7 @@ class Categorie extends CommonObject
 	 *
 	 * 	@return		integer		1 if already exist, 0 otherwise, -1 if error
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function already_exists()
 	{
 		$type=$this->type;
@@ -1277,6 +1286,7 @@ class Categorie extends CommonObject
 	 *	@param		int		$type		Type of category (0, 1, ...)
 	 *	@return		array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_main_categories($type=null)
 	{
 		return $this->get_all_categories($type, true);
@@ -1291,6 +1301,7 @@ class Categorie extends CommonObject
 	 * @param   int     $nocolor     0
 	 * @return	array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function print_all_ways($sep = " &gt;&gt; ", $url='', $nocolor=0)
 	{
 		$ways = array();
@@ -1344,6 +1355,7 @@ class Categorie extends CommonObject
 	 *
 	 *	@return	int|array <0 KO, array OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_meres()
 	{
 		$parents = array();
@@ -1379,6 +1391,7 @@ class Categorie extends CommonObject
 	 *
 	 *	@return	array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_all_ways()
 	{
 		$ways = array();
@@ -1594,6 +1607,7 @@ class Categorie extends CommonObject
 	 *  @param      string	$file		Nom du fichier uploade
 	 *	@return		void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_photo($sdir, $file)
 	{
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -1643,6 +1657,7 @@ class Categorie extends CommonObject
 	 *    @param      int		$nbmax      Nombre maximum de photos (0=pas de max)
 	 *    @return     array       			Tableau de photos
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function liste_photos($dir,$nbmax=0)
 	{
 		include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';
@@ -1697,6 +1712,7 @@ class Categorie extends CommonObject
 	 *    @param	string		$file		Path to file
 	 *    @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_photo($file)
 	{
         require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -1725,6 +1741,7 @@ class Categorie extends CommonObject
 	 *  @param    	string	$file        Path to file
 	 *  @return		void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_image_size($file)
 	{
 		$infoImg = getimagesize($file); // Recuperation des infos de l'image

+ 4 - 2
htdocs/comm/action/class/actioncomm.class.php

@@ -699,6 +699,7 @@ class ActionComm extends CommonObject
      *
      *    @return	int				<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function fetch_userassigned()
     {
         $sql ="SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency";
@@ -1023,6 +1024,7 @@ class ActionComm extends CommonObject
      * @param	int		$load_state_board	Charge indicateurs this->nb de tableau de bord
      * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function load_board($user, $load_state_board=0)
     {
     	global $conf, $langs;
@@ -1149,6 +1151,7 @@ class ActionComm extends CommonObject
      *      @param  int     $datestart      Date start of event
      *    	@return string		    		Label
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function LibStatut($percent,$mode,$hidenastatus=0,$datestart='')
     {
         global $langs;
@@ -1358,6 +1361,7 @@ class ActionComm extends CommonObject
      *		@param	array		$filters		Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...)
      *		@return int     					<0 if error, nb of events in new file if ok
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function build_exportfile($format,$type,$cachedelay,$filename,$filters)
     {
         global $conf,$langs,$dolibarr_main_url_root,$mysoc;
@@ -1678,8 +1682,6 @@ class ActionComm extends CommonObject
 
 		// TODO Scan events of type 'email' into table llx_actioncomm_reminder with status todo, send email, then set status to done
 
-
-
     	// Delete also very old past events (we do not keep more than 1 month record in past)
 		$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder WHERE dateremind < '".$this->db->jdate($now - (3600 * 24 * 32))."'";
 		$this->db->query($sql);

+ 1 - 1
htdocs/comm/action/class/actioncommreminder.class.php

@@ -180,6 +180,7 @@ class ActionCommReminder extends CommonObject
 	 *  @param  int		$mode          	0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
 	 *  @return string 			       	Label of status
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	static function LibStatut($status,$mode=0)
 	{
 		global $langs;
@@ -233,4 +234,3 @@ class ActionCommReminder extends CommonObject
 		$this->initAsSpecimenCommon();
 	}
 }
-

+ 1 - 0
htdocs/comm/action/class/cactioncomm.class.php

@@ -125,6 +125,7 @@ class CActionComm
      *  @param	int			$shortlabel		1=Get short label instead of long label
      *  @return mixed      					Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode.
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0)
     {
         global $langs,$conf;

+ 15 - 0
htdocs/comm/action/class/ical.class.php

@@ -52,6 +52,7 @@ class ICal
      * @param 	string 	$file		File
      * @return	string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function read_file($file)
     {
         $this->file = $file;
@@ -71,6 +72,7 @@ class ICal
      *
      * @return int
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_event_count()
     {
         return $this->event_count;
@@ -81,6 +83,7 @@ class ICal
      *
      * @return int
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_todo_count()
     {
         return $this->todo_count;
@@ -202,6 +205,7 @@ class ICal
      * @param 	string 	$value		Value
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function add_to_array($type, $key, $value)
     {
 
@@ -260,6 +264,7 @@ class ICal
      * @param 	string 	$text	Text
      * @return 	array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function retun_key_value($text)
     {
     	/*
@@ -283,6 +288,7 @@ class ICal
      * @param 	string 	$value	string
      * @return 	array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function ical_rrule($value)
     {
     	$result=array();
@@ -300,6 +306,7 @@ class ICal
      * @param 	string		$ical_date		String date
      * @return 	int
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function ical_date_to_unix($ical_date)
     {
         $ical_date = str_replace('T', '', $ical_date);
@@ -322,6 +329,7 @@ class ICal
      * @param 	string 		$value			Value
      * @return 	array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function ical_dt_date($key, $value)
     {
     	$return_value=array();
@@ -349,6 +357,7 @@ class ICal
      *
      * @return array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_sort_event_list()
     {
         $temp = $this->get_event_list();
@@ -370,6 +379,7 @@ class ICal
      * @param 	array 	$b		Operand b
      * @return 	integer
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function ical_dtstart_compare($a, $b)
     {
         return strnatcasecmp($a['DTSTART']['unixtime'], $b['DTSTART']['unixtime']);
@@ -380,6 +390,7 @@ class ICal
      *
      * @return array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_event_list()
     {
         return (! empty($this->cal['VEVENT'])?$this->cal['VEVENT']:'');
@@ -390,6 +401,7 @@ class ICal
      *
      * @return array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_freebusy_list()
     {
         return $this->cal['VFREEBUSY'];
@@ -400,6 +412,7 @@ class ICal
      *
      * @return array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_todo_list()
     {
         return $this->cal['VTODO'];
@@ -410,6 +423,7 @@ class ICal
      *
      * @return array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_calender_data()
     {
         return $this->cal['VCALENDAR'];
@@ -420,6 +434,7 @@ class ICal
      *
      * @return array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_all_data()
     {
         return $this->cal;

+ 9 - 5
htdocs/comm/mailing/class/advtargetemailing.class.php

@@ -75,9 +75,9 @@ class AdvanceTargetingMailing extends CommonObject
 
 
 	/**
-	 * Constructor
+	 *  Constructor
 	 *
-	 * 	@param	DoliDb		$db		Database handler
+	 *  @param  DoliDb		$db		Database handler
 	 */
 	function __construct($db)
 	{
@@ -260,6 +260,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 *  @param	int		$id    Id object
 	 *  @return int          	<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_by_mailing($id=0)
 	{
 		global $langs;
@@ -326,6 +327,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 *  @param	string	$type_element	Type target
 	 *  @return int          			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_by_element($id=0, $type_element='mailing')
 	{
 		global $langs;
@@ -550,6 +552,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 * 	@param		array		$arrayquery	All element to Query
 	 * 	@return		int			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function query_thirdparty($arrayquery)
 	{
 		global $langs,$conf;
@@ -642,16 +645,16 @@ class AdvanceTargetingMailing extends CommonObject
 						if (!empty($arrayquery['options_'.$key.'_max'])) {
 							$sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'].")";
 						}
-					} else if (($extrafields->attribute_type[$key] == 'date') ||
+					} elseif (($extrafields->attribute_type[$key] == 'date') ||
 						($extrafields->attribute_type[$key] == 'datetime')) {
 						if (!empty($arrayquery['options_'.$key.'_end_dt'])){
 							$sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')";
 						}
-					}else if ($extrafields->attribute_type[$key] == 'boolean') {
+					} elseif ($extrafields->attribute_type[$key] == 'boolean') {
 						if ($arrayquery['options_'.$key]!=''){
 							$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
 						}
-					}else{
+					} else {
 						if (is_array($arrayquery['options_'.$key])) {
 							$sqlwhere[]= " (te.".$key." IN ('".implode("','",$arrayquery['options_'.$key])."'))";
 						} elseif (!empty($arrayquery['options_'.$key])) {
@@ -704,6 +707,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 * 	@param		int			$withThirdpartyFilter	add contact with tridparty filter
 	 * 	@return		int			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function query_contact($arrayquery, $withThirdpartyFilter = 0)
 	{
 		global $langs,$conf;

+ 3 - 1
htdocs/comm/mailing/class/mailing.class.php

@@ -444,6 +444,7 @@ class Mailing extends CommonObject
 	 *
 	 *  @return int       1 if OK, 0 if error
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_targets()
 	{
 		$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles";
@@ -469,6 +470,7 @@ class Mailing extends CommonObject
 	 *	@param	User	$user      	Objet user qui valide
 	 *  @return int         		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function reset_targets_status($user)
 	{
 		$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
@@ -541,6 +543,7 @@ class Mailing 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        			Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=0)
 	{
 		global $langs;
@@ -644,4 +647,3 @@ class Mailing extends CommonObject
 		}
 	}
 }
-

+ 20 - 0
htdocs/comm/propal/class/propal.class.php

@@ -249,6 +249,7 @@ class Propal extends CommonObject
 	 *	TODO	Replace calls to this function by generation objet Ligne
 	 *			inserted into table $this->products
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_product($idproduct, $qty, $remise_percent=0)
 	{
 		global $conf, $mysoc;
@@ -303,6 +304,7 @@ class Propal extends CommonObject
 	 *	@param     int		$idremise			Id of fixed discount
 	 *  @return    int          				>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_discount($idremise)
 	{
 		global $langs;
@@ -1182,6 +1184,7 @@ class Propal extends CommonObject
 	 *	@return    	int				Id of the new object if ok, <0 if ko
 	 *	@see       	create
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function create_from($user)
 	{
 		// i love this function because $this->products is not used in create function...
@@ -1572,6 +1575,7 @@ class Propal extends CommonObject
 	 * @param		int		$only_product	Return only physical products
 	 * @return		int						<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_lines($only_product=0)
 	{
 		$this->lines=array();
@@ -1812,6 +1816,7 @@ class Propal extends CommonObject
 	 *  @param  int			$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *  @return	int         			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_date($user, $date, $notrigger=0)
 	{
 		if (empty($date))
@@ -1879,6 +1884,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         				<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_echeance($user, $date_fin_validite, $notrigger=0)
 	{
 		if (! empty($user->rights->propal->creer))
@@ -1939,6 +1945,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         				<0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_date_livraison($user, $date_livraison, $notrigger=0)
 	{
 		if (! empty($user->rights->propal->creer))
@@ -1999,6 +2006,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *  @return     int           			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_availability($user, $id, $notrigger=0)
 	{
 		if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT)
@@ -2068,6 +2076,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *  @return     int           		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_demand_reason($user, $id, $notrigger=0)
 	{
 		if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT)
@@ -2139,6 +2148,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *  @return     int						<0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_ref_client($user, $ref_client, $notrigger=0)
 	{
 		if (! empty($user->rights->propal->creer))
@@ -2202,6 +2212,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         		<0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_remise_percent($user, $remise, $notrigger=0)
 	{
 		$remise=trim($remise)?trim($remise):0;
@@ -2267,6 +2278,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         		<0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_remise_absolue($user, $remise, $notrigger=0)
 	{
 		$remise=trim($remise)?trim($remise):0;
@@ -2550,6 +2562,7 @@ class Propal extends CommonObject
 	 *  @param		int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int					<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_draft($user, $notrigger=0)
 	{
 		$error=0;
@@ -2613,6 +2626,7 @@ class Propal extends CommonObject
 	 *    @param    string	$sortorder			Sort order
 	 *    @return	int		       				-1 if KO, array with result if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC')
 	{
 		global $user;
@@ -2692,6 +2706,7 @@ class Propal extends CommonObject
 	 *	@param		int		$id			Id propal
 	 *	@return		array				Array of invoices id
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function InvoiceArrayList($id)
 	{
 		$ga = array();
@@ -2972,6 +2987,7 @@ class Propal extends CommonObject
 	 *	@return int						>0 si ok, <0 si ko
 	 *	@deprecated use set_demand_reason
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function demand_reason($demand_reason_id, $notrigger=0)
 	{
 		global $user;
@@ -3111,6 +3127,7 @@ class Propal extends CommonObject
 	 *    	@param      int			$mode      	0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto
 	 *    	@return     string		Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=1)
 	{
 		global $conf;
@@ -3156,6 +3173,7 @@ class Propal extends CommonObject
 	 *      @param          int		$mode   "opened" for proposal to close, "signed" for proposal to invoice
 	 *      @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_board($user,$mode)
 	{
 		global $conf, $langs;
@@ -3328,6 +3346,7 @@ class Propal extends CommonObject
 	 *
 	 *      @return     int         <0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_state_board()
 	{
 		global $user;
@@ -4215,6 +4234,7 @@ class PropaleLigne extends CommonObjectLine
 	 *
 	 *	@return		int		<0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_total()
 	{
 		$this->db->begin();

+ 69 - 50
htdocs/commande/class/commande.class.php

@@ -441,6 +441,7 @@ class Commande extends CommonOrder
 	 *	@param	int		$idwarehouse	Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on)
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_draft($user, $idwarehouse=-1)
 	{
 		global $conf,$langs;
@@ -522,6 +523,7 @@ class Commande extends CommonOrder
 	 *	@param      User	$user       Object user that change status
 	 *	@return     int         		<0 if KO, 0 if nothing is done, >0 if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_reopen($user)
 	{
 		$error=0;
@@ -875,7 +877,7 @@ class Commande extends CommonOrder
 						$line->fk_unit,
 						$this->element,
 						$line->id
-						);
+					);
 					if ($result < 0)
 					{
 						if ($result != self::STOCK_NOT_ENOUGH_FOR_ORDER)
@@ -1493,6 +1495,7 @@ class Commande extends CommonOrder
 	 *	TODO	Remplacer les appels a cette fonction par generation objet Ligne
 	 *			insere dans tableau $this->products
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='')
 	{
 		global $conf, $mysoc;
@@ -1513,56 +1516,57 @@ class Commande extends CommonOrder
 			$localtax2_tx=get_localtax($tva_tx,2,$this->thirdparty,$mysoc,$tva_npr);
 
 			// multiprix
-			if($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level)
+			if($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) {
 				$price = $prod->multiprices[$this->thirdparty->price_level];
-				else
-					$price = $prod->price;
-
-					$line=new OrderLine($this->db);
-
-					$line->context = $this->context;
-
-					$line->fk_product=$idproduct;
-					$line->desc=$prod->description;
-					$line->qty=$qty;
-					$line->subprice=$price;
-					$line->remise_percent=$remise_percent;
-					$line->vat_src_code=$vat_src_code;
-					$line->tva_tx=$tva_tx;
-					$line->localtax1_tx=$localtax1_tx;
-					$line->localtax2_tx=$localtax2_tx;
-					$line->ref=$prod->ref;
-					$line->libelle=$prod->label;
-					$line->product_desc=$prod->description;
-					$line->fk_unit=$prod->fk_unit;
-
-					// Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
-					// Save the start and end date of the line in the object
-					if ($date_start) { $line->date_start = $date_start; }
-					if ($date_end)   { $line->date_end = $date_end; }
-
-					$this->lines[] = $line;
-
-					/** POUR AJOUTER AUTOMATIQUEMENT LES SOUSPRODUITS a LA COMMANDE
-					 if (! empty($conf->global->PRODUIT_SOUSPRODUITS))
-					 {
-					 $prod = new Product($this->db);
-					 $prod->fetch($idproduct);
-					 $prod -> get_sousproduits_arbo();
-					 $prods_arbo = $prod->get_arbo_each_prod();
-					 if(count($prods_arbo) > 0)
-					 {
-					 foreach($prods_arbo as $key => $value)
-					 {
-					 // print "id : ".$value[1].' :qty: '.$value[0].'<br>';
-					 if(! in_array($value[1],$this->products))
-					 $this->add_product($value[1], $value[0]);
-
-					 }
-					 }
-
-					 }
-					 **/
+			} else {
+				$price = $prod->price;
+			}
+
+			$line=new OrderLine($this->db);
+
+			$line->context = $this->context;
+
+			$line->fk_product=$idproduct;
+			$line->desc=$prod->description;
+			$line->qty=$qty;
+			$line->subprice=$price;
+			$line->remise_percent=$remise_percent;
+			$line->vat_src_code=$vat_src_code;
+			$line->tva_tx=$tva_tx;
+			$line->localtax1_tx=$localtax1_tx;
+			$line->localtax2_tx=$localtax2_tx;
+			$line->ref=$prod->ref;
+			$line->libelle=$prod->label;
+			$line->product_desc=$prod->description;
+			$line->fk_unit=$prod->fk_unit;
+
+			// Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
+			// Save the start and end date of the line in the object
+			if ($date_start) { $line->date_start = $date_start; }
+			if ($date_end)   { $line->date_end = $date_end; }
+
+			$this->lines[] = $line;
+
+			/** POUR AJOUTER AUTOMATIQUEMENT LES SOUSPRODUITS a LA COMMANDE
+			 if (! empty($conf->global->PRODUIT_SOUSPRODUITS))
+			 {
+			 $prod = new Product($this->db);
+			 $prod->fetch($idproduct);
+			 $prod -> get_sousproduits_arbo();
+			 $prods_arbo = $prod->get_arbo_each_prod();
+			 if(count($prods_arbo) > 0)
+			 {
+			 foreach($prods_arbo as $key => $value)
+			 {
+			 // print "id : ".$value[1].' :qty: '.$value[0].'<br>';
+			 if(! in_array($value[1],$this->products))
+			 $this->add_product($value[1], $value[0]);
+
+			 }
+			 }
+
+			 }
+			 **/
 		}
 	}
 
@@ -1722,6 +1726,7 @@ class Commande extends CommonOrder
 	 *	@param     int	$idremise			Id de la remise fixe
 	 *	@return    int          			>0 si ok, <0 si ko
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_discount($idremise)
 	{
 		global $langs;
@@ -1799,6 +1804,7 @@ class Commande extends CommonOrder
 	 *	@param		int		$only_product	Return only physical products
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_lines($only_product=0)
 	{
 		$this->lines=array();
@@ -2025,6 +2031,7 @@ class Commande extends CommonOrder
 	 *
 	 * TODO deprecate, move to Shipping class
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function nb_expedition()
 	{
 		$sql = 'SELECT count(*)';
@@ -2051,6 +2058,7 @@ class Commande extends CommonOrder
 	 *
 	 *	TODO		FONCTION NON FINIE A FINIR
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function stock_array($filtre_statut=self::STATUS_CANCELED)
 	{
 		$this->stocks = array();
@@ -2167,6 +2175,7 @@ class Commande extends CommonOrder
 	 * 	@param     	int			$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int 					<0 if KO, >0 if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_remise($user, $remise, $notrigger=0)
 	{
 		$remise=trim($remise)?trim($remise):0;
@@ -2233,6 +2242,7 @@ class Commande extends CommonOrder
 	 * 		@param     	int			$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *		@return		int 					<0 if KO, >0 if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_remise_absolue($user, $remise, $notrigger=0)
 	{
 		$remise=trim($remise)?trim($remise):0;
@@ -2299,6 +2309,7 @@ class Commande extends CommonOrder
 	 * 	@param     	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         		<0 if KO, >0 if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_date($user, $date, $notrigger=0)
 	{
 		if ($user->rights->commande->creer)
@@ -2363,6 +2374,7 @@ class Commande extends CommonOrder
 	 *  @param     	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         				<0 si ko, >0 si ok
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_date_livraison($user, $date_livraison, $notrigger=0)
 	{
 		if ($user->rights->commande->creer)
@@ -2432,6 +2444,7 @@ class Commande extends CommonOrder
 	 *  @param    	string	$sortorder		Sort order
 	 *  @return     int             		-1 if KO, array with result if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC')
 	{
 		global $user;
@@ -2569,6 +2582,7 @@ class Commande extends CommonOrder
 	 *  @param     	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *  @return     int        			 		>0 if ok, <0 if ko
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function demand_reason($demand_reason_id, $notrigger=0)
 	{
 		global $user;
@@ -2640,6 +2654,7 @@ class Commande extends CommonOrder
 	 *  @param     	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *	@return     int             		<0 if KO, >0 if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_ref_client($user, $ref_client, $notrigger=0)
 	{
 		if ($user->rights->commande->creer)
@@ -3250,6 +3265,7 @@ class Commande extends CommonOrder
 	 *	@param		User	$user   Object user
 	 *	@return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_board($user)
 	{
 		global $conf, $langs;
@@ -3338,6 +3354,7 @@ class Commande extends CommonOrder
 	 *  @param      int     $donotshowbilled  Do not show billed status after order status
 	 *  @return     string					  Label of status
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$billed,$mode,$donotshowbilled=0)
 	{
 		global $langs, $conf;
@@ -3653,6 +3670,7 @@ class Commande extends CommonOrder
 	 *
 	 *	@return     int         <0 si ko, >0 si ok
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_state_board()
 	{
 		global $user;
@@ -4288,6 +4306,7 @@ class OrderLine extends CommonOrderLine
 	 *
 	 *	@return		int		<0 if ko, >0 if ok
 	 */
+	// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_total()
 	{
 		$this->db->begin();

+ 23 - 7
htdocs/compta/bank/class/account.class.php

@@ -304,6 +304,7 @@ class Account extends CommonObject
 	 *      @param  string	$type       Type of link ('payment', 'company', 'member', ...)
 	 *      @return int         		<0 if KO, id line if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_url_line($line_id, $url_id, $url, $label, $type)
 	{
 		$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (";
@@ -342,6 +343,7 @@ class Account extends CommonObject
 	 *      @param  string      $type       To search using type
 	 *      @return array|-1                Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_url($fk_bank='', $url_id='', $type='')
 	{
 		$lines = array();
@@ -783,11 +785,12 @@ class Account extends CommonObject
 
 
 	/**
-	 *    	Update BBAN (RIB) account fields
+	 *  Update BBAN (RIB) account fields
 	 *
-	 *    	@param	User	$user       Object user making update
-	 *		@return	int					<0 if KO, >0 if OK
+	 *  @param	User	$user       Object user making update
+	 *	@return	int					<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_bban(User $user = null)
 	{
 		global $conf,$langs;
@@ -1075,6 +1078,7 @@ class Account extends CommonObject
 	 *  @param   int		$mode			0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
 	 *  @return  string        			    Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut, $mode = 0)
 	{
 		global $langs;
@@ -1110,6 +1114,7 @@ class Account extends CommonObject
 	 *
 	 *    @return     boolean     vrai si peut etre supprime, faux sinon
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function can_be_deleted()
 	{
 		$can_be_deleted=false;
@@ -1179,6 +1184,7 @@ class Account extends CommonObject
 	 *		@param	int		$filteraccountid	To get info for a particular account id
 	 *      @return WorkboardResponse|int 		<0 if KO, WorkboardResponse if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_board(User $user, $filteraccountid = 0)
 	{
 		global $conf, $langs;
@@ -1232,6 +1238,7 @@ class Account extends CommonObject
 	 *		@param		int			$filteraccountid	To get info for a particular account id
 	 *      @return     int         <0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_state_board($filteraccountid = 0)
 	{
 		global $user;
@@ -1887,6 +1894,7 @@ class AccountLine extends CommonObject
 	 *		@param	User	$user	User object that delete
 	 *      @return	int 			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_urls(User $user = null)
 	{
 		$nbko=0;
@@ -1952,12 +1960,13 @@ class AccountLine extends CommonObject
 
 
 	/**
-	 *		Update conciliation field
+	 *	Update conciliation field
 	 *
-	 *		@param	User	$user		Objet user making update
-	 *		@param 	int		$cat		Category id
-	 *		@return	int					<0 if KO, >0 if OK
+	 *	@param	User	$user		Objet user making update
+	 *	@param 	int		$cat		Category id
+	 *	@return	int					<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_conciliation(User $user, $cat)
 	{
 		global $conf,$langs;
@@ -2020,6 +2029,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$sign		1 or -1
 	 *	@return	int					>0 if OK, 0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function datev_change($rowid,$sign=1)
 	{
 		$sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid;
@@ -2057,6 +2067,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$id		Id of line to change
 	 *	@return	int				>0 if OK, 0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function datev_next($id)
 	{
 		return $this->datev_change($id,1);
@@ -2068,6 +2079,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$id		Id of line to change
 	 *	@return	int				>0 if OK, 0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function datev_previous($id)
 	{
 		return $this->datev_change($id,-1);
@@ -2081,6 +2093,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$sign		1 or -1
 	 *	@return	int					>0 if OK, 0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function dateo_change($rowid,$sign=1)
 	{
 		$sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid;
@@ -2118,6 +2131,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$id		Id of line to change
 	 *	@return	int				>0 if OK, 0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function dateo_next($id)
 	{
 		return $this->dateo_change($id,1);
@@ -2129,6 +2143,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$id		Id of line to change
 	 *	@return	int				>0 if OK, 0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function dateo_previous($id)
 	{
 		return $this->dateo_change($id,-1);
@@ -2244,6 +2259,7 @@ class AccountLine 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
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=0)
 	{
 		global $langs;

+ 2 - 0
htdocs/compta/bank/class/paymentvarious.class.php

@@ -461,6 +461,7 @@ class PaymentVarious extends CommonObject
 	 *  @param  int     $id_bank    Id bank account
 	 *	@return int                 <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_fk_bank($id_bank)
 	{
 		$sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_various SET fk_bank = '.$id_bank;
@@ -496,6 +497,7 @@ class PaymentVarious extends CommonObject
 	 *  @param  int		$mode       0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
 	 *  @return string      		Libelle
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=0)
 	{
 		global $langs;

+ 1 - 1
htdocs/compta/deplacement/class/deplacement.class.php

@@ -317,6 +317,7 @@ class Deplacement extends CommonObject
 	 *  @param  int		$mode       0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
 	 *  @return string      		Libelle
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=0)
 	{
 		global $langs;
@@ -463,4 +464,3 @@ class Deplacement extends CommonObject
 		}
 	}
 }
-

+ 4 - 2
htdocs/compta/facture/class/facture-rec.class.php

@@ -448,8 +448,9 @@ class FactureRec extends CommonInvoice
 	/**
 	 *	Recupere les lignes de factures predefinies dans this->lines
 	 *
-	 *	@return     int         1 if OK, < 0 if KO
- 	 */
+	 *  @return     int         1 if OK, < 0 if KO
+     */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_lines()
 	{
 		$this->lines=array();
@@ -1196,6 +1197,7 @@ class FactureRec extends CommonInvoice
 	 *	@param		int		$type			Type invoice
 	 *	@return     string        			Label of status
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0)
 	{
 		global $langs;

+ 22 - 0
htdocs/compta/facture/class/facture.class.php

@@ -1416,6 +1416,7 @@ class Facture extends CommonInvoice
 	 *
 	 *	@return     int         1 if OK, < 0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_lines()
 	{
 		$this->lines=array();
@@ -1676,6 +1677,7 @@ class Facture extends CommonInvoice
 	 *    @param     int	$idremise	Id of absolute discount
 	 *    @return    int          		>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_discount($idremise)
 	{
 		global $langs;
@@ -1777,6 +1779,7 @@ class Facture extends CommonInvoice
 	 *  @param     	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_ref_client($ref_client, $notrigger=0)
 	{
 	    global $user;
@@ -2012,6 +2015,7 @@ class Facture extends CommonInvoice
 	 *	@param  string	$close_note	Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple)
 	 *  @return int         		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_paid($user, $close_code='', $close_note='')
 	{
 		$error=0;
@@ -2069,6 +2073,7 @@ class Facture extends CommonInvoice
 	 *  @param	User	$user       Object user that change status
 	 *  @return int         		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_unpaid($user)
 	{
 		$error=0;
@@ -2118,6 +2123,7 @@ class Facture extends CommonInvoice
 	 *	@param	string	$close_note		Comment
 	 *	@return int         			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_canceled($user, $close_code='', $close_note='')
 	{
 
@@ -2478,6 +2484,7 @@ class Facture extends CommonInvoice
 	 *	@param	int		$idwarehouse	Id warehouse to use for stock change.
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_draft($user,$idwarehouse=-1)
 	{
 		global $conf,$langs;
@@ -3043,6 +3050,7 @@ class Facture extends CommonInvoice
 	 * @param  int          $percent    Percentage
 	 * @return void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_percent($line, $percent)
 	{
 	    global $mysoc,$user;
@@ -3140,6 +3148,7 @@ class Facture extends CommonInvoice
 	 *  @param     	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int 		<0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_remise($user, $remise, $notrigger=0)
 	{
 		// Clean parameters
@@ -3204,6 +3213,7 @@ class Facture extends CommonInvoice
 	 *  @param     	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int 				<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_remise_absolue($user, $remise, $notrigger=0)
 	{
 		if (empty($remise)) $remise=0;
@@ -3409,6 +3419,7 @@ class Facture extends CommonInvoice
 	 *  @param    	string	$sortorder		Sort order
 	 *  @return     int             		-1 if KO, array with result if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
 	{
 		global $conf,$user;
@@ -3478,6 +3489,7 @@ class Facture extends CommonInvoice
 	 *	@param		int		$socid		Id thirdparty
 	 *	@return    	array				Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function list_replacable_invoices($socid=0)
 	{
 		global $conf;
@@ -3526,6 +3538,7 @@ class Facture extends CommonInvoice
 	 *	@param		int		$socid		Id thirdparty
 	 *	@return    	array				Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function list_qualified_avoir_invoices($socid=0)
 	{
 		global $conf;
@@ -3599,6 +3612,7 @@ class Facture extends CommonInvoice
 	 *  @param		float	$amount		Amount we request direct debit for
 	 *	@return     int         		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function demande_prelevement($fuser, $amount=0)
 	{
 
@@ -3708,6 +3722,7 @@ class Facture extends CommonInvoice
 	 *  @param  int		$did        id de la demande a supprimer
 	 *  @return	int					<0 if OK, >0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function demande_prelevement_delete($fuser, $did)
 	{
 		$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande';
@@ -3732,6 +3747,7 @@ class Facture extends CommonInvoice
 	 *	@param  User		$user    	Object user
 	 *	@return WorkboardResponse|int 	<0 if KO, WorkboardResponse if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_board($user)
 	{
 		global $conf, $langs;
@@ -3976,6 +3992,7 @@ class Facture extends CommonInvoice
 	 *
 	 *      @return         int     <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_state_board()
 	{
 		global $conf, $user;
@@ -4089,6 +4106,7 @@ class Facture extends CommonInvoice
 	 *
 	 * @return boolean
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function is_first()
 	{
 		return ($this->situation_counter == 1);
@@ -4099,6 +4117,7 @@ class Facture extends CommonInvoice
 	 *
 	 * @return mixed -1 if error, array of previous situations
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_prev_sits()
 	{
 		global $conf;
@@ -4179,6 +4198,7 @@ class Facture extends CommonInvoice
 	 * @return bool Last of the cycle status
 	 *
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function is_last_in_cycle()
 	{
 		global $conf;
@@ -4816,6 +4836,7 @@ class FactureLigne extends CommonInvoiceLine
 	 *
 	 *	@return		int		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_total()
 	{
 		$this->db->begin();
@@ -4857,6 +4878,7 @@ class FactureLigne extends CommonInvoiceLine
 	 * @param  int     $invoiceid      Invoice id
 	 * @return int                     >= 0
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_prev_progress($invoiceid)
 	{
 		if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {

+ 11 - 6
htdocs/compta/localtax/class/localtax.class.php

@@ -350,6 +350,7 @@ class Localtax extends CommonObject
      *	@param	int		$year		Year
      *	@return	int					???
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function localtax_sum_collectee($year = 0)
     {
         $sql = "SELECT sum(f.localtax) as amount";
@@ -388,6 +389,7 @@ class Localtax extends CommonObject
      *	@param	int		$year		Year
      *	@return	int					???
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function localtax_sum_payee($year = 0)
     {
 
@@ -429,6 +431,7 @@ class Localtax extends CommonObject
      *	@param	int		$year		Year
      *	@return	int					???
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function localtax_sum_reglee($year = 0)
     {
 
@@ -582,6 +585,7 @@ class Localtax extends CommonObject
      *	@param		int		$id		Id bank account
 	 *	@return		int				<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_fk_bank($id)
 	{
 		$sql = 'UPDATE '.MAIN_DB_PREFIX.'localtax SET fk_bank = '.$id;
@@ -640,12 +644,13 @@ class Localtax extends CommonObject
 	 *
 	 * @param   int		$status     Statut
 	 * @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
+	 * @return	string              Libelle du statut
 	 */
-	function LibStatut($status,$mode=0)
-	{
-		global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+    function LibStatut($status, $mode=0)
+    {
+        global $langs;  // TODO Renvoyer le libelle anglais et faire traduction a affichage
 
-		return '';
-	}
+        return '';
+    }
 }

+ 7 - 1
htdocs/compta/paiement/cheque/class/remisecheque.class.php

@@ -498,6 +498,7 @@ class RemiseCheque extends CommonObject
 	 *      @param      User	$user       Objet user
 	 *      @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_board($user)
 	{
 		global $conf, $langs;
@@ -550,6 +551,7 @@ class RemiseCheque extends CommonObject
 	 *
 	 *      @return     int         <0 if ko, >0 if ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_state_board()
 	{
 		global $user;
@@ -862,8 +864,9 @@ class RemiseCheque extends CommonObject
 	/**
 	 *	Charge les proprietes ref_previous et ref_next
 	 *
-	 *	@return     int   <0 if KO, 0 if OK
+	 *  @return     int   <0 if KO, 0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_previous_next_id()
 	{
 		global $conf;
@@ -907,6 +910,7 @@ class RemiseCheque extends CommonObject
      *      @param  int   $date           Date creation
      *      @return int                 		<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function set_date($user, $date)
     {
         if ($user->rights->banque->cheque)
@@ -941,6 +945,7 @@ class RemiseCheque extends CommonObject
 	 *      @param  int   $ref         ref of bordereau
 	 *      @return int                 		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_number($user, $ref)
 	{
 		if ($user->rights->banque->cheque)
@@ -1063,6 +1068,7 @@ class RemiseCheque extends CommonObject
 	 *  @param  int		$mode		0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
 	 *  @return string      		Libelle du statut
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($status,$mode=0)
 	{
 		global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage

+ 8 - 3
htdocs/compta/paiement/class/paiement.class.php

@@ -708,6 +708,7 @@ class Paiement extends CommonObject
 	 *      @param	int		$id_bank    Id compte bancaire
 	 *      @return	int					<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_fk_bank($id_bank)
 	{
 		$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' set fk_bank = '.$id_bank;
@@ -733,6 +734,7 @@ class Paiement extends CommonObject
      *  @param	int	$date   New date
      *  @return int					<0 if KO, 0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function update_date($date)
     {
         if (!empty($date) && $this->statut!=1)
@@ -764,6 +766,7 @@ class Paiement extends CommonObject
      *  @param	string	$num		New num
      *  @return int					<0 if KO, 0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function update_num($num)
     {
     	if(!empty($num) && $this->statut!=1)
@@ -1127,6 +1130,7 @@ class Paiement 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
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($status,$mode=0)
 	{
 		global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage
@@ -1171,11 +1175,12 @@ class Paiement extends CommonObject
 	}
 
 	/**
-	 *    	Load the third party of object, from id into this->thirdparty
+	 *  Load the third party of object, from id into this->thirdparty
 	 *
-	 *		@param		int		$force_thirdparty_id	Force thirdparty id
-	 *		@return		int								<0 if KO, >0 if OK
+	 *	@param		int		$force_thirdparty_id	Force thirdparty id
+	 *	@return		int								<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_thirdparty($force_thirdparty_id=0)
 	{
 		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';

+ 16 - 1
htdocs/compta/prelevement/class/bonprelevement.class.php

@@ -122,6 +122,7 @@ class BonPrelevement extends CommonObject
 	 * @param	string	$number_key 	number key of account number
 	 * @return	int						>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key)
 	{
 		$result = 0;
@@ -332,6 +333,7 @@ class BonPrelevement extends CommonObject
 	 *
 	 * @return		int		<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_credite()
 	{
 		global $user,$conf;
@@ -411,6 +413,7 @@ class BonPrelevement extends CommonObject
 	 *	@param 	int		$date			date of action
 	 *	@return	int						>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_infocredit($user, $date)
 	{
 		global $conf,$langs;
@@ -558,6 +561,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	string		$method		method of transmision to bank
 	 *	@return	int						>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function set_infotrans($user, $date, $method)
 	{
 		global $conf,$langs;
@@ -679,6 +683,7 @@ class BonPrelevement extends CommonObject
 	 *
 	 *	@return		double	 	Total amount
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SommeAPrelever()
 	{
 		global $conf;
@@ -719,6 +724,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	int		$agence		dolibarr mysoc agence
 	 *	@return	int					<O if KO, number of invoices if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function NbFactureAPrelever($banque=0,$agence=0)
 	{
 		global $conf;
@@ -763,6 +769,7 @@ class BonPrelevement extends CommonObject
          * @param       string  $executiondate	Date to execute the transfer
 	 *	@return	int					<0 if KO, nbre of invoice withdrawed if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='')
 	{
 		global $conf,$langs;
@@ -1193,6 +1200,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	int		$rowid		id of notification
 	 *	@return	int					0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DeleteNotificationById($rowid)
 	{
 		$result = 0;
@@ -1217,6 +1225,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	string	$action		notification action
 	 *	@return	int					>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DeleteNotification($user, $action)
 	{
 		$result = 0;
@@ -1242,6 +1251,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	string	$action		notification action
 	 *	@return	int					0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function AddNotification($db, $user, $action)
 	{
 		$result = 0;
@@ -1473,6 +1483,7 @@ class BonPrelevement extends CommonObject
 	 *  @param	string	$rib_dom		rib domiciliation
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $facnumber, $facid, $rib_dom='')
 	{
 		fputs($this->file, "06");
@@ -1566,6 +1577,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	string		$row_drum			rib.rowid used to generate rum
 	 *	@return	string							Return string with SEPA part DrctDbtTxInf
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
 	{
 		$CrLf = "\n";
@@ -1627,6 +1639,7 @@ class BonPrelevement extends CommonObject
 	 *
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function EnregEmetteur()
 	{
 		fputs($this->file, "03");
@@ -1699,6 +1712,7 @@ class BonPrelevement extends CommonObject
 	 *  @param	string	$format			FRST or RCUR or ALL
 	 *	@return	string					String with SEPA Sender
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n', $format='FRST')
 	{
 		// SEPA INITIALISATION
@@ -1814,6 +1828,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	int		$total	total amount
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function EnregTotal($total)
 	{
 		fputs($this->file, "08");
@@ -1887,6 +1902,7 @@ class BonPrelevement extends CommonObject
 	 *  @param  int		$mode       0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
 	 * 	@return	string  		    Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=0)
 	{
 		if (empty($this->labelstatut))
@@ -1938,4 +1954,3 @@ class BonPrelevement extends CommonObject
 		}
 	}
 }
-

+ 1 - 1
htdocs/compta/prelevement/class/ligneprelevement.class.php

@@ -135,6 +135,7 @@ class LignePrelevement
 	 *    @param    int		$mode       0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
 	 * 	  @return   string      		Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=0)
 	{
 		global $langs;
@@ -180,4 +181,3 @@ class LignePrelevement
 		return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
 	}
 }
-

+ 1 - 1
htdocs/compta/prelevement/class/rejetprelevement.class.php

@@ -205,6 +205,7 @@ class RejetPrelevement
 	 * 	@param	Facture		$fac			Invoice object
 	 * 	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _send_email($fac)
 	{
 		global $langs;
@@ -369,4 +370,3 @@ class RejetPrelevement
 		}
 	}
 }
-

+ 2 - 0
htdocs/compta/salaries/class/paymentsalary.class.php

@@ -497,6 +497,7 @@ class PaymentSalary extends CommonObject
 	 *  @param	int		$id_bank    Id bank account
 	 *	@return	int					<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_fk_bank($id_bank)
 	{
 		$sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_salary SET fk_bank = '.$id_bank;
@@ -595,6 +596,7 @@ class PaymentSalary 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
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($status,$mode=0)
 	{
 	    global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage

+ 17 - 16
htdocs/compta/sociales/class/cchargesociales.class.php

@@ -38,7 +38,7 @@ class Cchargesociales
 	 * @var string Id to identify managed objects
 	 */
 	public $element = 'cchargesociales';
-	
+
 	/**
 	 * @var string Name of table without prefix where object is stored
 	 */
@@ -51,7 +51,7 @@ class Cchargesociales
 	public $fk_pays;
 	public $module;
 	public $accountancy_code;
-	
+
 
 	/**
 	 * Constructor
@@ -78,7 +78,7 @@ class Cchargesociales
 		$error = 0;
 
 		// Clean parameters
-		
+
 		if (isset($this->libelle)) {
 			 $this->libelle = trim($this->libelle);
 		}
@@ -101,14 +101,14 @@ class Cchargesociales
 			 $this->accountancy_code = trim($this->accountancy_code);
 		}
 
-		
+
 
 		// Check parameters
 		// Put here code to add control on parameters values
 
 		// Insert request
 		$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '(';
-		
+
 		$sql.= 'libelle,';
 		$sql.= 'deductible,';
 		$sql.= 'active,';
@@ -117,9 +117,9 @@ class Cchargesociales
 		$sql.= 'module';
 		$sql.= 'accountancy_code';
 
-		
+
 		$sql .= ') VALUES (';
-		
+
 		$sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").',';
 		$sql .= ' '.(! isset($this->deductible)?'NULL':$this->deductible).',';
 		$sql .= ' '.(! isset($this->active)?'NULL':$this->active).',';
@@ -128,7 +128,7 @@ class Cchargesociales
 		$sql .= ' '.(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'").',';
 		$sql .= ' '.(! isset($this->accountancy_code)?'NULL':"'".$this->db->escape($this->accountancy_code)."'");
 
-		
+
 		$sql .= ')';
 
 		$this->db->begin();
@@ -201,7 +201,7 @@ class Cchargesociales
 				$obj = $this->db->fetch_object($resql);
 
 				$this->id = $obj->id;
-				
+
 				$this->libelle = $obj->libelle;
 				$this->deductible = $obj->deductible;
 				$this->active = $obj->active;
@@ -210,7 +210,7 @@ class Cchargesociales
 				$this->module = $obj->module;
 				$this->accountancy_code = $obj->accountancy_code;
 
-				
+
 			}
 			$this->db->free($resql);
 
@@ -242,7 +242,7 @@ class Cchargesociales
 		dol_syslog(__METHOD__, LOG_DEBUG);
 
 		// Clean parameters
-		
+
 		if (isset($this->libelle)) {
 			 $this->libelle = trim($this->libelle);
 		}
@@ -265,7 +265,7 @@ class Cchargesociales
 			 $this->accountancy_code = trim($this->accountancy_code);
 		}
 
-		
+
 
 		// Check parameters
 		// Put here code to add a control on parameters values
@@ -449,7 +449,7 @@ class Cchargesociales
 		$result.= $link . $this->ref . $linkend;
 		return $result;
 	}
-	
+
 	/**
 	 *  Retourne le libelle du status d'un user (actif, inactif)
 	 *
@@ -468,6 +468,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
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($status,$mode=0)
 	{
 		global $langs;
@@ -504,8 +505,8 @@ class Cchargesociales
 			if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
 		}
 	}
-	
-	
+
+
 	/**
 	 * Initialise object with example values
 	 * Id must be 0 if object instance is a specimen
@@ -515,7 +516,7 @@ class Cchargesociales
 	public function initAsSpecimen()
 	{
 		$this->id = 0;
-		
+
 		$this->libelle = '';
 		$this->deductible = '';
 		$this->active = '';

+ 3 - 1
htdocs/compta/sociales/class/chargesociales.class.php

@@ -373,6 +373,7 @@ class ChargeSociales extends CommonObject
      *    @param	User	$user       Object user making change
      *    @return	int					<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function set_paid($user)
     {
         $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET";
@@ -388,6 +389,7 @@ class ChargeSociales extends CommonObject
      *    @param	User	$user       Object user making change
      *    @return	int					<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function set_unpaid($user)
     {
         $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET";
@@ -418,6 +420,7 @@ class ChargeSociales extends CommonObject
 	 *  @param  double	$alreadypaid	0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
      *  @return string        			Label
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function LibStatut($statut,$mode=0,$alreadypaid=-1)
     {
         global $langs;
@@ -645,4 +648,3 @@ class ChargeSociales extends CommonObject
         $this->type_libelle = 'Social contribution label';
     }
 }
-

+ 2 - 0
htdocs/compta/sociales/class/paymentsocialcontribution.class.php

@@ -606,6 +606,7 @@ class PaymentSocialContribution extends CommonObject
 	 *  @param	int		$id_bank         Id if bank
 	 *  @return	int			             >0 if OK, <=0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_fk_bank($id_bank)
 	{
 		$sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id;
@@ -642,6 +643,7 @@ class PaymentSocialContribution 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
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($status,$mode=0)
 	{
 		global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage

+ 11 - 6
htdocs/compta/tva/class/tva.class.php

@@ -367,8 +367,9 @@ class Tva extends CommonObject
      * 	Total of the VAT from invoices emitted by the thirdparty.
      *
      *	@param	int		$year		Year
-     *	@return	double				Amount
+     *  @return	double				Amount
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function tva_sum_collectee($year = 0)
     {
 
@@ -408,6 +409,7 @@ class Tva extends CommonObject
      *	@param	int		$year		Year
      *	@return	double				Amount
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function tva_sum_payee($year = 0)
     {
 
@@ -448,6 +450,7 @@ class Tva extends CommonObject
      *	@param	int		$year		Year
      *	@return	double				Amount
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function tva_sum_reglee($year = 0)
     {
 
@@ -639,6 +642,7 @@ class Tva extends CommonObject
      *  @param	int		$id_bank    Id bank account
 	 *	@return	int					<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_fk_bank($id_bank)
 	{
 		$sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.$id_bank;
@@ -803,10 +807,11 @@ 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)
-	{
-	    global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+    function LibStatut($status,$mode=0)
+    {
+        global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage
 
-	    return '';
-	}
+        return '';
+    }
 }

+ 25 - 24
htdocs/contact/canvas/actions_contactcard_common.class.php

@@ -83,6 +83,7 @@ abstract class ActionsContactCardCommon
      *  @param	int			$id			Id
      *  @return	string					HTML output
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function assign_values(&$action, $id)
     {
         global $conf, $langs, $user, $canvas;
@@ -270,33 +271,34 @@ abstract class ActionsContactCardCommon
      *
      *  @return		string					HTML output
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
     private function assign_post()
     {
         global $langs, $mysoc;
 
-        $this->object->old_name 			= 	$_POST["old_name"];
-        $this->object->old_firstname 		= 	$_POST["old_firstname"];
-
-        $this->object->socid				=	$_POST["socid"];
-        $this->object->lastname				=	$_POST["name"];
-        $this->object->firstname			= 	$_POST["firstname"];
-        $this->object->civility_id			= 	$_POST["civility_id"];
-        $this->object->poste				= 	$_POST["poste"];
-        $this->object->address				=	$_POST["address"];
-        $this->object->zip					=	$_POST["zipcode"];
-        $this->object->town					=	$_POST["town"];
-        $this->object->fk_departement		=	$_POST["state_id"];
-        $this->object->country_id			=	$_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
-        $this->object->state_id        		=	$_POST["state_id"];
-        $this->object->phone_pro			= 	$_POST["phone_pro"];
-        $this->object->phone_perso			= 	$_POST["phone_perso"];
-        $this->object->phone_mobile			= 	$_POST["phone_mobile"];
-        $this->object->fax					=	$_POST["fax"];
-        $this->object->email				=	$_POST["email"];
-        $this->object->jabberid				= 	$_POST["jabberid"];
-        $this->object->priv					= 	$_POST["priv"];
-        $this->object->note					=	$_POST["note"];
-        $this->object->canvas				=	$_POST["canvas"];
+        $this->object->old_name 		= $_POST["old_name"];
+        $this->object->old_firstname 	= $_POST["old_firstname"];
+
+        $this->object->socid			= $_POST["socid"];
+        $this->object->lastname			= $_POST["name"];
+        $this->object->firstname		= $_POST["firstname"];
+        $this->object->civility_id		= $_POST["civility_id"];
+        $this->object->poste			= $_POST["poste"];
+        $this->object->address			= $_POST["address"];
+        $this->object->zip				= $_POST["zipcode"];
+        $this->object->town				= $_POST["town"];
+        $this->object->fk_departement	= $_POST["state_id"];
+        $this->object->country_id		= $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
+        $this->object->state_id        	= $_POST["state_id"];
+        $this->object->phone_pro		= $_POST["phone_pro"];
+        $this->object->phone_perso		= $_POST["phone_perso"];
+        $this->object->phone_mobile		= $_POST["phone_mobile"];
+        $this->object->fax				= $_POST["fax"];
+        $this->object->email			= $_POST["email"];
+        $this->object->jabberid			= $_POST["jabberid"];
+        $this->object->priv				= $_POST["priv"];
+        $this->object->note				= $_POST["note"];
+        $this->object->canvas			= $_POST["canvas"];
 
         // We set country_id, and country_code label of the chosen country
         if ($this->object->country_id)
@@ -317,4 +319,3 @@ abstract class ActionsContactCardCommon
         }
     }
 }
-

+ 2 - 1
htdocs/contact/canvas/default/actions_contactcard_default.class.php

@@ -73,6 +73,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
 	 *  @param	int			$id				Id
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function assign_values(&$action, $id)
 	{
 		global $limit, $offset, $sortfield, $sortorder;
@@ -128,6 +129,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
 	 *  @param	string	$sortorder	Sort order ('ASC' or 'DESC')
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LoadListDatas($limit, $offset, $sortfield, $sortorder)
 	{
 		global $conf, $langs;
@@ -137,4 +139,3 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
         $this->list_datas = array();
 	}
 }
-

+ 7 - 0
htdocs/contact/class/contact.class.php

@@ -150,6 +150,7 @@ class Contact extends CommonObject
 	 *
 	 *  @return     int         <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_state_board()
 	{
 		global $user;
@@ -483,6 +484,7 @@ class Contact extends CommonObject
 	 *									2=Return key only (uid=qqq)
 	 *	@return		string				DN
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _load_ldap_dn($info,$mode=0)
 	{
 		global $conf;
@@ -499,6 +501,7 @@ class Contact extends CommonObject
 	 *
 	 *	@return		array		Tableau info des attributs
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _load_ldap_info()
 	{
 		global $conf,$langs;
@@ -575,6 +578,7 @@ class Contact extends CommonObject
 	 *  @param      int		    $notrigger	0=no, 1=yes
      *  @return     int         			<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_perso($id, $user=null, $notrigger=0)
 	{
 	    $error=0;
@@ -857,6 +861,7 @@ class Contact extends CommonObject
 	 *
      *  @return     int             					<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_ref_elements()
 	{
 		// Compte les elements pour lesquels il est contact
@@ -1196,6 +1201,7 @@ class Contact 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
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode)
 	{
 		global $langs;
@@ -1240,6 +1246,7 @@ class Contact extends CommonObject
 	 * 	@param      int			$statut		Type (0 = public, 1 = private)
 	 *  @return     string					Label translated
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibPubPriv($statut)
 	{
 		global $langs;

+ 12 - 0
htdocs/contrat/class/contrat.class.php

@@ -251,6 +251,7 @@ class Contrat extends CommonObject
 	 * 	@param	string		$comment	A comment typed by user
 	 *  @return int         			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function active_line($user, $line_id, $date, $date_end='', $comment='')
 	{
 		$result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment);
@@ -272,6 +273,7 @@ class Contrat extends CommonObject
 	 * 	@param	string		$comment	A comment typed by user
 	 *  @return int         			<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function close_line($user, $line_id, $date_end, $comment='')
 	{
 		$result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment);
@@ -711,6 +713,7 @@ class Contrat extends CommonObject
 	 *
 	 *  @return ContratLigne[]   Return array of contract lines
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_lines()
 	{
 		$this->nbofserviceswait=0;
@@ -1789,6 +1792,7 @@ class Contrat extends CommonObject
 	 *	@return int     			<0 if KO, >0 if OK
 	 *  @deprecated					This function will never be used. Status of a contract is status of its lines.
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_statut($user)
 	{
 		dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
@@ -1827,6 +1831,7 @@ class Contrat extends CommonObject
 	 *  @param  int		$mode          	0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length
 	 *	@return string      			Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode)
 	{
 		global $langs;
@@ -2008,6 +2013,7 @@ class Contrat extends CommonObject
 	 *  @param	int		$statut     Status of lines to get
 	 *  @return array       		Array of line's rowid
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function array_detail($statut=-1)
 	{
 		$tab=array();
@@ -2084,6 +2090,7 @@ class Contrat extends CommonObject
      *      @param  string	$mode           "inactive" pour services a activer, "expired" pour services expires
      *      @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_board($user,$mode)
 	{
 		global $conf, $langs;
@@ -2160,6 +2167,7 @@ class Contrat extends CommonObject
 	 *
 	 *   @return     int         <0 si ko, >0 si ok
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_state_board()
 	{
 		global $conf, $user;
@@ -2593,6 +2601,7 @@ class ContratLigne extends CommonObjectLine
 	 *  @param	string	$moreatt	More attribute
 	 *  @return string      		Libelle
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	static function LibStatut($statut,$mode,$expired=-1,$moreatt='')
 	{
 		global $langs;
@@ -3012,6 +3021,7 @@ class ContratLigne extends CommonObjectLine
 	 *
 	 *		@return		int		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_total()
 	{
 		$this->db->begin();
@@ -3131,6 +3141,7 @@ class ContratLigne extends CommonObjectLine
 	 * @param   string 		$comment 	A comment typed by user
 	 * @return 	int                    	<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function active_line($user, $date, $date_end = '', $comment = '')
 	{
 		global $langs, $conf;
@@ -3188,6 +3199,7 @@ class ContratLigne extends CommonObjectLine
      * @param    int	$notrigger		1=Does not execute triggers, 0=Execute triggers
 	 * @return int                    	<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function close_line($user, $date_end, $comment = '', $notrigger=0)
 	{
 		global $langs, $conf;

+ 9 - 1
htdocs/core/class/CMailFile.class.php

@@ -833,6 +833,7 @@ class CMailFile
 	 * @param	string	$sourcefile		Path to file to encode
 	 * @return 	int					    <0 if KO, encoded string if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _encode_file($sourcefile)
 	{
 		$newsourcefile=dol_osencode($sourcefile);
@@ -859,6 +860,7 @@ class CMailFile
 	 *
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function dump_mail()
 	{
 		global $conf,$dolibarr_main_data_root;
@@ -950,6 +952,7 @@ class CMailFile
 	 *
 	 * @return	string headers
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function write_smtpheaders()
 	{
 		global $conf;
@@ -1014,6 +1017,7 @@ class CMailFile
 	 * @param 	array	$mimefilename_list		Array of mime types
 	 * @return	string							mime headers
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function write_mimeheaders($filename_list, $mimefilename_list)
 	{
 		$mimedone=0;
@@ -1042,6 +1046,7 @@ class CMailFile
 	 * @param	string		$msgtext		Message string
 	 * @return	string						String content
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function write_body($msgtext)
 	{
 		global $conf;
@@ -1144,6 +1149,7 @@ class CMailFile
 	 * @param 	array	$mimefilename_list	Tableau
 	 * @return	string						Chaine fichiers encodes
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function write_files($filename_list,$mimetype_list,$mimefilename_list)
 	{
 		$out = '';
@@ -1189,6 +1195,7 @@ class CMailFile
 	 * @param	array	$images_list	Tableau
 	 * @return	string					Chaine images encodees
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function write_images($images_list)
 	{
 		$out = '';
@@ -1221,6 +1228,7 @@ class CMailFile
 	 * @param 	int			$port		Example: 25, 465
 	 * @return	int						Socket id if ok, 0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function check_server_port($host,$port)
 	{
 		global $conf;
@@ -1285,6 +1293,7 @@ class CMailFile
 	 * @param   string	$response		Response string
 	 * @return  boolean					true if success
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function server_parse($socket, $response)
 	{
 		$_retVal = true;	// Indicates if Object was created or not
@@ -1511,4 +1520,3 @@ class CMailFile
 		return $ret;
 	}
 }
-

+ 2 - 1
htdocs/core/class/CSMSFile.class.php

@@ -198,6 +198,7 @@ class CSMSFile
 	 *
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function dump_sms()
 	{
 		global $conf,$dolibarr_main_data_root;
@@ -228,6 +229,7 @@ class CSMSFile
      *  @param	int		$result		Result of sms sending
      *  @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function dump_sms_result($result)
     {
         global $conf,$dolibarr_main_data_root;
@@ -245,4 +247,3 @@ class CSMSFile
         }
     }
 }
-

+ 1 - 1
htdocs/core/class/antivir.class.php

@@ -65,6 +65,7 @@ class AntiVir
 	 *	@param	string	$file		File to scan
 	 *	@return	int					<0 if KO (-98 if error, -99 if virus), 0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function dol_avscan_file($file)
 	{
 		global $conf;
@@ -180,4 +181,3 @@ class AntiVir
 		return $ret;
 	}
 }
-

+ 2 - 0
htdocs/core/class/canvas.class.php

@@ -141,6 +141,7 @@ class Canvas
 	 * 	@param		string		$ref		Object ref (if id not provided)
 	 * 	@return		void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function assign_values(&$action='view', $id=0, $ref='')
 	{
 		if (method_exists($this->control,'assign_values')) $this->control->assign_values($action, $id, $ref);
@@ -167,6 +168,7 @@ class Canvas
 	 *	@param	string	$action		Action code
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function display_canvas($action)
 	{
 		global $db, $conf, $langs, $user, $canvas;

+ 1 - 1
htdocs/core/class/comment.class.php

@@ -362,4 +362,4 @@ class Comment extends CommonObject
 
 		return count($this->comments);
 	}
-}
+}

+ 14 - 3
htdocs/core/class/commondocgenerator.class.php

@@ -55,6 +55,7 @@ abstract class CommonDocGenerator
      * @param   Translate	$outputlangs    Language object for output
      * @return	array						Array of substitution key->code
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_substitutionarray_user($user,$outputlangs)
     {
         global $conf;
@@ -91,6 +92,7 @@ abstract class CommonDocGenerator
      * @param   Translate	$outputlangs    Language object for output
      * @return	array						Array of substitution key->code
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_substitutionarray_mysoc($mysoc,$outputlangs)
     {
         global $conf;
@@ -149,6 +151,7 @@ abstract class CommonDocGenerator
      * @param   Translate	$outputlangs    Language object for output
      * @return	array						Array of substitution key->code
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_substitutionarray_thirdparty($object,$outputlangs)
     {
         global $conf;
@@ -229,6 +232,7 @@ abstract class CommonDocGenerator
 	 * @param   array_key	$array_key	    Name of the key for return array
 	 * @return	array of substitution key->code
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object')
     {
 		global $conf;
@@ -299,6 +303,7 @@ abstract class CommonDocGenerator
      * @param   Translate	$outputlangs    Language object for output
      * @return	array						Array of substitution key->code
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_substitutionarray_other($outputlangs)
     {
     	global $conf;
@@ -337,6 +342,7 @@ abstract class CommonDocGenerator
      * @param   string		    $array_key	        Name of the key for return array
 	 * @return	array								Array of substitution
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_substitutionarray_object($object,$outputlangs,$array_key='object')
 	{
 		global $conf;
@@ -482,6 +488,7 @@ abstract class CommonDocGenerator
 	 *	@param  Translate		$outputlangs        Lang object to use for output
 	 *  @return	array								Return a substitution array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_substitutionarray_lines($line,$outputlangs)
 	{
 		global $conf;
@@ -560,6 +567,7 @@ abstract class CommonDocGenerator
      * @param   array_key		$array_key	        Name of the key for return array
      * @return	array								Array of substitution
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_substitutionarray_shipment($object,$outputlangs,$array_key='object')
     {
     	global $conf;
@@ -614,16 +622,17 @@ abstract class CommonDocGenerator
 
 
     /**
-     *	Define array with couple substitution key => substitution value
+     *  Define array with couple substitution key => substitution value
      *
      *	@param  ExpeditionLigne	$line				Object line
      *	@param  Translate		$outputlangs        Lang object to use for output
      *	@return	array								Substitution array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_substitutionarray_shipment_lines($line, $outputlangs)
     {
     	global $conf;
-		dol_include_once('/core/lib/product.lib.php');
+        dol_include_once('/core/lib/product.lib.php');
 
         $resarray = array(
 	    	'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
@@ -645,7 +654,7 @@ abstract class CommonDocGenerator
 	    	'line_volume'=>empty($line->volume) ? '' : $line->volume*$line->qty_shipped.' '.measuring_units_string($line->volume_units, 'volume'),
     	);
 
-		// Retrieve extrafields
+        // Retrieve extrafields
         $extrafieldkey = $line->element;
         $array_key = "line";
         require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
@@ -667,6 +676,7 @@ abstract class CommonDocGenerator
      * @param   boolean		$recursive    	Want to fetch child array or child object
      * @return	array						Array of substitution key->code
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true)
     {
         $array_other = array();
@@ -696,6 +706,7 @@ abstract class CommonDocGenerator
      *  @param  Translate		$outputlangs        Lang object to use for output
      *	@return	array								Substitution array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fill_substitutionarray_with_extrafields($object,$array_to_fill,$extrafields,$array_key,$outputlangs)
 	{
 		global $conf;

+ 4 - 2
htdocs/core/class/commoninvoice.class.php

@@ -337,6 +337,7 @@ abstract class CommonInvoice extends CommonObject
 	 *
 	 *  @return    int         <=0 if no, >0 if yes
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function is_erasable()
 	{
 		global $conf;
@@ -459,6 +460,7 @@ abstract class CommonInvoice extends CommonObject
 	 *	@param		int		$type			Type invoice
 	 *	@return     string        			Label of status
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0)
 	{
 		global $langs;
@@ -585,8 +587,9 @@ abstract class CommonInvoice extends CommonObject
 	 *	conditions de reglements de la facture et date de facturation
 	 *
 	 *	@param      integer	$cond_reglement   	Condition of payment (code or id) to use. If 0, we use current condition.
-	 *	@return     date     			       	Date limite de reglement si ok, <0 si ko
+	 *  @return     date     			       	Date limite de reglement si ok, <0 si ko
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function calculate_date_lim_reglement($cond_reglement=0)
 	{
 		if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code;
@@ -776,4 +779,3 @@ abstract class CommonInvoiceLine extends CommonObjectLine
 		$this->db = $db;
 	}
 }
-

+ 33 - 2
htdocs/core/class/commonobject.class.php

@@ -722,6 +722,7 @@ abstract class CommonObject
 	 *  @param  int		$notrigger			Disable all triggers
 	 *  @return int                 		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger=0)
 	{
 		global $user,$langs;
@@ -842,6 +843,7 @@ abstract class CommonObject
 	 *    @param    string          $source     Nature of contact ('internal' or 'external')
 	 *    @return   int                         >0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function copy_linked_contact($objFrom, $source='internal')
 	{
 		$contacts = $objFrom->liste_contact(-1, $source);
@@ -865,6 +867,7 @@ abstract class CommonObject
 	 *      @param  int		$fk_socpeople	    Id of soc_people to update (not modified if 0)
 	 *      @return int                 		<0 if KO, >= 0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0)
 	{
 		// Insert into database
@@ -892,6 +895,7 @@ abstract class CommonObject
 	 *    @param	int		$notrigger		Disable all triggers
 	 *    @return   int						>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_contact($rowid, $notrigger=0)
 	{
 		global $user;
@@ -929,6 +933,7 @@ abstract class CommonObject
 	 *	  @param	string	$code		Type of contact (code or id)
 	 *    @return   int					>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_linked_contact($source='',$code='')
 	{
 		$temp = array();
@@ -966,6 +971,7 @@ abstract class CommonObject
 	 *    @param    string      $code       Filter on this code of contact type ('SHIPPING', 'BILLING', ...)
 	 *    @return	array		            Array of contacts
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function liste_contact($statut=-1,$source='external',$list=0,$code='')
 	{
 		global $langs;
@@ -1074,6 +1080,7 @@ abstract class CommonObject
 	 *		@param	string	$code		Type of contact (Example: 'CUSTOMER', 'SERVICE')
 	 *      @return array       		Array list of type of contacts (id->label if option=0, code->label if option=1)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function liste_type_contact($source='internal', $order='position', $option=0, $activeonly=0, $code='')
 	{
 		global $langs;
@@ -1183,6 +1190,7 @@ abstract class CommonObject
 	 *		@param	int		$contactid      Id du contact. Use this->contactid if empty.
 	 *		@return	int						<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_contact($contactid=null)
 	{
 		if (empty($contactid)) $contactid=$this->contactid;
@@ -1202,6 +1210,7 @@ abstract class CommonObject
 	 *		@param		int		$force_thirdparty_id	Force thirdparty id
 	 *		@return		int								<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_thirdparty($force_thirdparty_id=0)
 	{
 		global $conf;
@@ -1264,6 +1273,7 @@ abstract class CommonObject
 	 *
 	 *	@return		int			<0 if KO, 0 if can't guess type of barcode (ISBN, EAN13...), >0 if OK (all barcode properties loaded)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_barcode()
 	{
 		global $conf;
@@ -1311,6 +1321,7 @@ abstract class CommonObject
 	 *
 	 *		@return		int			<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_projet()
 	{
 		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
@@ -1331,6 +1342,7 @@ abstract class CommonObject
 	 *
 	 *		@return		int			<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_product()
 	{
 		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@@ -1350,6 +1362,7 @@ abstract class CommonObject
 	 *		@param	int		$userid 		Id du contact
 	 *		@return	int						<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_user($userid)
 	{
 		$user = new User($this->db);
@@ -1363,6 +1376,7 @@ abstract class CommonObject
 	 *
 	 *	@return		void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_origin()
 	{
 		if ($this->origin == 'shipping') $this->origin = 'expedition';
@@ -1532,6 +1546,7 @@ abstract class CommonObject
 	 *		@param	int		$nodbprefix	Do not include DB prefix to forge table name
 	 *      @return int         		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_previous_next_ref($filter, $fieldid, $nodbprefix=0)
 	{
 		global $conf, $user;
@@ -2167,6 +2182,7 @@ abstract class CommonObject
 	 * 	@param		boolean		$fk_parent_line    Table with fk_parent_line field or not
 	 * 	@return		int                            <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function line_order($renum=false, $rowidorder='ASC', $fk_parent_line=true)
 	{
 		if (! $this->table_element_line)
@@ -2284,6 +2300,7 @@ abstract class CommonObject
 	 * 	@param	boolean		$fk_parent_line		Table with fk_parent_line field or not
 	 * 	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function line_up($rowid, $fk_parent_line=true)
 	{
 		$this->line_order(false, 'ASC', $fk_parent_line);
@@ -2302,6 +2319,7 @@ abstract class CommonObject
 	 * 	@param	boolean		$fk_parent_line		Table with fk_parent_line field or not
 	 * 	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function line_down($rowid, $fk_parent_line=true)
 	{
 		$this->line_order(false, 'ASC', $fk_parent_line);
@@ -2344,6 +2362,7 @@ abstract class CommonObject
 	 * 	@param	array	$rows	Array of rows
 	 * 	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function line_ajaxorder($rows)
 	{
 		$num = count($rows);
@@ -2459,6 +2478,7 @@ abstract class CommonObject
 	 * 	@param		int		$fk_parent_line		Parent line id
 	 *  @return     int  			   			Max value of rang in table of lines
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function line_max($fk_parent_line=0)
 	{
 		// Search the last rang with fk_parent_line
@@ -2505,6 +2525,7 @@ abstract class CommonObject
 	 *  @param      string		$ref_ext	Update field ref_ext
 	 *  @return     int      		   		<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_ref_ext($ref_ext)
 	{
 		if (! $this->table_element)
@@ -2537,7 +2558,8 @@ abstract class CommonObject
 	 *  @param		string		$suffix		'', '_public' or '_private'
 	 *  @return     int      		   		<0 if KO, >0 if OK
 	 */
-	function update_note($note,$suffix='')
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+	function update_note($note, $suffix='')
 	{
 		global $user;
 
@@ -2589,6 +2611,7 @@ abstract class CommonObject
 	 * @deprecated
 	 * @see update_note()
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_note_public($note)
 	{
 		return $this->update_note($note,'_public');
@@ -2604,6 +2627,7 @@ abstract class CommonObject
 	 *  @param	Societe	$seller				If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object.
 	 *	@return	int    			           	<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller=null)
 	{
 		global $conf, $hookmanager, $action;
@@ -2840,6 +2864,7 @@ abstract class CommonObject
 	 *	@return		int					<=0 if KO, >0 if OK
 	 *	@see		fetchObjectLinked, updateObjectLinked, deleteObjectLinked
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_object_linked($origin=null, $origin_id=null)
 	{
 		$origin = (! empty($origin) ? $origin : $this->origin);
@@ -3598,6 +3623,7 @@ abstract class CommonObject
 	 *
 	 *    @return	string	incoterms info
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function display_incoterms()
 	{
 		$out = '';
@@ -4209,6 +4235,7 @@ abstract class CommonObject
 	 *	@param		int		$mandatory			Mandatory or not
 	 *	@return		int							<=0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_element_resource($resource_id, $resource_type, $busy=0, $mandatory=0)
 	{
 		$this->db->begin();
@@ -4251,6 +4278,7 @@ abstract class CommonObject
 	 *    @param	int		$notrigger		Disable all triggers
 	 *    @return   int						>0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_resource($rowid, $element, $notrigger=0)
 	{
 		global $user;
@@ -4635,6 +4663,7 @@ abstract class CommonObject
 	 * @param   User      $user           Object user
 	 * @return  int                       Result of run_triggers
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function call_trigger($trigger_name, $user)
 	{
 		global $langs,$conf;
@@ -4669,6 +4698,7 @@ abstract class CommonObject
 	 *  @param  array	$optionsArray   Array resulting of call of extrafields->fetch_name_optionals_label(). Deprecated. Function must be called without parameters.
 	 *  @return	int						<0 if error, 0 if no values of extrafield to find nor found, 1 if an attribute is found and value loaded
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_optionals($rowid=null, $optionsArray=null)
 	{
 		if (empty($rowid)) $rowid=$this->id;
@@ -6120,7 +6150,7 @@ abstract class CommonObject
 	 *
 	 * @param 	Extrafields $extrafields    Extrafield Object
 	 * @param 	string      $mode           Show output (view) or input (edit) for extrafield
-	 * @param 	array       $params         Optional parameters
+	 * @param 	array       $params         Optional parameters. Example: array('style'=>'class="oddeven"', 'colspan'=>$colspan)
 	 * @param 	string      $keysuffix      Suffix string to add after name and id of field (can be used to avoid duplicate names)
 	 * @param 	string      $keyprefix      Prefix string to add before name and id of field (can be used to avoid duplicate names)
 	 * @param	string		$onetrtd		All fields in same tr td
@@ -6449,6 +6479,7 @@ abstract class CommonObject
 	 *  @param		int		$usesharelink	Use the public shared link of image (if not available, the 'nophoto' image will be shown instead)
 	 *  @return     string					Html code to show photo. Number of photos shown is saved in this->nbphoto
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfilename=0, $showaction=0, $maxHeight=120, $maxWidth=160, $nolink=0, $notitle=0, $usesharelink=0)
 	{
 		global $conf,$user,$langs;

+ 18 - 11
htdocs/core/class/commonstickergenerator.class.php

@@ -62,7 +62,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php';
 abstract class CommonStickerGenerator
 {
 
-	public $code;		// Code of format
+	public $code;   // Code of format
 	public $format;	// Array with informations
 
 	// protected
@@ -103,6 +103,7 @@ abstract class CommonStickerGenerator
 	 *	@param	string		$outputdir			Output directory for pdf file
 	 *  @return int             				1=OK, 0=KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	abstract function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='');
 
 	/**
@@ -123,6 +124,7 @@ abstract class CommonStickerGenerator
 	 * @param    int        $pt    point
 	 * @return   void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function Set_Char_Size(&$pdf,$pt)
 	{
 		if ($pt > 3) {
@@ -144,6 +146,7 @@ abstract class CommonStickerGenerator
 	 * @param 	int		$nbPointilles		Nb pointilles
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function _Pointille(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$nbPointilles=15)
 	{
 		$pdf->SetLineWidth($epaisseur);
@@ -185,6 +188,7 @@ abstract class CommonStickerGenerator
 	 * @param int	$taille             Size
 	 * @return void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _Croix(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=4)
 	{
 		$pdf->SetDrawColor(192,192,192);
@@ -216,6 +220,7 @@ abstract class CommonStickerGenerator
 	 * @param string    $dest   to
 	 * @return float    value   value after conversion
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _Convert_Metric($value, $src, $dest)
 	{
 		if ($src != $dest) {
@@ -233,6 +238,7 @@ abstract class CommonStickerGenerator
 	 * @param  int    $pt    Point
 	 * @return int           Height chars
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _Get_Height_Chars($pt)
 	{
 		// Tableau de concordance entre la hauteur des caracteres et de l'espacement entre les lignes
@@ -251,19 +257,20 @@ abstract class CommonStickerGenerator
 	 * @param    string    $format  Format
 	 * @return   void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _Set_Format(&$pdf, $format)
 	{
-		$this->_Metric 	= $format['metric'];
-		$this->_Avery_Name 	= $format['name'];
-		$this->_Avery_Code	= $format['code'];
+		$this->_Metric = $format['metric'];
+		$this->_Avery_Name = $format['name'];
+		$this->_Avery_Code = $format['code'];
 		$this->_Margin_Left	= $this->_Convert_Metric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
-		$this->_Margin_Top	= $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
-		$this->_X_Space 	= $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
-		$this->_Y_Space 	= $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
-		$this->_X_Number 	= $format['NX'];
-		$this->_Y_Number 	= $format['NY'];
-		$this->_Width 	= $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc);
-		$this->_Height	= $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc);
+		$this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
+		$this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
+		$this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
+		$this->_X_Number = $format['NX'];
+		$this->_Y_Number = $format['NY'];
+		$this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc);
+		$this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc);
 		$this->Set_Char_Size($pdf, $format['font-size']);
 	}
 }

+ 2 - 0
htdocs/core/class/discount.class.php

@@ -362,6 +362,7 @@ class DiscountAbsolute
      *	@param		int		$rowidinvoice	Invoice id (To use discount as a credit note to reduc payment of invoice)
      *	@return		int						<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function link_to_invoice($rowidline,$rowidinvoice)
     {
         // Check parameters
@@ -413,6 +414,7 @@ class DiscountAbsolute
      *
      *	@return		int							<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function unlink_invoice()
     {
         $sql ="UPDATE ".MAIN_DB_PREFIX."societe_remise_except";

+ 1 - 1
htdocs/core/class/doleditor.class.php

@@ -148,6 +148,7 @@ class DolEditor
      *  @param	string	$option				 For ACE editor, set the source language ('html', 'php', 'javascript', ...)
      *  @return	void|string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='')
     {
     	global $conf,$langs;
@@ -345,4 +346,3 @@ class DolEditor
         else print $out;
     }
 }
-

+ 32 - 1
htdocs/core/class/dolgraph.class.php

@@ -134,6 +134,7 @@ class DolGraph
 	 * @param 	float	$which_prec		Precision
 	 * @return 	boolean
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetPrecisionY($which_prec)
 	{
 		$this->PrecisionY = $which_prec;
@@ -146,6 +147,7 @@ class DolGraph
 	 * @param 	float 		$xi		Xi
 	 * @return	boolean				True
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetHorizTickIncrement($xi)
 	{
 		$this->horizTickIncrement = $xi;
@@ -158,6 +160,7 @@ class DolGraph
 	 * @param 	float 		$xt		Xt
 	 * @return	boolean				True
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetNumXTicks($xt)
 	{
 		$this->SetNumXTicks = $xt;
@@ -170,6 +173,7 @@ class DolGraph
 	 * @param 	float 		$x		Label interval
 	 * @return	boolean				True
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetLabelInterval($x)
 	{
 		$this->labelInterval = $x;
@@ -182,6 +186,7 @@ class DolGraph
 	 * @param	boolean		$bool	XGrid or not
 	 * @return	boolean				true
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetHideXGrid($bool)
 	{
 		$this->hideXGrid = $bool;
@@ -194,6 +199,7 @@ class DolGraph
 	 * @param	boolean		$bool	YGrid or not
 	 * @return	boolean				true
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetHideYGrid($bool)
 	{
 		$this->hideYGrid = $bool;
@@ -206,6 +212,7 @@ class DolGraph
 	 * @param 	string	$label		Y label
 	 * @return	boolean|null				True
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetYLabel($label)
 	{
 		$this->YLabel = $label;
@@ -217,6 +224,7 @@ class DolGraph
 	 * @param 	int		$w			Width
 	 * @return	boolean|null				True
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetWidth($w)
 	{
 		$this->width = $w;
@@ -228,6 +236,7 @@ class DolGraph
 	 * @param 	string	$title		Title
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetTitle($title)
 	{
 		$this->title = $title;
@@ -240,6 +249,7 @@ class DolGraph
 	 * @return	void
 	 * @see draw_jflot for syntax of data array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetData($data)
 	{
 		$this->data = $data;
@@ -251,6 +261,7 @@ class DolGraph
 	 * @param 	array	$datacolor		Data color array(array(R,G,B),array(R,G,B)...)
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetDataColor($datacolor)
 	{
 		$this->datacolor = $datacolor;
@@ -262,6 +273,7 @@ class DolGraph
 	 * @param 	array	$type		Array with type for each serie. Example: array('pie'), array('lines',...,'bars')
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetType($type)
 	{
 		$this->type = $type;
@@ -273,6 +285,7 @@ class DolGraph
 	 * @param 	array	$legend		Legend. Example: array('seriename1','seriname2',...)
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetLegend($legend)
 	{
 		$this->Legend = $legend;
@@ -284,6 +297,7 @@ class DolGraph
 	 * @param 	int		$legendwidthmin		Min width
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetLegendWidthMin($legendwidthmin)
 	{
 		$this->LegendWidthMin = $legendwidthmin;
@@ -295,6 +309,7 @@ class DolGraph
 	 * @param 	int		$max			Max value
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetMaxValue($max)
 	{
 		$this->MaxValue = $max;
@@ -305,6 +320,7 @@ class DolGraph
 	 *
 	 * @return	int		Max value
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function GetMaxValue()
 	{
 		return $this->MaxValue;
@@ -316,6 +332,7 @@ class DolGraph
 	 * @param 	int		$min			Min value
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetMinValue($min)
 	{
 		$this->MinValue = $min;
@@ -326,6 +343,7 @@ class DolGraph
 	 *
 	 * @return	int		Max value
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function GetMinValue()
 	{
 		return $this->MinValue;
@@ -337,6 +355,7 @@ class DolGraph
 	 * @param 	int		$h				Height
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetHeight($h)
 	{
 		$this->height = $h;
@@ -348,6 +367,7 @@ class DolGraph
 	 * @param 	string	$s				Shading
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetShading($s)
 	{
 		$this->SetShading = $s;
@@ -359,6 +379,7 @@ class DolGraph
 	 * @param 	string	$s				Shading
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetCssPrefix($s)
 	{
 		$this->cssprefix = $s;
@@ -369,6 +390,7 @@ class DolGraph
 	 *
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function ResetBgColor()
 	{
 		unset($this->bgcolor);
@@ -379,6 +401,7 @@ class DolGraph
 	 *
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function ResetBgColorGrid()
 	{
 		unset($this->bgcolorgrid);
@@ -435,6 +458,7 @@ class DolGraph
 	 * @param	array	$bg_color		array(R,G,B) ou 'onglet' ou 'default'
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetBgColor($bg_color = array(255,255,255))
 	{
 		global $theme_bgcolor,$theme_bgcoloronglet;
@@ -463,6 +487,7 @@ class DolGraph
 	 * @param	array	$bg_colorgrid		array(R,G,B) ou 'onglet' ou 'default'
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function SetBgColorGrid($bg_colorgrid = array(255,255,255))
 	{
 		global $theme_bgcolor,$theme_bgcoloronglet;
@@ -490,6 +515,7 @@ class DolGraph
 	 *
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function ResetDataColor()
 	{
 		unset($this->datacolor);
@@ -500,6 +526,7 @@ class DolGraph
 	 *
 	 * @return	int		Max value
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function GetMaxValueInData()
 	{
 		$k = 0;
@@ -525,6 +552,7 @@ class DolGraph
 	 *
 	 * @return	int		Min value of all data
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function GetMinValueInData()
 	{
 		$k = 0;
@@ -550,6 +578,7 @@ class DolGraph
 	 *
 	 * @return 	int		Max value of all data
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function GetCeilMaxValue()
 	{
 		$max = $this->GetMaxValueInData();
@@ -573,6 +602,7 @@ class DolGraph
 	 *
 	 * @return 	double		Max value of all data
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function GetFloorMinValue()
 	{
 		$min = $this->GetMinValueInData();
@@ -629,6 +659,7 @@ class DolGraph
 	 * @param	string	$fileurl	Url path to show image if saved onto disk
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
 	private function draw_artichow($file,$fileurl)
 	{
 		global $artichow_defaultfont;
@@ -817,6 +848,7 @@ class DolGraph
 	 * @param	string	$fileurl	Url path to show image if saved onto disk. Never used here.
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
 	private function draw_jflot($file,$fileurl)
 	{
 		global $artichow_defaultfont;
@@ -1098,4 +1130,3 @@ class DolGraph
 		return 0;
 	}
 }
-

+ 7 - 0
htdocs/core/class/dolreceiptprinter.class.php

@@ -359,6 +359,7 @@ class dolReceiptPrinter extends Escpos
      *  @param    string    $parameter      Printer parameter
      *  @return  int                        0 if OK; >0 if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function AddPrinter($name, $type, $profile, $parameter)
     {
         global $conf;
@@ -384,6 +385,7 @@ class dolReceiptPrinter extends Escpos
      *  @param    int       $printerid      Printer id
      *  @return  int                        0 if OK; >0 if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function UpdatePrinter($name, $type, $profile, $parameter, $printerid)
     {
         global $conf;
@@ -408,6 +410,7 @@ class dolReceiptPrinter extends Escpos
      *  @param    int       $printerid      Printer id
      *  @return  int                        0 if OK; >0 if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DeletePrinter($printerid)
     {
         global $conf;
@@ -430,6 +433,7 @@ class dolReceiptPrinter extends Escpos
      *  @param    int       $templateid     Template id
      *  @return   int                       0 if OK; >0 if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function UpdateTemplate($name, $template, $templateid)
     {
         global $conf;
@@ -453,6 +457,7 @@ class dolReceiptPrinter extends Escpos
      *  @param    int       $printerid      Printer id
      *  @return  int                        0 if OK; >0 if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SendTestToPrinter($printerid)
     {
         global $conf;
@@ -489,6 +494,7 @@ class dolReceiptPrinter extends Escpos
      *  @param   int       $printerid       Printer id
      *  @return  int                        0 if OK; >0 if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SendToPrinter($object, $templateid, $printerid)
     {
         global $conf;
@@ -650,6 +656,7 @@ class dolReceiptPrinter extends Escpos
      *  @param   int       $printerid       Printer id
      *  @return  int                        0 if OK; >0 if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function InitPrinter($printerid)
     {
         global $conf;

+ 1 - 0
htdocs/core/class/emailsenderprofile.class.php

@@ -322,6 +322,7 @@ class EmailSenderProfile extends CommonObject
 	 *  @param  int		$mode          	0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
 	 *  @return string 			       	Label of status
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	static function LibStatut($status,$mode=0)
 	{
 		global $langs;

+ 4 - 0
htdocs/core/class/extrafields.class.php

@@ -316,6 +316,7 @@ class ExtraFields
 	 *  @param  string  		$enabled  		Condition to have the field enabled or not
 	 *  @return	int								<=0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
 	private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0, $param='', $alwayseditable=0, $perms='', $list='-1', $help='', $default='', $computed='',$entity='', $langfile='', $enabled='1')
 	{
 		global $conf,$user;
@@ -469,6 +470,7 @@ class ExtraFields
 	 *  @param  string	$elementtype        Element type ('member', 'product', 'thirdparty', ...)
 	 *  @return int              			< 0 if KO, 0 if nothing is done, 1 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
 	private function delete_label($attrname, $elementtype='member')
 	{
 		global $conf;
@@ -634,6 +636,7 @@ class ExtraFields
      *  @param  int     $totalizable        Is extrafield totalizable on list
      *  @return	int							<=0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
 	private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list='0',$help='',$default='',$computed='',$entity='',$langfile='',$enabled='1', $totalizable=0)
 	{
 		global $conf, $user;
@@ -752,6 +755,7 @@ class ExtraFields
 	 * 	@param	boolean		$forceload			Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED. Deprecated. Should not be required.
 	 * 	@return	array							Array of attributes keys+label for all extra fields.
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_name_optionals_label($elementtype,$forceload=false)
 	{
 		global $conf;

+ 1 - 0
htdocs/core/class/fiscalyear.class.php

@@ -262,6 +262,7 @@ class Fiscalyear extends CommonObject
 	 *  @param  int		$mode       0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
 	 *  @return string      		Label
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function LibStatut($statut,$mode=0)
 	{
 		global $langs;

+ 10 - 11
htdocs/core/class/genericobject.class.php

@@ -24,19 +24,18 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
 
 
 /**
- *	Class of a generic business object
+ *  Class of a generic business object
  */
 
 class GenericObject extends CommonObject
 {
-	/**
-	 *	Constructor
-	 *
-	 *  @param		DoliDB		$db      Database handler
-	 */
-	function __construct($db)
-	{
-	    $this->db=$db;
-	}
+    /**
+     * Constructor
+     *
+     * @param       DoliDB      $db     Database handler
+     */
+    function __construct($db)
+    {
+        $this->db=$db;
+    }
 }
-

+ 45 - 1
htdocs/core/class/html.form.class.php

@@ -666,6 +666,7 @@ class Form
 	 *  @param	int		$disablefavorites	Disable favorites
 	 *  @return string           			HTML string with select
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0)
 	{
 		global $conf,$langs;
@@ -761,6 +762,7 @@ class Form
 	 *  @param	array	$events					Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
 	 *  @return string           				HTML string with select and input
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array())
 	{
 		global $conf,$langs;
@@ -852,6 +854,7 @@ class Form
 	 * 	@param	integer	$forceall		1=Force to show products and services in combo list, whatever are activated modules, 0=No force, -1=Force none (and set hidden field to 'service')
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0)
 	{
 		global $db,$langs,$user,$conf;
@@ -901,6 +904,7 @@ class Form
 	 *
 	 *	@return     int             Nb of lines loaded, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_cache_types_fees()
 	{
 		global $langs;
@@ -951,6 +955,7 @@ class Form
 	 * 	@param	int			$showempty		Add an empty field
 	 * 	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_type_fees($selected='',$htmlname='type',$showempty=0)
 	{
 		global $user, $langs;
@@ -993,6 +998,7 @@ class Form
 	 *  @return		string								Return select box for thirdparty.
 	 *  @deprecated	3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0)
 	{
    		return $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0, $limit);
@@ -1017,6 +1023,7 @@ class Form
 	 * 	@param  bool	$multiple				add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter)
 	 * 	@return	string							HTML string with select box for thirdparty.
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array(), $multiple=false)
 	{
 		global $conf,$user,$langs;
@@ -1079,6 +1086,7 @@ class Form
 	 *	@param  bool	$multiple       add [] in the name of element and add 'multiple' attribut
 	 * 	@return	string					HTML string with
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='', $multiple=false)
 	{
 		global $conf,$user,$langs;
@@ -1250,6 +1258,7 @@ class Form
 	 * 		@param	int		$maxvalue		Max value for lines that can be selected
 	 * 		@return	int						Return number of qualifed lines in list
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0)
 	{
 		global $langs,$conf;
@@ -1335,6 +1344,7 @@ class Form
 	 *	@return	int						<0 if KO, Nb of contact in list if OK
 	 *  @deprected						You can use selectcontacts directly (warning order of param was changed)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $events=array(), $options_only=false, $moreparam='', $htmlid='')
 	{
 		print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid);
@@ -1489,6 +1499,7 @@ class Form
 	 *  @deprecated		Use select_dolusers instead
 	 *  @see select_dolusers()
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0')
 	{
 		print $this->select_dolusers($selected,$htmlname,$show_empty,$exclude,$disabled,$include,$enableonly,$force_entity);
@@ -1517,6 +1528,7 @@ class Form
 	 * 	@return	string					HTML select string
 	 *  @see select_dolgroups
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='', $noactive=0, $outputmode=0, $multiple=false)
 	{
 		global $conf,$user,$langs;
@@ -1723,6 +1735,7 @@ class Form
 	 * 	@return	string					HTML select string
 	 *  @see select_dolgroups
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_dolusers_forevent($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array())
 	{
 		global $conf, $user, $langs;
@@ -1814,6 +1827,7 @@ class Form
 	 *  @param 		array 		$selected_combinations 	Selected combinations. Format: array([attrid] => attrval, [...])
 	 *  @return		void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $hidepriceinlabel=0, $warehouseStatus='', $selected_combinations = array())
 	{
 		global $langs,$conf;
@@ -1954,6 +1968,7 @@ class Form
 	 *										    'warehouseinternal' = select products from warehouses for internal correct/transfer only
 	 *  @return     array    				    Array of keys for json
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0,$morecss='',$hidepriceinlabel=0, $warehouseStatus='')
 	{
 		global $langs,$conf,$user,$db;
@@ -2430,6 +2445,7 @@ class Form
 	 *  @param  int     $alsoproductwithnosupplierprice    1=Add also product without supplier prices
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0)
 	{
 		global $langs,$conf;
@@ -2473,6 +2489,7 @@ class Form
 	 *  @param  int     $alsoproductwithnosupplierprice    1=Add also product without supplier prices
 	 *  @return array           		Array of keys for json
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0)
 	{
 		global $langs,$conf,$db;
@@ -2695,6 +2712,7 @@ class Form
 	 *  @param      int		$selected_supplier  Pre-selected supplier if more than 1 result
 	 *  @return	    void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='')
 	{
 		global $langs,$conf;
@@ -2807,6 +2825,7 @@ class Form
 	 *    @param    int		$showempty         	Add an empty field
 	 *    @return	integer|null
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_address($selected, $socid, $htmlname='address_id',$showempty=0)
 	{
 		// On recherche les utilisateurs
@@ -2855,6 +2874,7 @@ class Form
 	 *
 	 *      @return     int             Nb of lines loaded, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_cache_conditions_paiements()
 	{
 		global $langs;
@@ -2902,6 +2922,7 @@ class Form
 	 *
 	 *      @return     int             Nb of lines loaded, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_cache_availability()
 	{
 		global $langs;
@@ -3068,6 +3089,7 @@ class Form
 	 *
 	 *      @return     int                 Nb of lines loaded, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_cache_types_paiements()
 	{
 		global $langs;
@@ -3128,6 +3150,7 @@ class Form
 	 * 		@param	string	$morecss			Add more CSS on select tag
 	 *		@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='')
 	{
 		global $langs, $user, $conf;
@@ -3173,6 +3196,7 @@ class Form
 	 *      @param  string  $morecss        Add more CSS on select tag
 	 * 		@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='')
 	{
 		global $langs,$user;
@@ -3446,6 +3470,7 @@ class Form
 	 *  @param	int		$showcurrency		Show currency in label
 	 * 	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0)
 	{
 		global $langs, $conf;
@@ -3549,6 +3574,7 @@ class Form
 	 *    @return	string
 	 *    @see select_categories
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0)
 	{
 		global $conf, $langs;
@@ -3638,6 +3664,7 @@ class Form
 	 *     @deprecated
 	 *     @see formconfirm()
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
 	{
 		print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width);
@@ -3946,6 +3973,7 @@ class Form
 	 *    @param    int     $nooutput           No print is done. String is returned.
 	 *    @return	string                      Return html content
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0)
 	{
 		global $langs;
@@ -4000,6 +4028,7 @@ class Form
 	 *	@param	int		$addempty		Add empty entry
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0)
 	{
 		global $langs;
@@ -4033,6 +4062,7 @@ class Form
 	 *	@param	int		$addempty		Ajoute entree vide
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_availability($page, $selected='', $htmlname='availability', $addempty=0)
 	{
 		global $langs;
@@ -4110,6 +4140,7 @@ class Form
 	 *    @return	string
 	 *    @see		select_date
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
 	{
 		global $langs;
@@ -4149,6 +4180,7 @@ class Form
 	 *  @param  array	$include        List of users id to include
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='')
 	{
 		global $langs;
@@ -4187,6 +4219,7 @@ class Form
 	 *    @param    int     $active         Active or not, -1 = all
 	 *    @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1)
 	{
 		global $langs;
@@ -4219,6 +4252,7 @@ class Form
 	 *    @param    string	$htmlname    	Name of select html field
 	 *    @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code')
 	{
 		global $langs;
@@ -4247,6 +4281,7 @@ class Form
 	 *    @param    string  $currency       Currency code to explain the rate
 	 *    @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='')
 	{
 		global $langs, $mysoc, $conf;
@@ -4294,6 +4329,7 @@ class Form
 	 *  @param	int		$discount_type	0 => customer discount, 1 => supplier discount
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0)
 	{
 		global $conf,$langs;
@@ -4383,6 +4419,7 @@ class Form
 	 *    @param    string		$htmlname    	Name of HTML select. If 'none', we just show contact link.
 	 *    @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_contacts($page, $societe, $selected='', $htmlname='contactid')
 	{
 		global $langs, $conf;
@@ -4431,6 +4468,7 @@ class Form
 	 *  @param	array	$events			Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array())
 	{
 		global $langs;
@@ -4467,6 +4505,7 @@ class Form
 	 *    @param    string	$htmlname    name of HTML select list
 	 *    @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_currency($selected='',$htmlname='currency_id')
 	{
 		print $this->selectCurrency($selected,$htmlname);
@@ -4577,6 +4616,7 @@ class Form
 	 *	@param	string	$country_code		Country code with quotes ("'CA'", or "'CA,IN,...'")
 	 *	@return	int							Nb of loaded lines, 0 if already loaded, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_cache_vatrates($country_code)
 	{
 		global $langs;
@@ -4657,6 +4697,7 @@ class Form
 	 *  @param  int          $mode                0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key
 	 *  @return	string
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0)
 	{
 		global $langs,$conf,$mysoc;
@@ -4846,6 +4887,7 @@ class Form
 	 * 	@return	string|null						Nothing or string if nooutput is 1
 	 *  @see	form_date, select_month, select_year, select_dayofweek
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
 	{
 		global $conf,$langs;
@@ -5212,6 +5254,7 @@ class Form
 	 * 	@param	int	$nooutput		    Do not output html string but return it
 	 *  @return	string|null
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0)
 	{
 		global $langs;
@@ -6406,6 +6449,7 @@ class Form
 	 *  @param  int		$useempty          Affiche valeur vide dans liste
 	 *  @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0)
 	{
 
@@ -6786,6 +6830,7 @@ class Form
 	 *  @return	string
 	 *  @see select_dolusers
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false)
 	{
 		global $conf,$user,$langs;
@@ -7114,4 +7159,3 @@ class Form
 		return $out;
 	}
 }
-

+ 6 - 0
htdocs/core/class/html.formaccounting.class.php

@@ -69,6 +69,7 @@ class FormAccounting extends Form
 	 * @param   int     $disabledajaxcombo Disable ajax combo box.
 	 * @return	string				String with HTML select
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_journal($selectid, $htmlname = 'journal', $nature=0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='', $disabledajaxcombo=0)
 	{
 		global $conf,$langs;
@@ -148,6 +149,7 @@ class FormAccounting extends Form
      *  @param  int     $allcountries   All countries
      * 	@return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0)
     {
         global $db,$langs,$user,$mysoc;
@@ -223,6 +225,7 @@ class FormAccounting extends Form
 	 * @param string $selectedkey Value
 	 * @return string HTML edit field
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '')
     {
 		$options = array();
@@ -260,6 +263,7 @@ class FormAccounting extends Form
 	 * @param string   $usecache           Key to use to store result into a cache. Next call with same key will reuse the cache.
 	 * @return string                      String with HTML select
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='')
 	{
 		global $conf, $langs;
@@ -347,6 +351,7 @@ class FormAccounting extends Form
 	 * @param string   $morecss        More css
 	 * @return string                  String with HTML select
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200')
     {
 
@@ -407,6 +412,7 @@ class FormAccounting extends Form
 	 * @param string $output_format (html/opton (for option html only)/array (to return options arrays
 	 * @return string/array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function selectyear_accountancy_bookkepping($selected = '', $htmlname = 'yearid', $useempty = 0, $output_format = 'html')
 	{
 	    global $conf;

+ 2 - 0
htdocs/core/class/html.formactions.class.php

@@ -64,6 +64,7 @@ class FormActions
      *  @param  string  $morecss        More css on select field
      * 	@return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function form_select_status_action($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100')
     {
         global $langs,$conf;
@@ -325,6 +326,7 @@ class FormActions
      *  @param  int             $nooutput       1=No output
      * 	@return	string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_type_actions($selected='', $htmlname='actioncode', $excludetype='', $onlyautoornot=0, $hideinfohelp=0, $multiselect=0, $nooutput=0)
     {
         global $langs,$user,$form,$conf;

+ 12 - 7
htdocs/core/class/html.formadmin.class.php

@@ -65,7 +65,8 @@ class FormAdmin
 	 *      @param      int         $showcode       Add language code into label
 	 *      @param		int			$forcecombo		Force to use combo box (so no ajax beautify effect)
 	 *      @return		string						Return HTML select string with list of languages
-	 */
+     */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0, $forcecombo=0)
 	{
 		global $langs;
@@ -135,6 +136,7 @@ class FormAdmin
      *    @param    string		$moreattrib      More attributes on html select tag
      *    @return	integer|null
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib='')
     {
         global $langs,$conf;
@@ -223,6 +225,7 @@ class FormAdmin
      *  @param	string[]	$dirmenuarray    Directories to scan
      *  @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_menu_families($selected, $htmlname, $dirmenuarray)
     {
 		global $langs,$conf;
@@ -293,6 +296,7 @@ class FormAdmin
      *  @param  string		$htmlname        Nom de la zone select
      *  @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_timezone($selected,$htmlname)
     {
 		global $langs,$conf;
@@ -339,14 +343,15 @@ class FormAdmin
 
 
 	/**
-	 *    	Return html select list with available languages (key='en_US', value='United States' for example)
+	 *  Return html select list with available languages (key='en_US', value='United States' for example)
 	 *
-	 *    	@param      string	$selected       Paper format pre-selected
-	 *    	@param      string	$htmlname       Name of HTML select field
-	 * 		@param		string	$filter			Value to filter on code
-	 * 		@param		int		$showempty		Add empty value
-	 * 		@return		string					Return HTML output
+	 *  @param      string	$selected       Paper format pre-selected
+	 *  @param      string	$htmlname       Name of HTML select field
+	 * 	@param		string	$filter			Value to filter on code
+	 * 	@param		int		$showempty		Add empty value
+	 * 	@return		string					Return HTML output
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_paper_format($selected='',$htmlname='paperformat_id',$filter=0,$showempty=0)
 	{
 		global $langs;

+ 2 - 1
htdocs/core/class/html.formbarcode.class.php

@@ -111,6 +111,7 @@ class FormBarCode
      *  @param  int		$useempty          Affiche valeur vide dans liste
      *  @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_barcode_type($selected='',$htmlname='barcodetype_id',$useempty=0)
     {
         global $langs,$conf;
@@ -170,6 +171,7 @@ class FormBarCode
      *  @param  string		$htmlname    	Nom du formulaire select
      *  @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function form_barcode_type($page, $selected='', $htmlname='barcodetype_id')
     {
         global $langs,$conf;
@@ -187,4 +189,3 @@ class FormBarCode
         }
     }
 }
-

+ 12 - 2
htdocs/core/class/html.formcompany.class.php

@@ -41,7 +41,6 @@ class FormCompany
 	 */
 	public $error='';
 
-
 	/**
 	 *	Constructor
 	 *
@@ -62,6 +61,7 @@ class FormCompany
 	 *      @param  string	$filter     Add a SQL filter to select
 	 *    	@return array      			Array of types
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function typent_array($mode=0, $filter='')
 	{
 		global $langs,$mysoc;
@@ -103,6 +103,7 @@ class FormCompany
 	 *	@param  string	$filter     Add a SQL filter to select
 	 *  @return array				Array of types d'effectifs
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function effectif_array($mode=0, $filter='')
 	{
 		$effs = array();
@@ -143,6 +144,7 @@ class FormCompany
 	 *	@param	int		$empty			Add empty value in list
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0)
 	{
 		global $user, $langs;
@@ -195,6 +197,7 @@ class FormCompany
 	 *   @param     string	$htmlname			Id of department
 	 *   @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_departement($selected='',$country_codeid=0, $htmlname='state_id')
 	{
 		print $this->select_state($selected,$country_codeid, $htmlname);
@@ -213,6 +216,7 @@ class FormCompany
 	 * 	  @return	string						String with HTML select
 	 *    @see select_country
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_state($selected='',$country_codeid=0, $htmlname='state_id')
 	{
 		global $conf,$langs,$user;
@@ -324,6 +328,7 @@ class FormCompany
 	 *   @param		string		$htmlname		Name of HTML select field
 	 *   @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_region($selected='',$htmlname='region_id')
 	{
 		global $conf,$langs;
@@ -388,6 +393,7 @@ class FormCompany
 	 *  @param  string  $morecss        Add more css on SELECT element
 	 *  @return	string					String with HTML select
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_civility($selected='',$htmlname='civility_id',$morecss='maxwidth100')
 	{
 		global $conf,$langs,$user;
@@ -447,6 +453,7 @@ class FormCompany
 	 *    @deprecated Use print xxx->select_juridicalstatus instead
 	 *    @see select_juridicalstatus()
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_forme_juridique($selected='', $country_codeid=0, $filter='')
 	{
 		print $this->select_juridicalstatus($selected, $country_codeid, $filter);
@@ -462,6 +469,7 @@ class FormCompany
      *    @param	string		$htmlname			HTML name of select
      *    @return	string							String with HTML select
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_juridicalstatus($selected='', $country_codeid=0, $filter='', $htmlname='forme_juridique_code')
 	{
 		global $conf,$langs,$user;
@@ -758,6 +766,7 @@ class FormCompany
 	 *    @param    string      $morecss                More css
 	 *    @return	string
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='',$morecss='')
 	{
 		global $conf;
@@ -787,6 +796,7 @@ class FormCompany
      *  @param  string  $morecss        More css
      *  @return	string					HTML string with prof id
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function get_input_id_prof($idprof,$htmlname,$preselected,$country_code,$morecss='maxwidth100onsmartphone quatrevingtpercent')
     {
         global $conf,$langs;
@@ -835,6 +845,7 @@ class FormCompany
      * @param 	string      $htmlname		HTML select name
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_localtax($local, $selected, $htmlname)
     {
     	$tax=get_localtax_by_third($local);
@@ -868,4 +879,3 @@ class FormCompany
     	}
     }
 }
-

+ 5 - 4
htdocs/core/class/html.formcontract.class.php

@@ -31,7 +31,7 @@ class FormContract
      * @var DoliDB Database handler.
      */
     public $db;
-    
+
     /**
 	 * @var string Error code (or message)
 	 */
@@ -59,6 +59,7 @@ class FormContract
 	 *	@param	int		$showempty	Show empty line
 	 *	@return int         		Nbr of project if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
 	{
 		global $db,$user,$conf,$langs;
@@ -173,11 +174,11 @@ class FormContract
 	 *	@param  string	$htmlname   Nom de la zone html
 	 *	@param	int		$maxlength	Maximum length of label
 	 *	@param	int		$showempty	Show empty line
-	 *	@return int         		Nbr of project if OK, <0 if KO
+	 *	@return int                 Nbr of project if OK, <0 if KO
 	 */
 	function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
 	{
-	    global $langs;
+        global $langs;
 
         print "\n";
         print '<form method="post" action="'.$page.'">';
@@ -186,5 +187,5 @@ class FormContract
         $this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty);
         print '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
         print '</form>';
-	}
+    }
 }

+ 1 - 0
htdocs/core/class/html.formcron.class.php

@@ -58,6 +58,7 @@ class FormCron extends Form
 	 * @param   integer	$readonly		Select is read only or not
 	 * @return	string					HTML select field
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_typejob($htmlname,$selected=0,$readonly=0)
 	{
 		global $langs;

+ 4 - 1
htdocs/core/class/html.formfile.class.php

@@ -77,6 +77,7 @@ class FormFile
 	 *	@param	string		$sectiondir		If upload must be done inside a particular directory (is sectiondir defined, sectionid must not be)
 	 * 	@return	int							<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1, $htmlname='formuserfile', $accept='', $sectiondir='')
 	{
 		global $conf,$langs, $hookmanager;
@@ -252,6 +253,7 @@ class FormFile
 	 * 		@return		int										<0 if KO, number of shown files if OK
 	 *      @deprecated                                         Use print xxx->showdocuments() instead.
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='')
 	{
 		$this->numoffiles=0;
@@ -1008,6 +1010,7 @@ class FormFile
 	 * 	@return	 int						<0 if KO, nb of files shown if OK
 	 *  @see list_of_autoecmfiles
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0)
 	{
 		global $user, $conf, $langs, $hookmanager;
@@ -1394,6 +1397,7 @@ class FormFile
 	 *  @return int                 		<0 if KO, nb of files shown if OK
 	 *  @see list_of_documents
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0)
 	{
 		global $user, $conf, $langs, $form;
@@ -1830,4 +1834,3 @@ class FormFile
 		return $out;
 	}
 }
-

+ 1 - 0
htdocs/core/class/html.formintervention.class.php

@@ -59,6 +59,7 @@ class FormIntervention
 	 *	@param	int		$showempty	Show empty line
 	 *	@return int         		Nbre of project if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1)
 	{
 		global $db,$user,$conf,$langs;

+ 6 - 0
htdocs/core/class/html.formmail.class.php

@@ -141,6 +141,7 @@ class FormMail extends Form
 	 *
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function clear_attached_files()
 	{
 		global $conf,$user;
@@ -165,6 +166,7 @@ class FormMail extends Form
 	 * @param 	string   $type   Mime type (can be dol_mimetype($file))
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function add_attached_files($path, $file='', $type='')
 	{
 		$listofpaths=array();
@@ -195,6 +197,7 @@ class FormMail extends Form
 	 * @param  	string	$keytodelete     Key in file array (0, 1, 2, ...)
 	 * @return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function remove_attached_files($keytodelete)
 	{
 		$listofpaths=array();
@@ -222,6 +225,7 @@ class FormMail extends Form
 	 *
 	 * @return	array       array('paths'=> ,'names'=>, 'mimes'=> )
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_attached_files()
 	{
 		$listofpaths=array();
@@ -244,6 +248,7 @@ class FormMail extends Form
 	 *	@param	string	$removefileaction	Name of action when removing file attachments
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function show_form($addfileaction='addfile',$removefileaction='removefile')
 	{
 		print $this->get_form($addfileaction,$removefileaction);
@@ -259,6 +264,7 @@ class FormMail extends Form
 	 *	@param	string	$removefileaction	Name of action when removing file attachments
 	 *	@return string						Form to show
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_form($addfileaction='addfile', $removefileaction='removefile')
 	{
 		global $conf, $langs, $user, $hookmanager, $form;

+ 18 - 5
htdocs/core/class/html.formother.class.php

@@ -68,7 +68,8 @@ class FormOther
      *    @param    int		$fk_user          Utilisateur créant le modèle
      *    @return	void
      */
-    function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0, $fk_user=null)
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+    function select_export_model($selected='', $htmlname='exportmodelid', $type='', $useempty=0, $fk_user=null)
     {
         $sql = "SELECT rowid, label";
         $sql.= " FROM ".MAIN_DB_PREFIX."export_model";
@@ -118,7 +119,8 @@ class FormOther
      *    @param    int		$useempty          Affiche valeur vide dans liste
      *    @return	void
      */
-    function select_import_model($selected='',$htmlname='importmodelid',$type='',$useempty=0)
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+    function select_import_model($selected='', $htmlname='importmodelid', $type='', $useempty=0)
     {
         $sql = "SELECT rowid, label";
         $sql.= " FROM ".MAIN_DB_PREFIX."import_model";
@@ -165,7 +167,8 @@ class FormOther
      *    @param    string	$htmlname	Name of combo list
      *    @return	integer
      */
-    function select_ecotaxes($selected='',$htmlname='ecotaxe_id')
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+    function select_ecotaxes($selected='', $htmlname='ecotaxe_id')
     {
         global $langs;
 
@@ -222,7 +225,8 @@ class FormOther
      *    @param    string	$country_code   Country Code
      *    @return	string					HTML select list
      */
-    function select_revenue_stamp($selected='',$htmlname='revenuestamp',$country_code='')
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+    function select_revenue_stamp($selected='', $htmlname='revenuestamp', $country_code='')
     {
     	global $langs;
 
@@ -283,6 +287,7 @@ class FormOther
      *    @param    int     $showempty      Add also an empty line
      *    @return   string					HTML select string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_percent($selected=0,$htmlname='percent',$disabled=0,$increment=5,$start=0,$end=100,$showempty=0)
     {
         $return = '<select class="flat" name="'.$htmlname.'" '.($disabled?'disabled':'').'>';
@@ -319,6 +324,7 @@ class FormOther
      * @return  string		        	Html combo list code
      * @see	select_all_categories
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_categories($type, $selected=0, $htmlname='search_categ', $nocateg=0, $showempty=1, $morecss='')
     {
         global $conf, $langs;
@@ -378,6 +384,7 @@ class FormOther
      *  @param	string	$morecss		More CSS
      *  @return string					Html combo list code
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_salesrepresentatives($selected,$htmlname,$user,$showstatus=0,$showempty=1,$morecss='')
     {
         global $conf,$langs;
@@ -633,6 +640,7 @@ class FormOther
      * 		@deprecated Use instead selectColor
      *      @see selectColor()
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_color($set_color='', $prefix='f_color', $form_name='', $showcolorbox=1, $arrayofcolors='')
     {
     	print $this->selectColor($set_color, $prefix, $form_name, $showcolorbox, $arrayofcolors);
@@ -748,6 +756,7 @@ class FormOther
      *	@param	int		$y      	Hauteur de l'image en pixels
      *	@return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function CreateColorIcon($color,$module,$name,$x='12',$y='12')
     {
         global $conf;
@@ -785,6 +794,7 @@ class FormOther
      *    	@param  int			$useempty          Affiche valeur vide dans liste
      *    	@return	string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_dayofweek($selected='',$htmlname='weekid',$useempty=0)
     {
         global $langs;
@@ -829,6 +839,7 @@ class FormOther
      *      @param	string		$morecss			More Css
      *      @return string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_month($selected='', $htmlname='monthid', $useempty=0, $longlabel=0, $morecss='')
     {
         global $langs;
@@ -874,6 +885,7 @@ class FormOther
      *  @param	string		$morecss		More CSS
      *  @return	string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_year($selected='',$htmlname='yearid',$useempty=0, $min_year=10, $max_year=5, $offset=0, $invert=0, $option='', $morecss='valignmiddle widthauto')
     {
         print $this->selectyear($selected,$htmlname,$useempty,$min_year,$max_year,$offset,$invert,$option,$morecss);
@@ -943,6 +955,7 @@ class FormOther
      * @param  	int		$originid      	Id de l'origine
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function form_address($page, $selected, $socid, $htmlname='address_id', $origin='', $originid='')
     {
         global $langs,$conf;
@@ -1205,6 +1218,7 @@ class FormOther
      *  @param  string  $moreattrib         More attributes on HTML select tag
      * 	@return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_dictionary($htmlname,$dictionarytable,$keyfield='code',$labelfield='label',$selected='',$useempty=0,$moreattrib='')
     {
         global $langs, $conf;
@@ -1256,4 +1270,3 @@ class FormOther
         }
     }
 }
-

+ 4 - 1
htdocs/core/class/html.formprojet.class.php

@@ -71,6 +71,7 @@ class FormProjets
 	 *	@param  int     $htmlid         Html id to use instead of htmlname
 	 *	@return string           		Return html content
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_projects($socid=-1, $selected='', $htmlname='projectid', $maxlength=16, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode = 0, $filterkey = '', $nooutput=0, $forceaddid=0, $morecss='', $htmlid='')
 	{
 		global $langs,$conf,$form;
@@ -138,6 +139,7 @@ class FormProjets
 	 * @param  string  $morecss            More CSS
 	 * @return int         			       Nb of project if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_projects_list($socid=-1, $selected='', $htmlname='projectid', $maxlength=24, $option_only=0, $show_empty=1, $discard_closed=0, $forcefocus=0, $disabled=0, $mode=0, $filterkey = '', $nooutput=0, $forceaddid=0, $htmlid='', $morecss='maxwidth500')
 	{
 		global $user,$conf,$langs;
@@ -478,6 +480,7 @@ class FormProjets
 	 *    @param	string		$projectkey			Equivalent key  to fk_projet for actual table_element
 	 *    @return	int|string						The HTML select list of element or '' if nothing or -1 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_element($table_element, $socid=0, $morecss='', $limitonstatus=-2,$projectkey="fk_projet")
 	{
 		global $conf, $langs;
@@ -488,7 +491,7 @@ class FormProjets
 		if (! in_array($table_element, array('don','expensereport_det','expensereport','loan','stock_mouvement','chargesociales'))) $linkedtothirdparty=true;
 
 		$sqlfilter='';
-		
+
 		//print $table_element;
 		switch ($table_element)
 		{

+ 1 - 1
htdocs/core/class/html.formsms.class.php

@@ -95,6 +95,7 @@ class FormSms
      *  @param  int     $showform       Show form tags and submit button (recommanded is to use with value 0)
      *	@return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function show_form($morecss='titlefield', $showform=1)
     {
         global $conf, $langs, $user, $form;
@@ -361,4 +362,3 @@ function limitChars(textarea, limit, infodiv)
         print "<!-- End form SMS -->\n";
     }
 }
-

+ 1 - 1
htdocs/core/class/html.formsocialcontrib.class.php

@@ -60,6 +60,7 @@ class FormSocialContrib
      *  @param	string	$morecss		Add more CSS on select
      * 	@return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1, $morecss='minwidth300')
     {
         global $conf,$db,$langs,$user,$mysoc;
@@ -121,4 +122,3 @@ class FormSocialContrib
         }
     }
 }
-

+ 1 - 0
htdocs/core/class/interfaces.class.php

@@ -64,6 +64,7 @@ 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)
     {
         // Check parameters

+ 3 - 0
htdocs/core/class/ldap.class.php

@@ -156,6 +156,7 @@ class Ldap
 	 *
 	 *	@return		int		<0 if KO, 1 if bind anonymous, 2 if bind auth
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function connect_bind()
 	{
 		global $langs, $conf;
@@ -661,6 +662,7 @@ class Ldap
 	 *	@param	array		$info		Attributes array
 	 *	@return	string					Content of file
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function dump_content($dn, $info)
 	{
 		$content='';
@@ -1440,6 +1442,7 @@ class Ldap
 	 *	@param	string	$value		AD time to convert
 	 *	@return	integer				Unix timestamp
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function convert_time($value)
 	{
 		$dateLargeInt=$value; // nano secondes depuis 1601 !!!!

+ 5 - 2
htdocs/core/class/menu.class.php

@@ -73,7 +73,7 @@ class Menu
     /**
      * Insert a menu entry into this->liste
      *
-     * @param	int		$idafter	Array key after which inserting new entry
+     * @param   int		$idafter	Array key after which inserting new entry
      * @param	string	$url        Url to follow on click
      * @param   string	$titre      Label of menu to add
      * @param   integer	$level      Level of menu to add
@@ -101,9 +101,12 @@ class Menu
      *
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function remove_last()
     {
-    	if (count($this->liste) > 1) array_pop($this->liste);
+        if (count($this->liste) > 1) {
+            array_pop($this->liste);
+        }
     }
 
     /**

+ 27 - 8
htdocs/core/class/openid.class.php

@@ -51,6 +51,7 @@ class SimpleOpenID
      * @param	string	$a		Server
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SetOpenIDServer($a)
     {
         $this->URLs['openid_server'] = $a;
@@ -62,6 +63,7 @@ class SimpleOpenID
      * @param	string	$a		Server
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SetTrustRoot($a)
     {
         $this->URLs['trust_root'] = $a;
@@ -73,6 +75,7 @@ class SimpleOpenID
      * @param	string	$a		Server
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SetCancelURL($a)
     {
         $this->URLs['cancel'] = $a;
@@ -84,6 +87,7 @@ class SimpleOpenID
      * @param	string	$a		Server
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SetApprovedURL($a)
     {
         $this->URLs['approved'] = $a;
@@ -95,11 +99,12 @@ class SimpleOpenID
      * @param	string	$a		Server
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SetRequiredFields($a)
     {
-        if (is_array($a)){
+        if (is_array($a)) {
             $this->fields['required'] = $a;
-        }else{
+        } else {
             $this->fields['required'][] = $a;
         }
     }
@@ -110,11 +115,12 @@ class SimpleOpenID
      * @param	string	$a		Server
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SetOptionalFields($a)
     {
-        if (is_array($a)){
+        if (is_array($a)) {
             $this->fields['optional'] = $a;
-        }else{
+        } else {
             $this->fields['optional'][] = $a;
         }
     }
@@ -122,14 +128,15 @@ class SimpleOpenID
     /**
      * SetIdentity
      *
-     * @param	string	$a		Server
+     * @param	string  $a		Server
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function SetIdentity($a)
     {
         // Set Identity URL
         if ((stripos($a, 'http://') === false)
-        && (stripos($a, 'https://') === false)){
+        && (stripos($a, 'https://') === false)) {
             $a = 'http://'.$a;
         }
         /*
@@ -153,6 +160,7 @@ class SimpleOpenID
      *
      * @return	string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function GetIdentity()
     {
         // Get Identity
@@ -164,6 +172,7 @@ class SimpleOpenID
      *
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function GetError()
     {
         $e = $this->error;
@@ -177,6 +186,7 @@ class SimpleOpenID
      * @param	string	$desc		Description
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function ErrorStore($code, $desc = null)
     {
         $errs['OPENID_NOSERVERSFOUND'] = 'Cannot find OpenID Server TAG on Identity page.';
@@ -191,6 +201,7 @@ class SimpleOpenID
      *
      * @return	boolean
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function IsError()
     {
         if (count($this->error) > 0)
@@ -229,6 +240,7 @@ class SimpleOpenID
      * @param	string	$openid_identity		Server
      * @return	string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function OpenID_Standarize($openid_identity = null)
     {
         if ($openid_identity === null)
@@ -276,6 +288,7 @@ class SimpleOpenID
      * @param string	$params		Params
      * @return boolean|unknown
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function FSOCK_Request($url, $method="GET", $params = "")
     {
         $fp = fsockopen("ssl://www.myopenid.com", 443, $errno, $errstr, 3); // Connection timeout is 3 seconds
@@ -308,6 +321,7 @@ class SimpleOpenID
      * @param 	string	$params		Params
      * @return string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function CURL_Request($url, $method="GET", $params = "")
     {
         // Remember, SSL MUST BE SUPPORTED
@@ -337,6 +351,7 @@ class SimpleOpenID
      * @param string	$content	Content
      * @return array				Array of servers
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function HTML2OpenIDServer($content)
     {
         $get = array();
@@ -363,6 +378,7 @@ class SimpleOpenID
      * @param	string	$url	Url to found endpoint
      * @return 	string			Endpoint
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function GetOpenIDServer($url='')
     {
         global $conf;
@@ -373,12 +389,12 @@ class SimpleOpenID
         $response = getURLContent($url);
 
         list($servers, $delegates) = $this->HTML2OpenIDServer($response);
-        if (count($servers) == 0){
+        if (count($servers) == 0) {
             $this->ErrorStore('OPENID_NOSERVERSFOUND');
             return false;
         }
         if (isset($delegates[0])
-        && ($delegates[0] != "")){
+        && ($delegates[0] != "")) {
             $this->SetIdentity($delegates[0]);
         }
         $this->SetOpenIDServer($servers[0]);
@@ -390,6 +406,7 @@ class SimpleOpenID
      *
      * @return	string
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function GetRedirectURL()
     {
         $params = array();
@@ -414,6 +431,7 @@ class SimpleOpenID
      *
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function Redirect()
     {
         $redirect_to = $this->GetRedirectURL();
@@ -434,6 +452,7 @@ class SimpleOpenID
      *
      * @return	boolean
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function ValidateWithServer()
     {
         $params = array(

+ 4 - 1
htdocs/core/class/rssparser.class.php

@@ -469,6 +469,7 @@ class RssParser
      *  @param	array		$attrs		Attributes of tags
      *  @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function feed_start_element($p, $element, &$attrs)
     {
         $el = $element = strtolower($element);
@@ -588,6 +589,7 @@ class RssParser
      *  @param	string	$text	Tag
      *  @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function feed_cdata($p, $text)
     {
         if ($this->_format == 'atom' and $this->incontent)
@@ -608,6 +610,7 @@ class RssParser
      *  @param	string		$el		Tag
      *  @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function feed_end_element($p, $el)
     {
         $el = strtolower($el);
@@ -676,6 +679,7 @@ class RssParser
      * @param	string	$text		Text
      * @return	void
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function append_content($text)
     {
         if ( $this->initem ) {
@@ -786,4 +790,3 @@ function xml2php($xml)
 
     return $array;
 }
-

+ 7 - 0
htdocs/core/class/smtps.class.php

@@ -349,6 +349,7 @@ class SMTPs
 	 *
 	 * @return mixed  $_retVal   Boolean indicating success or failure on connection
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _server_connect()
 	{
 		// Default return value
@@ -411,6 +412,7 @@ class SMTPs
 	 *
 	 * @return boolean|null  $_retVal   Boolean indicating success or failure of authentication
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _server_authenticate()
 	{
 		global $conf;
@@ -1052,6 +1054,7 @@ class SMTPs
 	 *	@param		string		$_strAddr		Email address
 	 * 	@return 	array	 					An array of the various parts of an email address
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _strip_email($_strAddr)
 	{
 		// Keep the orginal
@@ -1094,6 +1097,7 @@ class SMTPs
 	 *
 	 * @return 		array		Returns an array of bares addresses
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_RCPT_list()
 	{
 		/**
@@ -1123,6 +1127,7 @@ class SMTPs
 	 * @param 		string 	       $_which 	    Which collection of addresses to return ('to', 'cc', 'bcc')
 	 * @return 		string|false 				Array of emaill address
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_email_list($_which = null)
 	{
 		// We need to know which address segment to pull
@@ -1753,6 +1758,7 @@ class SMTPs
 	 * @param	string		$response		Response. Example: "550 5.7.1  https://support.google.com/a/answer/6140680#invalidcred j21sm814390wre.3"
 	 * @return	boolean						True or false
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function server_parse($socket, $response)
 	{
 		/**
@@ -1794,6 +1800,7 @@ class SMTPs
 	 * @param 	string		$CRLF			CRLF
 	 * @return 	boolean|null						True or false
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function socket_send_str( $_strSend, $_returnCode = null, $CRLF = "\r\n" )
 	{
 		if ($this->_debug) $this->log.=$_strSend;	// @CHANGE LDR for log

+ 3 - 0
htdocs/core/class/translate.class.php

@@ -764,6 +764,7 @@ class Translate
 	 *  @param	int		$usecode		1=Show code instead of country name for language variant, 2=Show only code
 	 *  @return array     				List of languages
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0,$usecode=0)
 	{
 		global $conf;
@@ -802,6 +803,7 @@ class Translate
 	 *  @param  integer	$searchalt      Search also alernate language file
 	 *  @return boolean         		true if exists and readable
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function file_exists($filename,$searchalt=0)
 	{
 		// Test si fichier dans repertoire de la langue
@@ -1024,6 +1026,7 @@ class Translate
 	 *
 	 * @return array	Array of translation keys lang_key => string_translation_loaded
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function get_translations_for_substitutions()
 	{
 		$substitutionarray = array();

+ 18 - 0
htdocs/core/db/Database.interface.php

@@ -41,6 +41,7 @@ interface Database
 	 * @param   resource $resultset Resultset of request
 	 * @return  array                    Array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_row($resultset);
 
 	/**
@@ -77,6 +78,7 @@ interface Database
 	 * @param   string 		$owner 			Username of database owner
 	 * @return  resource                	resource defined if OK, null if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
 
 	/**
@@ -102,6 +104,7 @@ interface Database
 	 * @return 	int            Nombre de lignes
 	 * @see    	num_rows
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function affected_rows($resultset);
 
 	/**
@@ -118,6 +121,7 @@ interface Database
 	 *  @param	string		$table		Nmae of table filter ('xxx%')
 	 *  @return	array					List of tables in an array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLListTables($database, $table = '');
 
 	/**
@@ -150,6 +154,7 @@ interface Database
 	 * @param   resource $resultset Resultset of request
 	 * @return  array                    Array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_array($resultset);
 
 	/**
@@ -174,6 +179,7 @@ interface Database
 	 * @param   string 	$fieldid 	Field name
 	 * @return  int                	Id of row
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function last_insert_id($tab, $fieldid = 'rowid');
 
 	/**
@@ -254,6 +260,7 @@ interface Database
 	 * @return 	int                        Nb of lines
 	 * @see    	affected_rows
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function num_rows($resultset);
 
 	/**
@@ -289,6 +296,7 @@ interface Database
 	 * @param        array $keys 			Tableau des champs cles noms => valeur
 	 * @return       int                    <0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
 
 	/**
@@ -297,6 +305,7 @@ interface Database
 	 * @param        string $table 			Name of table
 	 * @return       int                    <0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDropTable($table);
 
 	/**
@@ -315,6 +324,7 @@ interface Database
 	 * @param    string $field_position 	Optionnel ex.: "after champtruc"
 	 * @return   int                        <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLAddField($table, $field_name, $field_desc, $field_position = "");
 
 	/**
@@ -324,6 +334,7 @@ interface Database
 	 * @param    string $field_name 		Name of field to drop
 	 * @return   int                        <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDropField($table, $field_name);
 
 	/**
@@ -334,6 +345,7 @@ interface Database
 	 * @param    string 	$field_desc 	Array with description of field format
 	 * @return   int                        <0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLUpdateField($table, $field_name, $field_desc);
 
 	/**
@@ -350,6 +362,7 @@ interface Database
 	 * @param    string 	$field 			Optionnel : Name of field if we want description of field
 	 * @return   resource            		Resource
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDescTable($table, $field = "");
 
 	/**
@@ -375,6 +388,7 @@ interface Database
 	 * @param    string $dolibarr_main_db_name 	Database name where user must be granted
 	 * @return   int                            <0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateUser(
 		$dolibarr_main_db_host,
 		$dolibarr_main_db_user,
@@ -417,6 +431,7 @@ interface Database
 	 * @param   string 			$table 			Name of table
 	 * @return  array                			Array with inforation on table
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLInfoTable($table);
 
 	/**
@@ -447,6 +462,7 @@ interface Database
 	 *
 	 * @return  string      Id connexion
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLGetConnectId();
 
 	/**
@@ -455,6 +471,7 @@ interface Database
 	 * @param   resource $resultset Curseur de la requete voulue
 	 * @return  Object                    Object result line or false if KO or end of cursor
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_object($resultset);
 
 	/**
@@ -463,5 +480,6 @@ interface Database
 	 * @param	string $database Name of database
 	 * @return  boolean            true if OK, false if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_db($database);
 }

+ 20 - 0
htdocs/core/db/mssql.class.php

@@ -145,6 +145,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	    string	$database	Name of database
 	 *	@return	    boolean  		    true if OK, false if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_db($database)
 	{
 		return @mssql_select_db($database, $this->db);
@@ -465,6 +466,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	resource	$resultset  Curseur de la requete voulue
 	 *	@return	object|false			Object result line or false if KO or end of cursor
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_object($resultset)
 	{
 		// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -478,6 +480,7 @@ class DoliDBMssql extends DoliDB
      *	@param	resource	$resultset  Resultset of request
      *	@return	array|false				Array or false if KO or end of cursor
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_array($resultset)
 	{
 		// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -492,6 +495,7 @@ class DoliDBMssql extends DoliDB
      *	@param	resource	$resultset  Resultset of request
      *	@return	array|false				Array or false if KO or end of cursor
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_row($resultset)
 	{
 		// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -506,6 +510,7 @@ class DoliDBMssql extends DoliDB
      *	@return int		    			Nb of lines
      *	@see    affected_rows
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function num_rows($resultset)
 	{
 		// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -520,6 +525,7 @@ class DoliDBMssql extends DoliDB
 	 *	@return int		    Nombre de lignes
 	 *	@see    num_rows
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function affected_rows($resultset)
 	{
 		// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -646,6 +652,7 @@ class DoliDBMssql extends DoliDB
 	 * @param	string	$fieldid	Field name
 	 * @return  int     			Id of row or -1 on error
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function last_insert_id($tab,$fieldid='rowid')
 	{
 		$res = $this->query("SELECT @@IDENTITY as id");
@@ -707,6 +714,7 @@ class DoliDBMssql extends DoliDB
 	 *
 	 * @return	        string      Id connexion
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLGetConnectId()
 	{
 		$resql=$this->query('SELECT CONNECTION_ID()');
@@ -729,6 +737,7 @@ class DoliDBMssql extends DoliDB
 	 * 	@param	string	$owner			Username of database owner
 	 * 	@return	false|resource|true		resource defined if OK, false if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateDb($database,$charset='',$collation='',$owner='')
 	{
         /*if (empty($charset))   $charset=$this->forcecharset;
@@ -761,6 +770,7 @@ class DoliDBMssql extends DoliDB
 	 *  @param	string		$table		Nmae of table filter ('xxx%')
      *  @return	array					List of tables in an array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLListTables($database,$table='')
 	{
 		$this->_results = mssql_list_tables($database, $this->db);
@@ -773,6 +783,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	string	$table		Name of table
 	 *	@return	array				Tableau des informations des champs de la table
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLInfoTable($table)
 	{
 
@@ -796,6 +807,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	    array	$keys 			Tableau des champs cles noms => valeur
 	 *	@return	    int						<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
 	{
 		// FIXME: $fulltext_keys parameter is unused
@@ -869,6 +881,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	    string	$table 			Name of table
 	 *	@return	    int						<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDropTable($table)
 	{
 		$sql = "DROP TABLE ".$table;
@@ -886,6 +899,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	string		$field	Optionnel : Name of field if we want description of field
 	 *	@return	false|resource|true	Resource
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDescTable($table,$field="")
 	{
 		$sql="DESC ".$table." ".$field;
@@ -904,6 +918,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	string	$field_position 	Optionnel ex.: "after champtruc"
 	 *	@return	int							<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLAddField($table,$field_name,$field_desc,$field_position="")
 	{
 		// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@@ -939,6 +954,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	string	$field_desc 		Array with description of field format
 	 *	@return	int							<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLUpdateField($table,$field_name,$field_desc)
 	{
 		$sql = "ALTER TABLE ".$table;
@@ -961,6 +977,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	string	$field_name 	Name of field to drop
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDropField($table,$field_name)
 	{
 		$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@@ -982,6 +999,7 @@ class DoliDBMssql extends DoliDB
 	 *	@param	string	$dolibarr_main_db_name		Database name where user must be granted
 	 *	@return	int									<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
 	{
 	    $sql = "CREATE LOGIN ".$this->EscapeFieldName($dolibarr_main_db_user)." WITH PASSWORD='$dolibarr_main_db_pass'";
@@ -1138,6 +1156,7 @@ class DoliDBMssql extends DoliDB
 	 * @param      string $fieldname   Field's name to escape
 	 * @return     string              field's name escaped
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function EscapeFieldName($fieldname)
     {
 	    return "[".$fieldname."]";
@@ -1151,6 +1170,7 @@ class DoliDBMssql extends DoliDB
 	 * @param      mixed   $fields     String for one field or array of string for multiple field
 	 * @return false|object
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function GetFieldInformation($table,$fields)
     {
 	    $sql="SELECT * from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$this->escape($table)."' AND COLUMN_NAME";

+ 18 - 1
htdocs/core/db/mysqli.class.php

@@ -173,6 +173,7 @@ class DoliDBMysqli extends DoliDB
 	 *	@param	    string	$database	Name of database
 	 *	@return	    boolean  		    true if OK, false if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_db($database)
     {
         dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
@@ -291,6 +292,7 @@ class DoliDBMysqli extends DoliDB
      *	@param	mysqli_result	$resultset	Curseur de la requete voulue
      *	@return	object|null					Object result line or null if KO or end of cursor
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function fetch_object($resultset)
     {
         // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -305,6 +307,7 @@ class DoliDBMysqli extends DoliDB
      *	@param	mysqli_result	$resultset	Resultset of request
      *	@return	array|null					Array or null if KO or end of cursor
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function fetch_array($resultset)
     {
         // If resultset not provided, we take the last used by connexion
@@ -318,6 +321,7 @@ class DoliDBMysqli extends DoliDB
      *	@param	mysqli_result	$resultset	Resultset of request
      *	@return	array|null|0				Array or null if KO or end of cursor or 0 if resultset is bool
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function fetch_row($resultset)
     {
         // If resultset not provided, we take the last used by connexion
@@ -340,6 +344,7 @@ class DoliDBMysqli extends DoliDB
      *	@return	int				Nb of lines
      *	@see    affected_rows
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function num_rows($resultset)
     {
         // If resultset not provided, we take the last used by connexion
@@ -354,6 +359,7 @@ class DoliDBMysqli extends DoliDB
      *	@return int							Nombre de lignes
      *	@see    num_rows
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function affected_rows($resultset)
     {
         // If resultset not provided, we take the last used by connexion
@@ -463,6 +469,7 @@ class DoliDBMysqli extends DoliDB
 	 * @param	string	$fieldid	Field name
 	 * @return  int|string			Id of row
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function last_insert_id($tab,$fieldid='rowid')
     {
         return $this->db->insert_id;
@@ -543,6 +550,7 @@ class DoliDBMysqli extends DoliDB
 	 *
 	 * @return	        string      Id connexion
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLGetConnectId()
     {
         $resql=$this->query('SELECT CONNECTION_ID()');
@@ -565,6 +573,7 @@ class DoliDBMysqli extends DoliDB
 	 * 	@param	string	$owner			Username of database owner
 	 * 	@return	bool|mysqli_result		resource defined if OK, null if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLCreateDb($database,$charset='',$collation='',$owner='')
     {
         if (empty($charset))   $charset=$this->forcecharset;
@@ -593,6 +602,7 @@ class DoliDBMysqli extends DoliDB
 	 *  @param	string		$table		Nmae of table filter ('xxx%')
 	 *  @return	array					List of tables in an array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLListTables($database, $table='')
     {
         $listtables=array();
@@ -618,6 +628,7 @@ class DoliDBMysqli extends DoliDB
 	 *	@param	string	$table		Name of table
 	 *	@return	array				Tableau des informations des champs de la table
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLInfoTable($table)
     {
         $infotables=array();
@@ -648,6 +659,7 @@ class DoliDBMysqli extends DoliDB
 	 *	@param	    array	$keys 			Tableau des champs cles noms => valeur
 	 *	@return	    int						<0 if KO, >=0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
     {
 	    // FIXME: $fulltext_keys parameter is unused
@@ -724,6 +736,7 @@ class DoliDBMysqli extends DoliDB
      *	@param	    string	$table 			Name of table
      *	@return	    int						<0 if KO, >=0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLDropTable($table)
     {
     	$sql = "DROP TABLE ".$table;
@@ -741,6 +754,7 @@ class DoliDBMysqli extends DoliDB
 	 *	@param	string		$field	Optionnel : Name of field if we want description of field
 	 *	@return	bool|mysqli_result	Resultset x (x->Field, x->Type, ...)
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLDescTable($table,$field="")
     {
         $sql="DESC ".$table." ".$field;
@@ -759,6 +773,7 @@ class DoliDBMysqli extends DoliDB
 	 *	@param	string	$field_position 	Optionnel ex.: "after champtruc"
 	 *	@return	int							<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLAddField($table,$field_name,$field_desc,$field_position="")
     {
         // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@@ -808,6 +823,7 @@ class DoliDBMysqli extends DoliDB
 	 *	@param	string	$field_desc 		Array with description of field format
 	 *	@return	int							<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLUpdateField($table,$field_name,$field_desc)
     {
         $sql = "ALTER TABLE ".$table;
@@ -852,6 +868,7 @@ class DoliDBMysqli extends DoliDB
 	 *	@param	string	$field_name 	Name of field to drop
 	 *	@return	int						<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLDropField($table,$field_name)
     {
         $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@@ -873,6 +890,7 @@ class DoliDBMysqli extends DoliDB
 	 *	@param	string	$dolibarr_main_db_name		Database name where user must be granted
 	 *	@return	int									<0 if KO, >=0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
     {
         $sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."'";
@@ -1082,4 +1100,3 @@ class DoliDBMysqli extends DoliDB
         return $result;
     }
 }
-

+ 18 - 0
htdocs/core/db/pgsql.class.php

@@ -367,6 +367,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	    string	$database	Name of database
 	 *	@return	    bool				true if OK, false if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function select_db($database)
 	{
 		if ($database == $this->database_name) return true;
@@ -546,6 +547,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	resource	$resultset  Curseur de la requete voulue
 	 *	@return	false|object			Object result line or false if KO or end of cursor
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_object($resultset)
 	{
         // If resultset not provided, we take the last used by connexion
@@ -559,6 +561,7 @@ class DoliDBPgsql extends DoliDB
      *	@param	resource	$resultset  Resultset of request
      *	@return	false|array				Array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_array($resultset)
 	{
         // If resultset not provided, we take the last used by connexion
@@ -572,6 +575,7 @@ class DoliDBPgsql extends DoliDB
      *	@param	resource	$resultset  Resultset of request
      *	@return	false|array				Array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function fetch_row($resultset)
 	{
 		// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -586,6 +590,7 @@ class DoliDBPgsql extends DoliDB
      *	@return int		    			Nb of lines, -1 on error
      *	@see    affected_rows
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function num_rows($resultset)
 	{
         // If resultset not provided, we take the last used by connexion
@@ -600,6 +605,7 @@ class DoliDBPgsql extends DoliDB
 	 * @return  int		    			Nb of lines
 	 * @see 	num_rows
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function affected_rows($resultset)
 	{
         // If resultset not provided, we take the last used by connexion
@@ -761,6 +767,7 @@ class DoliDBPgsql extends DoliDB
 	 * @param	string	$fieldid	Field name
 	 * @return  string     			Id of row
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function last_insert_id($tab,$fieldid='rowid')
 	{
 		//$result = pg_query($this->db,"SELECT MAX(".$fieldid.") FROM ".$tab);
@@ -824,6 +831,7 @@ class DoliDBPgsql extends DoliDB
 	 *
 	 * @return	        string      Id connexion
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLGetConnectId()
 	{
 		return '?';
@@ -842,6 +850,7 @@ class DoliDBPgsql extends DoliDB
 	 * 	@param	string	$owner			Username of database owner
 	 * 	@return	false|resource				resource defined if OK, null if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateDb($database,$charset='',$collation='',$owner='')
 	{
 	    if (empty($charset))   $charset=$this->forcecharset;
@@ -863,6 +872,7 @@ class DoliDBPgsql extends DoliDB
 	 *  @param	string		$table		Name of table filter ('xxx%')
 	 *  @return	array					List of tables in an array
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLListTables($database, $table='')
 	{
 		$listtables=array();
@@ -887,6 +897,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@return	array				Tableau des informations des champs de la table
 	 *
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLInfoTable($table)
 	{
 		$infotables=array();
@@ -932,6 +943,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	    array	$keys 			Tableau des champs cles noms => valeur
 	 *	@return	    int						<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
 	{
 		// FIXME: $fulltext_keys parameter is unused
@@ -1005,6 +1017,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	    string	$table 			Name of table
 	 *	@return	    int						<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDropTable($table)
 	{
 		$sql = "DROP TABLE ".$table;
@@ -1024,6 +1037,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	string	$dolibarr_main_db_name		Database name where user must be granted
 	 *	@return	int									<0 if KO, >=0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
 	{
 		// Note: using ' on user does not works with pgsql
@@ -1046,6 +1060,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	string		$field	Optionnel : Name of field if we want description of field
 	 *	@return	false|resource		Resultset x (x->attname)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDescTable($table,$field="")
 	{
 		$sql ="SELECT attname FROM pg_attribute, pg_type WHERE typname = '".$table."' AND attrelid = typrelid";
@@ -1066,6 +1081,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	string	$field_position 	Optionnel ex.: "after champtruc"
 	 *	@return	int							<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLAddField($table,$field_name,$field_desc,$field_position="")
 	{
 		// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@@ -1104,6 +1120,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	string	$field_desc 		Array with description of field format
 	 *	@return	int							<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLUpdateField($table,$field_name,$field_desc)
 	{
 		$sql = "ALTER TABLE ".$table;
@@ -1146,6 +1163,7 @@ class DoliDBPgsql extends DoliDB
 	 *	@param	string	$field_name 	Name of field to drop
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function DDLDropField($table,$field_name)
 	{
 		$sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name;

+ 22 - 0
htdocs/core/db/sqlite3.class.php

@@ -302,6 +302,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *	@param	    string	$database	Name of database
 	 *	@return	    boolean  		    true if OK, false if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function select_db($database)
     {
         dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
@@ -496,6 +497,7 @@ class DoliDBSqlite3 extends DoliDB
      *	@param	SQLite3Result	$resultset  Curseur de la requete voulue
      *	@return	false|object				Object result line or false if KO or end of cursor
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function fetch_object($resultset)
     {
         // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -515,6 +517,7 @@ class DoliDBSqlite3 extends DoliDB
      *	@param	SQLite3Result	$resultset  Resultset of request
      *	@return	false|array					Array or false if KO or end of cursor
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function fetch_array($resultset)
     {
         // If resultset not provided, we take the last used by connexion
@@ -530,6 +533,7 @@ class DoliDBSqlite3 extends DoliDB
      *	@param	SQLite3Result	$resultset  Resultset of request
      *	@return	false|array					Array or false if KO or end of cursor
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function fetch_row($resultset)
     {
         // If resultset not provided, we take the last used by connexion
@@ -552,6 +556,7 @@ class DoliDBSqlite3 extends DoliDB
      *	@return int		    			Nb of lines
      *	@see    affected_rows
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function num_rows($resultset)
     {
 	    // FIXME: SQLite3Result does not have a queryString member
@@ -571,6 +576,7 @@ class DoliDBSqlite3 extends DoliDB
      *	@return int		    			Nb of lines
      *	@see    affected_rows
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function affected_rows($resultset)
     {
 	    // FIXME: SQLite3Result does not have a queryString member
@@ -699,6 +705,7 @@ class DoliDBSqlite3 extends DoliDB
 	 * @param	string	$fieldid	Field name
 	 * @return  int     			Id of row
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function last_insert_id($tab,$fieldid='rowid')
     {
         return $this->db->lastInsertRowId();
@@ -778,6 +785,7 @@ class DoliDBSqlite3 extends DoliDB
      *
 	 * @return	        string      Id connexion
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLGetConnectId()
     {
         return '?';
@@ -795,6 +803,7 @@ class DoliDBSqlite3 extends DoliDB
 	 * 	@param	string	$owner			Username of database owner
 	 * 	@return	SQLite3Result   		resource defined if OK, null if KO
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLCreateDb($database,$charset='',$collation='',$owner='')
     {
         if (empty($charset))   $charset=$this->forcecharset;
@@ -823,6 +832,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *  @param	string		$table		Name of table filter ('xxx%')
 	 *  @return	array					List of tables in an array
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLListTables($database, $table='')
     {
         $listtables=array();
@@ -849,6 +859,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *	@return	array				Tableau des informations des champs de la table
 	 *	TODO modify for sqlite
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLInfoTable($table)
     {
         $infotables=array();
@@ -879,6 +890,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *	@param	    array	$keys 			Tableau des champs cles noms => valeur
 	 *	@return	    int						<0 if KO, >=0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
     {
 	    // FIXME: $fulltext_keys parameter is unused
@@ -951,6 +963,7 @@ class DoliDBSqlite3 extends DoliDB
      *	@param	    string	$table 			Name of table
      *	@return	    int						<0 if KO, >=0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLDropTable($table)
     {
     	$sql = "DROP TABLE ".$table;
@@ -968,6 +981,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *	@param	string		$field	Optionnel : Name of field if we want description of field
 	 *	@return	SQLite3Result		Resource
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLDescTable($table,$field="")
     {
         $sql="DESC ".$table." ".$field;
@@ -986,6 +1000,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *	@param	string	$field_position 	Optionnel ex.: "after champtruc"
 	 *	@return	int							<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLAddField($table,$field_name,$field_desc,$field_position="")
     {
         // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@@ -1028,6 +1043,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *	@param	string	$field_desc 		Array with description of field format
 	 *	@return	int							<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLUpdateField($table,$field_name,$field_desc)
     {
         $sql = "ALTER TABLE ".$table;
@@ -1049,6 +1065,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *	@param	string	$field_name 	Name of field to drop
 	 *	@return	int						<0 if KO, >0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLDropField($table,$field_name)
     {
         $sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@@ -1071,6 +1088,7 @@ class DoliDBSqlite3 extends DoliDB
 	 *	@param	string	$dolibarr_main_db_name		Database name where user must be granted
 	 *	@return	int									<0 if KO, >=0 if OK
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
     {
         $sql = "INSERT INTO user ";
@@ -1302,6 +1320,7 @@ class DoliDBSqlite3 extends DoliDB
      * @param	int     $day 		Day
      * @return int Formatted date
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
     private static function calc_daynr($year, $month, $day)
     {
         $y = $year;
@@ -1323,6 +1342,7 @@ class DoliDBSqlite3 extends DoliDB
      * @param bool	$sunday_first_day_of_week		???
      * @return int
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
     private static function calc_weekday($daynr, $sunday_first_day_of_week)
     {
       $ret = floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7);
@@ -1335,6 +1355,7 @@ class DoliDBSqlite3 extends DoliDB
      * @param 	string	$year		Year
      * @return	int					Nb of days in year
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
     private static function calc_days_in_year($year)
     {
       return (($year & 3) == 0 && ($year%100 || ($year%400 == 0 && $year)) ? 366 : 365);
@@ -1350,6 +1371,7 @@ class DoliDBSqlite3 extends DoliDB
 	 * @param 	string	$calc_year			???
 	 * @return	string						???
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
     private static function calc_week($year, $month, $day, $week_behaviour, &$calc_year)
     {
         $daynr=self::calc_daynr($year,$month,$day);

+ 18 - 0
htdocs/core/modules/DolibarrModules.class.php

@@ -1008,6 +1008,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 * @param   string  $reldir Relative directory where to scan files
 	 * @return  int             <=0 if KO, >0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _load_tables($reldir)
 	{
 		global $conf;
@@ -1124,6 +1125,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int             Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_boxes($option='')
 	{
 		require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
@@ -1221,6 +1223,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_boxes()
 	{
 		global $conf;
@@ -1296,6 +1299,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int             Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_cronjobs()
 	{
 		require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
@@ -1409,6 +1413,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_cronjobs()
 	{
 		global $conf;
@@ -1438,6 +1443,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_tabs()
 	{
 		global $conf;
@@ -1463,6 +1469,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return int  Error count (0 if ok)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_tabs()
 	{
 		global $conf;
@@ -1530,6 +1537,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_const()
 	{
 		global $conf;
@@ -1599,6 +1607,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int <0 if KO, 0 if OK
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_const()
 	{
 		global $conf;
@@ -1637,6 +1646,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 * @param   int	$notrigger			1=Does not execute triggers, 0= execute triggers
 	 * @return  int                     Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_permissions($reinitadminperms=0, $force_entity=null, $notrigger=0)
 	{
 		global $conf,$user;
@@ -1789,6 +1799,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int                     Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_permissions()
 	{
 		global $conf;
@@ -1814,6 +1825,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int     Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_menus()
 	{
 		global $user;
@@ -1923,6 +1935,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_menus()
 	{
 		global $conf;
@@ -1952,6 +1965,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function create_dirs()
 	{
 		global $langs, $conf;
@@ -2013,6 +2027,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int             Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_dirs($name,$dir)
 	{
 		global $conf;
@@ -2054,6 +2069,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_dirs()
 	{
 		global $conf;
@@ -2079,6 +2095,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function insert_module_parts()
 	{
 		global $conf;
@@ -2157,6 +2174,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
 	 *
 	 * @return  int Error count (0 if OK)
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function delete_module_parts()
 	{
 		global $conf;

+ 2 - 0
htdocs/core/modules/action/modules_action.php

@@ -40,6 +40,7 @@ abstract class ModeleAction 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)
     {
         global $conf;
@@ -65,6 +66,7 @@ abstract class ModeleAction extends CommonDocGenerator
  *  @param  int			$hideref        Hide ref
  *  @return int         				0 if KO, 1 if OK
  */
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 function action_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
 {
 	global $conf,$langs,$user;

+ 1 - 1
htdocs/core/modules/action/rapport.pdf.php

@@ -100,6 +100,7 @@ class CommActionRapport
      *      @param  Translate	$outputlangs    Lang object for output language
      *      @return int             			1=OK, 0=KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function write_file($socid = 0, $catid = 0, $outputlangs='')
 	{
 		global $user,$conf,$langs,$hookmanager;
@@ -350,4 +351,3 @@ class CommActionRapport
 		return $y;
 	}
 }
-

+ 9 - 9
htdocs/core/modules/bank/doc/pdf_ban.modules.php

@@ -37,7 +37,7 @@ class pdf_ban extends ModeleBankAccountDoc
 {
 	var $emetteur;	// Objet societe qui emet
 	var $version = 'development';
-	
+
 	/**
 	 *	Constructor
 	 *
@@ -55,7 +55,7 @@ class pdf_ban extends ModeleBankAccountDoc
 		$this->db = $db;
 		$this->name = "ban";
 		$this->description = $langs->trans("DocumentModelBan").' (Volunteer wanted to finish)';
-		
+
 		// Dimension page pour format A4
 		$this->type = 'pdf';
 		$formatarray=pdf_getFormat();
@@ -92,6 +92,7 @@ class pdf_ban extends ModeleBankAccountDoc
 	 *	@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)
 	{
 		global $conf, $hookmanager, $langs, $user;
@@ -99,7 +100,7 @@ class pdf_ban extends ModeleBankAccountDoc
 		if (! is_object($outputlangs)) $outputlangs=$langs;
 		// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
 		if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-        
+
 		// Load traductions files requiredby by page
 		$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
 
@@ -119,7 +120,7 @@ class pdf_ban extends ModeleBankAccountDoc
 		        $dir = $conf->bank->dir_output . "/" . $objectref;
 		        $file = $dir . "/" . $objectref . ".pdf";
 		    }
-		    
+
 			if (! file_exists($dir))
 			{
 				if (dol_mkdir($dir) < 0)
@@ -208,9 +209,9 @@ class pdf_ban extends ModeleBankAccountDoc
 
 				$pdf->SetXY($this->marge_gauche, $curY);
 				$pdf->MultiCell(200, 3, $outputlangs->trans("BAN").' : '.$object->account_number, 0, 'L');
-				
-				
-				
+
+
+
 				// Show square
 				if ($pagenb == 1)
 				{
@@ -248,7 +249,7 @@ class pdf_ban extends ModeleBankAccountDoc
 				@chmod($file, octdec($conf->global->MAIN_UMASK));
 
 				$this->result = array('fullpath'=>$file);
-				
+
 				return 1;   // Pas d'erreur
 			}
 			else
@@ -384,4 +385,3 @@ class pdf_ban extends ModeleBankAccountDoc
 		//return pdf_pagefoot($pdf,$outputlangs,'BANK_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
 	}
 }
-

+ 50 - 48
htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php

@@ -37,7 +37,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 {
 	var $emetteur;	// Objet societe qui emet
 	var $version = 'dolibarr';
-	
+
 	/**
 	 *	Constructor
 	 *
@@ -46,7 +46,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 	function __construct($db)
 	{
 		global $conf,$langs,$mysoc;
-		
+
 		// Translations
 		$langs->loadLangs(array("main", "bank", "withdrawals", "companies"));
 
@@ -95,6 +95,7 @@ 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;
@@ -102,10 +103,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 		if (! is_object($outputlangs)) $outputlangs=$langs;
 		// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
 		if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-		
+
 		// Translations
 		$outputlangs->loadLangs(array("main", "dict", "withdrawals", "companies", "projects", "bills"));
-		
+
 		if (! empty($conf->bank->dir_output))
 		{
 			//$nblignes = count($object->lines);  // This is set later with array of tasks
@@ -124,7 +125,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 		        else $dir = $conf->bank->dir_output . "/" . $objectref;
 		        $file = $dir . "/" . $langs->transnoentitiesnoconv("SepaMandateShort").' '.$objectref . "-".dol_sanitizeFileName($object->rum).".pdf";
 		    }
-		    
+
 			if (! file_exists($dir))
 			{
 				if (dol_mkdir($dir) < 0)
@@ -212,55 +213,55 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 				$nexY = $tab_top + 7;
 
 				$posY = $curY;
-				
+
 				$pdf->SetFont('','', $default_font_size);
-				
+
 				$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
 				$posY+=2;
-				
+
 				$pdf->SetXY($this->marge_gauche, $posY);
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("RUMLong").' ('.$outputlangs->transnoentitiesnoconv("RUM").')'.' : '.$object->rum, 0, 'L');
-				
+
 				$posY=$pdf->GetY();
 				$posY+=2;
 				$pdf->SetXY($this->marge_gauche, $posY);
 				$ics='';
 				if (! empty($conf->global->PRELEVEMENT_ICS)) $ics=$conf->global->PRELEVEMENT_ICS;
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").')'.' : '.$ics, 0, 'L');
-				
+
 				$posY=$pdf->GetY();
 				$posY+=1;
 				$pdf->SetXY($this->marge_gauche, $posY);
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorName").' : '.$mysoc->name, 0, 'L');
-				
+
 				$posY=$pdf->GetY();
 				$posY+=1;
 				$pdf->SetXY($this->marge_gauche, $posY);
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("Address").' : ', 0, 'L');
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $mysoc->getFullAddress(), 0, 'L');
-				
+
 				$posY=$pdf->GetY();
 				$posY+=3;
-				
+
 				$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
-				
+
 				$pdf->SetFont('','', $default_font_size - 1);
-				
+
 				$posY+=8;
 				$pdf->SetXY($this->marge_gauche, $posY);
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 8, $outputlangs->transnoentitiesnoconv("SEPALegalText", $mysoc->name, $mysoc->name), 0, 'L');
-				
+
 				// Your data form
 				$posY=$pdf->GetY();
 				$posY+=8;
 				$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
 				$posY+=2;
-				
+
 				$pdf->SetFont('','', $default_font_size);
-				
+
 				$pdf->SetXY($this->marge_gauche, $posY);
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFillForm"), 0, 'C');
-				
+
 				$thirdparty=new Societe($this->db);
 				if ($object->socid > 0) $thirdparty->fetch($object->socid);
 
@@ -275,7 +276,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourName").' * : ', 0, 'L');
 				$pdf->SetXY(80, $posY);
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $sepaname, 0, 'L');
-				
+
 			    $address = '______________________________________________';
 				if ($thirdparty->id > 0)
 				{
@@ -293,7 +294,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
     				$pdf->SetXY(80, $posY);
     				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $address, 0, 'L');
 				}
-				
+
 				$ban = '__________________________________________________';
 				if (! empty($object->iban)) $ban = $object->iban;
 				$posY=$pdf->GetY();
@@ -302,7 +303,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourBAN").' * : ', 0, 'L');
 				$pdf->SetXY(80, $posY);
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $ban, 0, 'L');
-				
+
 				$bic = '__________________________________________________';
 				if (! empty($object->bic)) $bic = $object->bic;
 				$posY=$pdf->GetY();
@@ -311,8 +312,8 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourBIC").' * : ', 0, 'L');
 				$pdf->SetXY(80, $posY);
 				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $bic, 0, 'L');
-				
-				
+
+
 				$posY=$pdf->GetY();
 				$posY+=1;
 				$pdf->SetXY($this->marge_gauche, $posY);
@@ -338,13 +339,13 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 				    $txt = '('.$langs->transnoentitiesnoconv("PleaseCheckOne").')';
     				$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
 				}
-				
+
 				$posY=$pdf->GetY();
 				$posY+=3;
 				$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
 				$posY+=3;
-				
-				
+
+
 				// Show square
 				if ($pagenb == 1)
 				{
@@ -362,10 +363,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 				var_dump($heightforfreetext);
 				var_dump($heightforfooter);
 				var_dump($bottomlasttab);*/
-				
+
 				// Affiche zone infos
 				$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
-				
+
 				/*
 				 * Pied de page
 				 */
@@ -391,7 +392,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 				@chmod($file, octdec($conf->global->MAIN_UMASK));
 
 				$this->result = array('fullpath'=>$file);
-				
+
 				return 1;   // Pas d'erreur
 			}
 			else
@@ -425,7 +426,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
         $default_font_size = pdf_getPDFFontSize($outputlangs);
 	}
 
-	
+
 	/**
 	 *   Show miscellaneous information (payment mode, payment term, ...)
 	 *
@@ -435,32 +436,33 @@ 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;
-	
+
 	    $default_font_size = pdf_getPDFFontSize($outputlangs);
-	
+
 	    $diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?1:$conf->global->PDF_DIFFSIZE_TITLE);
 
 	    $posy+=$this->_signature_area($pdf, $object, $posy, $outputlangs);
-   
+
 	    $pdf->SetXY($this->marge_gauche, $posy);
 	    $pdf->SetFont('','', $default_font_size);
 	    $pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("PleaseReturnMandate", $mysoc->email).':', 0, 'L', 0);
 	    $posy=$pdf->GetY()+2;
-	     
+
 	    $pdf->SetXY($this->marge_gauche, $posy);
 	    $pdf->SetFont('','', $default_font_size - $diffsizetitle);
 	    $pdf->MultiCell(100, 6, $mysoc->name, 0, 'L', 0);
 		$pdf->MultiCell(100, 6, $outputlangs->convToOutputCharset($mysoc->getFullAddress()), 0, 'L', 0);
 		$posy=$pdf->GetY()+2;
-		
+
 	    return $posy;
 	}
-	
-	
-	
+
+
+
 	/**
 	 *	Show area for the customer to sign
 	 *
@@ -470,21 +472,22 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 	 *	@param	Translate	$outputlangs	Objet langs
 	 *	@return int							Position pour suite
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function _signature_area(&$pdf, $object, $posy, $outputlangs)
 	{
 	    $default_font_size = pdf_getPDFFontSize($outputlangs);
 	    $tab_top = $posy + 4;
 	    $tab_hl = 4;
-	
+
 	    $posx = $this->marge_gauche;
 	    $pdf->SetXY($posx, $tab_top + 0);
-	    
+
 	    $pdf->SetFont('','', $default_font_size - 2);
-	    
+
 	    $pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("DateOfSignature"), 0, 'L', 0);
 	    $pdf->MultiCell(100, 3, ' ');
 	    $pdf->MultiCell(100, 3, '______________________', 0, 'L', 0);
-	    
+
 	    $posx = 120;
 	    $largcol = ($this->page_largeur - $this->marge_droite - $posx);
 	    $useborder=0;
@@ -493,14 +496,14 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 	    $pdf->SetFillColor(255,255,255);
 	    $pdf->SetXY($posx, $tab_top + 0);
 	    $pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentitiesnoconv("Signature"), 0, 'L', 1);
-	
+
 	    $pdf->SetXY($posx, $tab_top + $tab_hl);
 	    $pdf->MultiCell($largcol, $tab_hl*3, '', 1, 'R');
-	
+
 	    return ($tab_hl*7);
 	}
-	
-	
+
+
 	/**
 	 *  Show top header of page.
 	 *
@@ -609,4 +612,3 @@ class pdf_sepamandate extends ModeleBankAccountDoc
 		return pdf_pagefoot($pdf,$outputlangs,'PAYMENTORDER_FREE_TEXT',null,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
 	}
 }
-

+ 7 - 7
htdocs/core/modules/bank/modules_bank.php

@@ -43,18 +43,18 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator
      *  @param	DoliDB	$db     			Database handler
      *  @param  integer	$maxfilenamelength  Max length of value to show
      *  @return	array						List of templates
-	 */
-	static function liste_modeles($db,$maxfilenamelength=0)
+     */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+	static function liste_modeles($db, $maxfilenamelength=0)
 	{
 		global $conf;
 
-		$type='bankaccount';
-		$liste=array();
+		$type = 'bankaccount';
+		$list = array();
 
 		include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
-		$liste=getListOfModels($db,$type,$maxfilenamelength);
+		$list = getListOfModels($db, $type, $maxfilenamelength);
 
-		return $liste;
+		return $list;
 	}
 }
-

+ 7 - 6
htdocs/core/modules/barcode/mod_barcode_product_standard.php

@@ -224,13 +224,14 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
 
 
 	/**
-	 *		Return if a code is used (by other element)
+	 *	Return if a code is used (by other element)
 	 *
-	 *		@param	DoliDB		$db			Handler acces base
-	 *		@param	string		$code		Code to check
-	 *		@param	Product		$product	Objet product
-	 *		@return	int						0 if available, <0 if KO
+	 *	@param	DoliDB		$db			Handler acces base
+	 *	@param	string		$code		Code to check
+	 *	@param	Product		$product	Objet product
+	 *	@return	int						0 if available, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function verif_dispo($db, $code, $product)
 	{
 		$sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."product";
@@ -262,6 +263,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
      *  @param	string	$typefortest	Type of barcode (ISBN, EAN, ...)
 	 *	@return	int						0 if OK, <0 if KO
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function verif_syntax($codefortest, $typefortest)
 	{
 		global $conf;
@@ -300,4 +302,3 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
 		return $result;
 	}
 }
-

+ 3 - 0
htdocs/core/modules/cheque/doc/pdf_blochet.class.php

@@ -83,6 +83,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
 	 *	@param	Translate		$outputlangs	Lang output object
      *	@return	int     						1=ok, 0=ko
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function write_file($object, $_dir, $number, $outputlangs)
 	{
 		global $user,$conf,$langs,$hookmanager;
@@ -206,6 +207,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
 	 *	@param	Translate	$outputlangs	Object language for output
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function Header(&$pdf, $page, $pages, $outputlangs)
 	{
 		global $langs;
@@ -312,6 +314,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
 	 *	@param	Translate	$outputlangs	Object lang
 	 *	@return	void
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function Body(&$pdf, $pagenb, $pages, $outputlangs)
 	{
 		// x=10 - Num

+ 1 - 0
htdocs/core/modules/cheque/mod_chequereceipt_mint.php

@@ -145,6 +145,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
 	 * 	@param	string		$objforref	Object for number to search
 	 *  @return string      			Next free value
 	 */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
 	function chequereceipt_get_num($objsoc,$objforref)
 	{
 		return $this->getNextValue($objsoc,$objforref);

+ 1 - 1
htdocs/core/modules/cheque/mod_chequereceipt_thyme.php

@@ -131,9 +131,9 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
 	 * 	@param	string		$objforref	Object for number to search
 	 *  @return string      			Next free value
      */
+    // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
     function chequereceipt_get_num($objsoc,$objforref)
     {
         return $this->getNextValue($objsoc,$objforref);
     }
 }
-

+ 1 - 0
htdocs/core/modules/cheque/modules_chequereceipts.php

@@ -134,6 +134,7 @@ 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)
 	{
 		global $conf;

部分文件因为文件数量过多而无法显示