Преглед на файлове

Squiz.Functions.FunctionDeclarationArgumentSpacing

Frédéric FRANCE преди 6 години
родител
ревизия
f0cdf300d1
променени са 100 файла, в които са добавени 506 реда и са изтрити 497 реда
  1. 10 1
      dev/setup/codesniffer/ruleset.xml
  2. 4 4
      dev/translation/autotranslator.class.php
  3. 1 1
      htdocs/accountancy/admin/accountmodel.php
  4. 1 1
      htdocs/accountancy/admin/categories_list.php
  5. 1 1
      htdocs/accountancy/admin/journals_list.php
  6. 7 7
      htdocs/accountancy/class/accountancycategory.class.php
  7. 3 3
      htdocs/accountancy/class/accountingaccount.class.php
  8. 3 3
      htdocs/accountancy/class/accountingjournal.class.php
  9. 11 11
      htdocs/accountancy/class/bookkeeping.class.php
  10. 16 16
      htdocs/adherents/class/adherent.class.php
  11. 5 5
      htdocs/adherents/class/adherent_type.class.php
  12. 3 3
      htdocs/adherents/class/adherentstats.class.php
  13. 1 1
      htdocs/adherents/class/api_members.class.php
  14. 4 4
      htdocs/adherents/class/subscription.class.php
  15. 1 1
      htdocs/admin/dict.php
  16. 1 1
      htdocs/admin/dolistore/class/dolistore.class.php
  17. 1 1
      htdocs/admin/mails_templates.php
  18. 1 1
      htdocs/admin/website.php
  19. 2 2
      htdocs/api/class/api.class.php
  20. 1 1
      htdocs/api/class/api_login.class.php
  21. 3 3
      htdocs/asset/class/asset.class.php
  22. 4 4
      htdocs/asset/class/asset_type.class.php
  23. 1 1
      htdocs/blockedlog/class/authority.class.php
  24. 6 6
      htdocs/blockedlog/class/blockedlog.class.php
  25. 16 16
      htdocs/cashdesk/class/Facturation.class.php
  26. 13 13
      htdocs/categories/class/categorie.class.php
  27. 9 9
      htdocs/comm/action/class/actioncomm.class.php
  28. 2 2
      htdocs/comm/action/class/actioncommreminder.class.php
  29. 2 2
      htdocs/comm/action/class/cactioncomm.class.php
  30. 1 1
      htdocs/comm/action/index.php
  31. 1 1
      htdocs/comm/action/pertype.php
  32. 1 1
      htdocs/comm/action/peruser.php
  33. 7 7
      htdocs/comm/mailing/class/advtargetemailing.class.php
  34. 7 7
      htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
  35. 5 5
      htdocs/comm/mailing/class/mailing.class.php
  36. 2 2
      htdocs/comm/propal/class/api_proposals.class.php
  37. 34 34
      htdocs/comm/propal/class/propal.class.php
  38. 2 2
      htdocs/comm/propal/class/propalestats.class.php
  39. 3 3
      htdocs/commande/class/api_orders.class.php
  40. 31 31
      htdocs/commande/class/commande.class.php
  41. 3 3
      htdocs/commande/class/commandestats.class.php
  42. 15 15
      htdocs/compta/bank/class/account.class.php
  43. 1 1
      htdocs/compta/bank/class/api_bankaccounts.class.php
  44. 5 5
      htdocs/compta/bank/class/paymentvarious.class.php
  45. 3 3
      htdocs/compta/cashcontrol/class/cashcontrol.class.php
  46. 5 5
      htdocs/compta/deplacement/class/deplacement.class.php
  47. 3 3
      htdocs/compta/deplacement/class/deplacementstats.class.php
  48. 7 7
      htdocs/compta/facture/class/api_invoices.class.php
  49. 12 12
      htdocs/compta/facture/class/facture-rec.class.php
  50. 28 28
      htdocs/compta/facture/class/facture.class.php
  51. 3 3
      htdocs/compta/facture/class/facturestats.class.php
  52. 3 3
      htdocs/compta/facture/class/paymentterm.class.php
  53. 4 4
      htdocs/compta/localtax/class/localtax.class.php
  54. 7 7
      htdocs/compta/paiement/cheque/class/remisecheque.class.php
  55. 13 13
      htdocs/compta/paiement/class/paiement.class.php
  56. 12 12
      htdocs/compta/prelevement/class/bonprelevement.class.php
  57. 2 2
      htdocs/compta/prelevement/class/ligneprelevement.class.php
  58. 2 2
      htdocs/compta/prelevement/class/rejetprelevement.class.php
  59. 5 5
      htdocs/compta/salaries/class/paymentsalary.class.php
  60. 3 3
      htdocs/compta/salaries/class/salariesstats.class.php
  61. 3 3
      htdocs/compta/sociales/class/cchargesociales.class.php
  62. 4 4
      htdocs/compta/sociales/class/chargesociales.class.php
  63. 7 7
      htdocs/compta/sociales/class/paymentsocialcontribution.class.php
  64. 5 5
      htdocs/compta/tva/class/tva.class.php
  65. 7 7
      htdocs/contact/class/contact.class.php
  66. 2 2
      htdocs/contrat/class/api_contracts.class.php
  67. 22 22
      htdocs/contrat/class/contrat.class.php
  68. 1 1
      htdocs/core/ajax/ajaxdirtree.php
  69. 3 3
      htdocs/core/boxes/box_actions.php
  70. 3 3
      htdocs/core/boxes/box_activity.php
  71. 3 3
      htdocs/core/boxes/box_bookmarks.php
  72. 3 3
      htdocs/core/boxes/box_clients.php
  73. 3 3
      htdocs/core/boxes/box_commandes.php
  74. 3 3
      htdocs/core/boxes/box_comptes.php
  75. 3 3
      htdocs/core/boxes/box_contacts.php
  76. 3 3
      htdocs/core/boxes/box_contracts.php
  77. 3 3
      htdocs/core/boxes/box_external_rss.php
  78. 3 3
      htdocs/core/boxes/box_factures.php
  79. 3 3
      htdocs/core/boxes/box_factures_fourn.php
  80. 3 3
      htdocs/core/boxes/box_factures_fourn_imp.php
  81. 3 3
      htdocs/core/boxes/box_factures_imp.php
  82. 3 3
      htdocs/core/boxes/box_ficheinter.php
  83. 3 3
      htdocs/core/boxes/box_fournisseurs.php
  84. 3 3
      htdocs/core/boxes/box_goodcustomers.php
  85. 3 3
      htdocs/core/boxes/box_graph_invoices_permonth.php
  86. 3 3
      htdocs/core/boxes/box_graph_invoices_supplier_permonth.php
  87. 3 3
      htdocs/core/boxes/box_graph_orders_permonth.php
  88. 3 3
      htdocs/core/boxes/box_graph_orders_supplier_permonth.php
  89. 3 3
      htdocs/core/boxes/box_graph_product_distribution.php
  90. 3 3
      htdocs/core/boxes/box_graph_propales_permonth.php
  91. 1 1
      htdocs/core/boxes/box_last_modified_ticket.php
  92. 1 1
      htdocs/core/boxes/box_last_ticket.php
  93. 3 3
      htdocs/core/boxes/box_lastlogin.php
  94. 3 3
      htdocs/core/boxes/box_members.php
  95. 3 3
      htdocs/core/boxes/box_produits.php
  96. 3 3
      htdocs/core/boxes/box_produits_alerte_stock.php
  97. 3 3
      htdocs/core/boxes/box_project.php
  98. 3 3
      htdocs/core/boxes/box_propales.php
  99. 3 3
      htdocs/core/boxes/box_prospect.php
  100. 3 3
      htdocs/core/boxes/box_services_contracts.php

+ 10 - 1
dev/setup/codesniffer/ruleset.xml

@@ -65,7 +65,7 @@
     <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed">
 		<severity>0</severity>
     </rule>
-    
+
     <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
 
     <!--
@@ -191,6 +191,15 @@
     <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
 
     <rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
+    <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
+        <properties>
+            <property name="equalsSpacing" value="1"/>
+        </properties>
+    </rule>
+    <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
+        <severity>0</severity>
+    </rule>
+
 
     <!-- Rules from PEAR Standard -->
 

+ 4 - 4
dev/translation/autotranslator.class.php

@@ -50,7 +50,7 @@ class autoTranslator
      * @param   string $_apikey         Api key
      * @return void
      */
-    function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey)
+    function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey)
     {
 
 		// Set enviorment variables
@@ -156,7 +156,7 @@ class autoTranslator
 	 * @param 	string	$my_destlang		Target language code
 	 * @return	void
 	 */
-	private function updateTranslationFile($destPath,$file,$my_destlang)
+	private function updateTranslationFile($destPath, $file, $my_destlang)
 	{
 		$this->_time_end = date('Y-m-d H:i:s');
 
@@ -183,7 +183,7 @@ class autoTranslator
 	 * @param 	string	$my_destlang		Target language code
 	 * @return	void
 	 */
-	private function createTranslationFile($path,$my_destlang)
+	private function createTranslationFile($path, $my_destlang)
 	{
 		$fp = fopen($path, 'w+');
 		fwrite($fp, "/*\n");
@@ -205,7 +205,7 @@ class autoTranslator
 	 * @param	string	$my_destlang	Language code (ie: fr_FR)
 	 * @return	int						0=Nothing translated, 1=Record translated
 	 */
-	private function translateFileLine($content,$file,$key,$value,$my_destlang)
+	private function translateFileLine($content, $file, $key, $value, $my_destlang)
 	{
 
 		//print "key    =".$key."\n";

+ 1 - 1
htdocs/accountancy/admin/accountmodel.php

@@ -811,7 +811,7 @@ $db->close();
  *  @param		string	$context		'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
  *	@return		void
  */
-function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
+function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = '')
 {
 	global $conf,$langs,$db;
 	global $form;

+ 1 - 1
htdocs/accountancy/admin/categories_list.php

@@ -813,7 +813,7 @@ $db->close();
  *  @param		string	$context		'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
  *	@return		void
  */
-function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='')
+function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $context = '')
 {
 	global $conf,$langs,$db;
 	global $form, $mysoc;

+ 1 - 1
htdocs/accountancy/admin/journals_list.php

@@ -696,7 +696,7 @@ $db->close();
  *  @param		string	$context		'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
  *	@return		void
  */
-function fieldListJournal($fieldlist, $obj='', $tabname='', $context='')
+function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '')
 {
 	global $conf,$langs,$db;
 	global $form, $mysoc;

+ 7 - 7
htdocs/accountancy/class/accountancycategory.class.php

@@ -142,7 +142,7 @@ class AccountancyCategory // extends CommonObject
 	 *  @param      int		$notrigger   0=launch triggers after, 1=disable triggers
 	 *  @return     int      		   	 <0 if KO, Id of created object if OK
 	 */
-	function create($user, $notrigger=0)
+	function create($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -239,7 +239,7 @@ class AccountancyCategory // extends CommonObject
 	 *  @param		string	$label	Label
 	 *  @return     int          	<0 if KO, >0 if OK
 	 */
-	function fetch($id, $code='', $label='')
+	function fetch($id, $code = '', $label = '')
 	{
 		$sql = "SELECT";
 		$sql.= " t.rowid,";
@@ -299,7 +299,7 @@ class AccountancyCategory // extends CommonObject
 	 *  @param      int		$notrigger	 0=launch triggers after, 1=disable triggers
 	 *  @return     int     		   	 <0 if KO, >0 if OK
 	 */
-	function update($user=null, $notrigger=0)
+	function update($user = null, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -379,7 +379,7 @@ class AccountancyCategory // extends CommonObject
 	 *  @param	int		$notrigger	 0=launch triggers after, 1=disable triggers
 	 *  @return	int					 <0 if KO, >0 if OK
 	 */
-	function delete($user, $notrigger=0)
+	function delete($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -726,7 +726,7 @@ class AccountancyCategory // extends CommonObject
 	 * @param int       $year 				Specifig year - Can be empty
 	 * @return integer 						<0 if KO, >= 0 if OK
 	 */
-	public function getSumDebitCredit($cpt, $date_start, $date_end, $sens, $thirdparty_code='nofilter', $month=0, $year=0)
+	public function getSumDebitCredit($cpt, $date_start, $date_end, $sens, $thirdparty_code = 'nofilter', $month = 0, $year = 0)
 	{
 		global $conf;
 
@@ -796,7 +796,7 @@ class AccountancyCategory // extends CommonObject
 	 * @param	int			$categorytype		-1=All, 0=Only non computed groups, 1=Only computed groups
 	 * @return	array|int						Array of groups or -1 if error
 	 */
-	public function getCats($categorytype=-1)
+	public function getCats($categorytype = -1)
 	{
 		global $conf, $mysoc;
 
@@ -853,7 +853,7 @@ class AccountancyCategory // extends CommonObject
 	 * @param 	string 		$predefinedgroupwhere 	Sql criteria filter to select accounting accounts
 	 * @return 	array|int							Array of accounting accounts or -1 if error
 	 */
-	public function getCptsCat($cat_id, $predefinedgroupwhere='')
+	public function getCptsCat($cat_id, $predefinedgroupwhere = '')
 	{
 		global $conf, $mysoc;
 		$sql = '';

+ 3 - 3
htdocs/accountancy/class/accountingaccount.class.php

@@ -466,7 +466,7 @@ class AccountingAccount extends CommonObject
      * @param	int     $save_lastsearch_value		-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 * @return  string	String with URL
 	 */
-	function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0, $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1)
 	{
 		global $langs, $conf, $user;
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
@@ -632,7 +632,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->status,$mode);
 	}
@@ -645,7 +645,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
 	 */
-	function LibStatut($statut,$mode=0)
+	function LibStatut($statut, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;

+ 3 - 3
htdocs/accountancy/class/accountingjournal.class.php

@@ -213,7 +213,7 @@ class AccountingJournal extends CommonObject
 	 * @param	int  	$notooltip		1=Disable tooltip
 	 * @return	string	String with URL
 	 */
-	function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle='',$notooltip=0)
+	function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0)
 	{
 		global $langs, $conf, $user;
 
@@ -270,7 +270,7 @@ class AccountingJournal extends CommonObject
 	 *  @param	int		$mode		  0=libelle long, 1=libelle court
 	 *  @return	string 				   Label of type
 	 */
-	function getLibType($mode=0)
+	function getLibType($mode = 0)
 	{
 		return $this->LibType($this->nature,$mode);
 	}
@@ -283,7 +283,7 @@ class AccountingJournal extends CommonObject
 	 *  @param  int		$mode		  	0=libelle long, 1=libelle court
 	 *  @return string 				   	Label of type
 	 */
-	function LibType($nature,$mode=0)
+	function LibType($nature, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;

+ 11 - 11
htdocs/accountancy/class/bookkeeping.class.php

@@ -411,7 +411,7 @@ class BookKeeping extends CommonObject
 	 *  @param  int     $save_lastsearch_value    	-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return	string								String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
 	{
 		global $db, $conf, $langs;
 		global $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -470,7 +470,7 @@ class BookKeeping extends CommonObject
 	 * @param  string  $mode 	   Mode
 	 * @return int				 <0 if KO, Id of created object if OK
 	 */
-    public function createStd(User $user, $notrigger = false, $mode='')
+    public function createStd(User $user, $notrigger = false, $mode = '')
     {
 		global $conf;
 
@@ -641,7 +641,7 @@ class BookKeeping extends CommonObject
 	 *
 	 * @return int <0 if KO, 0 if not found, >0 if OK
 	 */
-    public function fetch($id, $ref = null, $mode='')
+    public function fetch($id, $ref = null, $mode = '')
     {
 		global $conf;
 
@@ -1090,7 +1090,7 @@ class BookKeeping extends CommonObject
 	 * @param  string  $mode       Mode
 	 * @return int                 <0 if KO, >0 if OK
 	 */
-    public function update(User $user, $notrigger = false, $mode='')
+    public function update(User $user, $notrigger = false, $mode = '')
     {
 		$error = 0;
 
@@ -1225,7 +1225,7 @@ class BookKeeping extends CommonObject
 	 * @param  string  $mode           Mode
 	 * @return number                  <0 if KO, >0 if OK
 	 */
-	public function updateByMvt($piece_num='', $field='', $value='', $mode='')
+	public function updateByMvt($piece_num = '', $field = '', $value = '', $mode = '')
 	{
 		$error=0;
 
@@ -1260,7 +1260,7 @@ class BookKeeping extends CommonObject
 	 * @param string $mode Mode
 	 * @return int <0 if KO, >0 if OK
 	 */
-    public function delete(User $user, $notrigger = false, $mode='')
+    public function delete(User $user, $notrigger = false, $mode = '')
     {
 		dol_syslog(__METHOD__, LOG_DEBUG);
 
@@ -1338,7 +1338,7 @@ class BookKeeping extends CommonObject
 	 * @param  string $mode 		Mode
 	 * @return int					<0 if KO, >0 if OK
 	 */
-    function deleteByYearAndJournal($delyear='', $journal='', $mode='')
+    function deleteByYearAndJournal($delyear = '', $journal = '', $mode = '')
     {
 		global $conf;
 
@@ -1500,7 +1500,7 @@ class BookKeeping extends CommonObject
 	 * @param string $mode Mode
 	 * @return int <0 if KO, >0 if OK
 	 */
-    public function fetchPerMvt($piecenum, $mode='')
+    public function fetchPerMvt($piecenum, $mode = '')
     {
 		global $conf;
 
@@ -1536,7 +1536,7 @@ class BookKeeping extends CommonObject
 	 * @param	string	$mode	Mode
 	 * @return	string			Next numero to use
 	 */
-	public function getNextNumMvt($mode='')
+	public function getNextNumMvt($mode = '')
 	{
 		global $conf;
 
@@ -1565,7 +1565,7 @@ class BookKeeping extends CommonObject
 	 * @param  string  $mode       Mode
 	 * @return int                 <0 if KO, >0 if OK
 	 */
-    function fetchAllPerMvt($piecenum, $mode='')
+    function fetchAllPerMvt($piecenum, $mode = '')
     {
 		global $conf;
 
@@ -1687,7 +1687,7 @@ class BookKeeping extends CommonObject
 	 * @param  string   $piece_num      Piece num
 	 * @return int                      int <0 if KO, >0 if OK
 	 */
-	public function transformTransaction($direction=0,$piece_num='')
+	public function transformTransaction($direction = 0, $piece_num = '')
 	{
 		$error = 0;
 

+ 16 - 16
htdocs/adherents/class/adherent.class.php

@@ -246,7 +246,7 @@ class Adherent extends CommonObject
 	 *  @param	string	$moreinheader		Add more html headers
 	 *  @return	int							<0 if KO, >0 if OK
 	 */
-	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='', $moreinheader='')
+	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 = '', $moreinheader = '')
 	{
         // phpcs:enable
 		global $conf,$langs;
@@ -358,7 +358,7 @@ class Adherent extends CommonObject
 	 *	@param	string		$morphy		Nature of the adherent (physical or moral)
 	 *	@return	string					Label
 	 */
-	function getmorphylib($morphy='')
+	function getmorphylib($morphy = '')
 	{
 		global $langs;
 		if (! $morphy) { $morphy=$this->morphy; }
@@ -374,7 +374,7 @@ class Adherent extends CommonObject
 	 *	@param  int		$notrigger		1 ne declenche pas les triggers, 0 sinon
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
-	function create($user,$notrigger=0)
+	function create($user, $notrigger = 0)
 	{
 		global $conf,$langs;
 
@@ -500,7 +500,7 @@ class Adherent extends CommonObject
 	 * 	@param	string	$action				Current action for hookmanager
 	 * 	@return	int							<0 if KO, >0 if OK
 	 */
-	function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdparty=0,$action='update')
+	function update($user, $notrigger = 0, $nosyncuser = 0, $nosyncuserpass = 0, $nosyncthirdparty = 0, $action = 'update')
 	{
 		global $conf, $langs, $hookmanager;
 
@@ -817,7 +817,7 @@ class Adherent extends CommonObject
 	 *	@param	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *  @return	int					<0 if KO, 0=nothing to do, >0 if OK
 	 */
-	function delete($rowid, $user, $notrigger=0)
+	function delete($rowid, $user, $notrigger = 0)
 	{
 		global $conf, $langs;
 
@@ -927,7 +927,7 @@ class Adherent extends CommonObject
 	 *    @param	int		$nosyncuser		Do not synchronize linked user
 	 *    @return   string           		If OK return clear password, 0 if no change, < 0 if error
 	 */
-	function setPassword($user, $password='', $isencrypted=0, $notrigger=0, $nosyncuser=0)
+	function setPassword($user, $password = '', $isencrypted = 0, $notrigger = 0, $nosyncuser = 0)
 	{
 		global $conf, $langs;
 
@@ -1147,7 +1147,7 @@ class Adherent extends CommonObject
 	 *	@param	string	$lastname	Lastname
 	 *	@return	void
 	 */
-	function fetch_name($firstname,$lastname)
+	function fetch_name($firstname, $lastname)
 	{
         // phpcs:enable
 		global $conf;
@@ -1183,7 +1183,7 @@ class Adherent extends CommonObject
 	 *  @param	bool	$fetch_subscriptions	To load member subscriptions
 	 *	@return int								>0 if OK, 0 if not found, <0 if KO
 	 */
-	function fetch($rowid,$ref='',$fk_soc='',$ref_ext='',$fetch_optionals=true,$fetch_subscriptions=true)
+	function fetch($rowid, $ref = '', $fk_soc = '', $ref_ext = '', $fetch_optionals = true, $fetch_subscriptions = true)
 	{
 		global $langs;
 
@@ -1400,7 +1400,7 @@ class Adherent extends CommonObject
 	 *	@param	int     	$datesubend			Date end subscription
 	 *	@return int         					rowid of record added, <0 if KO
 	 */
-	function subscription($date, $amount, $accountid=0, $operation='', $label='', $num_chq='', $emetteur_nom='', $emetteur_banque='', $datesubend=0)
+	function subscription($date, $amount, $accountid = 0, $operation = '', $label = '', $num_chq = '', $emetteur_nom = '', $emetteur_banque = '', $datesubend = 0)
 	{
 		global $conf,$langs,$user;
 
@@ -1486,7 +1486,7 @@ class Adherent extends CommonObject
 	 *  @param	string		$autocreatethirdparty	Auto create new thirdparty if member not yet linked to a thirdparty and we request an option that generate invoice.
 	 *	@return int									<0 if KO, >0 if OK
 	 */
-	function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom='', $emetteur_banque='', $autocreatethirdparty=0)
+	function subscriptionComplementaryActions($subscriptionid, $option, $accountid, $datesubscription, $paymentdate, $operation, $label, $amount, $num_chq, $emetteur_nom = '', $emetteur_banque = '', $autocreatethirdparty = 0)
 	{
 		global $conf, $langs, $user, $mysoc;
 
@@ -2018,7 +2018,7 @@ class Adherent extends CommonObject
 	 *  @param  int     $save_lastsearch_value    	-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return	string								Chaine avec URL
 	 */
-	function getNomUrl($withpictoimg=0, $maxlen=0, $option='card', $mode='', $morecss='', $save_lastsearch_value=-1)
+	function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1)
 	{
 		global $conf, $langs;
 
@@ -2109,7 +2109,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode);
 	}
@@ -2124,7 +2124,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
 	 */
-	function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
+	function LibStatut($statut, $need_subscription, $date_end_subscription, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;
@@ -2307,7 +2307,7 @@ class Adherent extends CommonObject
          *  @param   null|array  $moreparams     Array to provide more information
 	 *  @return     int         				0 if KO, 1 if OK
 	 */
-	public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
+	public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
 	{
 		global $conf,$langs;
 
@@ -2400,7 +2400,7 @@ class Adherent extends CommonObject
 	 *								2=Return key only (uid=qqq)
 	 *	@return	string				DN
 	 */
-	function _load_ldap_dn($info,$mode=0)
+	function _load_ldap_dn($info, $mode = 0)
 	{
         // phpcs:enable
 		global $conf;
@@ -2694,7 +2694,7 @@ class Adherent extends CommonObject
 	 * @param	string		$daysbeforeendlist		Nb of days before end of subscription (negative number = after subscription). Can be a list of delay, separated by a semicolon, for example '10;5;0;-5'
 	 * @return	int									0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
 	 */
-	public function sendReminderForExpiredSubscription($daysbeforeendlist='10')
+	public function sendReminderForExpiredSubscription($daysbeforeendlist = '10')
 	{
 		global $conf, $langs, $mysoc, $user;
 

+ 5 - 5
htdocs/adherents/class/adherent_type.class.php

@@ -103,7 +103,7 @@ class AdherentType extends CommonObject
 	 *  @param	int		$notrigger		1=do not execute triggers, 0 otherwise
 	 *  @return	int						>0 if OK, < 0 if KO
 	 */
-	function create($user,$notrigger=0)
+	function create($user, $notrigger = 0)
 	{
 		global $conf;
 
@@ -170,7 +170,7 @@ class AdherentType extends CommonObject
 	 *  @param	int		$notrigger		1=do not execute triggers, 0 otherwise
 	 *  @return	int						>0 if OK, < 0 if KO
 	 */
-	function update($user,$notrigger=0)
+	function update($user, $notrigger = 0)
 	{
 		global $conf, $hookmanager;
 
@@ -356,7 +356,7 @@ class AdherentType extends CommonObject
 	 *  									2=Return array of members id only
 	 * 	@return	mixed						Array of members or -1 on error
 	 */
-	function listMembersForMemberType($excludefilter='', $mode=0)
+	function listMembersForMemberType($excludefilter = '', $mode = 0)
 	{
 		global $conf, $user;
 
@@ -411,7 +411,7 @@ class AdherentType extends CommonObject
      *  	@param		int  	$notooltip		1=Disable tooltip
      *		@return		string					String with URL
      */
-    function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0)
+    function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0)
     {
         global $langs;
 
@@ -449,7 +449,7 @@ class AdherentType extends CommonObject
 	 *									2=Return key only (uid=qqq)
 	 *	@return		string				DN
 	 */
-	function _load_ldap_dn($info,$mode=0)
+	function _load_ldap_dn($info, $mode = 0)
 	{
         // phpcs:enable
 		global $conf;

+ 3 - 3
htdocs/adherents/class/adherentstats.class.php

@@ -52,7 +52,7 @@ class AdherentStats extends Stats
 	 * 	@param 		int			$socid	   	Id third party
      * 	@param   	int			$userid    	Id user for filter
 	 */
-	function __construct($db, $socid=0, $userid=0)
+	function __construct($db, $socid = 0, $userid = 0)
 	{
 		global $user, $conf;
 
@@ -85,7 +85,7 @@ class AdherentStats extends Stats
      *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
      * @return	array				Array of nb each month
 	 */
-	function getNbByMonth($year, $format=0)
+	function getNbByMonth($year, $format = 0)
 	{
 		global $user;
 
@@ -126,7 +126,7 @@ class AdherentStats extends Stats
      * @param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
      * @return	array				Array of amount each month
 	 */
-	function getAmountByMonth($year, $format=0)
+	function getAmountByMonth($year, $format = 0)
 	{
 		global $user;
 

+ 1 - 1
htdocs/adherents/class/api_members.class.php

@@ -361,7 +361,7 @@ class Members extends DolibarrApi
      *
      * @url POST {id}/subscriptions
      */
-    function createSubscription($id, $start_date, $end_date, $amount, $label='')
+    function createSubscription($id, $start_date, $end_date, $amount, $label = '')
     {
         if(! DolibarrApiAccess::$user->rights->adherent->cotisation->creer) {
             throw new RestException(401);

+ 4 - 4
htdocs/adherents/class/subscription.class.php

@@ -207,7 +207,7 @@ $type=$this->fk_type;
 	 *	@param 	int		$notrigger		0=Disable triggers
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
-	function update($user, $notrigger=0)
+	function update($user, $notrigger = 0)
 	{
 		$error = 0;
 
@@ -263,7 +263,7 @@ $type=$this->fk_type;
 	 *	@param 	bool 	$notrigger  false=launch triggers after, true=disable triggers
 	 *	@return	int					<0 if KO, 0 if not found, >0 if OK
 	 */
-	function delete($user, $notrigger=false)
+	function delete($user, $notrigger = false)
 	{
 		$error = 0;
 
@@ -356,7 +356,7 @@ $type=$this->fk_type;
 	 *  @param  int     $save_lastsearch_value    	-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return	string								Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0, $notooltip=0, $option='', $morecss='', $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $notooltip = 0, $option = '', $morecss = '', $save_lastsearch_value = -1)
 	{
 		global $langs;
 
@@ -395,7 +395,7 @@ $type=$this->fk_type;
 	 *  @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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 	    return '';
 	}

+ 1 - 1
htdocs/admin/dict.php

@@ -1755,7 +1755,7 @@ $db->close();
  *  @param		string		$context		'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
  *	@return		string						'' or value of entity into table
  */
-function fieldList($fieldlist, $obj='', $tabname='', $context='')
+function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
 {
 	global $conf,$langs,$db,$mysoc;
 	global $form;

+ 1 - 1
htdocs/admin/dolistore/class/dolistore.class.php

@@ -54,7 +54,7 @@ class Dolistore
 	 *
 	 * @param	boolean		$debug		Enable debug of request on screen
 	 */
-	function __construct($debug=false)
+	function __construct($debug = false)
 	{
 		global $conf, $langs;
 

+ 1 - 1
htdocs/admin/mails_templates.php

@@ -947,7 +947,7 @@ $db->close();
  *  @param		string	$context		'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
  *	@return		void
  */
-function fieldList($fieldlist, $obj='', $tabname='', $context='')
+function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
 {
 	global $conf, $langs, $user, $db;
 	global $form;

+ 1 - 1
htdocs/admin/website.php

@@ -659,7 +659,7 @@ $db->close();
  *  @param		string	$context		'add'=Output field for the "add form", 'edit'=Output field for the "edit form", 'hide'=Output field for the "add form" but we dont want it to be rendered
  *	@return		void
  */
-function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='')
+function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '')
 {
 	global $conf,$langs,$db;
 	global $form;

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

@@ -46,7 +46,7 @@ class DolibarrApi
      * @param   string  $cachedir       Cache dir
      * @param   boolean $refreshCache   Update cache
      */
-    function __construct($db, $cachedir='', $refreshCache=false)
+    function __construct($db, $cachedir = '', $refreshCache = false)
     {
         global $conf, $dolibarr_main_url_root;
 
@@ -222,7 +222,7 @@ class DolibarrApi
      * @return bool
 	 * @throws RestException
 	 */
-    static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid')
+    static function _checkAccessToResource($resource, $resource_id = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid')
     {
 
 		// Features/modules to check

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

@@ -55,7 +55,7 @@ class Login
 	 * @url GET /
 	 * @url POST /
 	 */
-    public function index($login, $password, $entity='', $reset=0)
+    public function index($login, $password, $entity = '', $reset = 0)
     {
 
 	    global $conf, $dolibarr_main_authentication, $dolibarr_auto_user;

+ 3 - 3
htdocs/asset/class/asset.class.php

@@ -312,7 +312,7 @@ class Asset extends CommonObject
 	 *  @param  int     $save_lastsearch_value      -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *  @return string                              String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
 	{
 		global $db, $conf, $langs;
 		global $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -369,7 +369,7 @@ class Asset 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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->status,$mode);
 	}
@@ -382,7 +382,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
 	 */
-	static function LibStatut($status,$mode=0)
+	static function LibStatut($status, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;

+ 4 - 4
htdocs/asset/class/asset_type.class.php

@@ -89,7 +89,7 @@ class AssetType extends CommonObject
 	 *  @param	int			$notrigger		1=do not execute triggers, 0 otherwise
 	 *  @return	int							>0 if OK, < 0 if KO
 	 */
-	function create($user,$notrigger=0)
+	function create($user, $notrigger = 0)
 	{
 		global $conf;
 
@@ -166,7 +166,7 @@ class AssetType extends CommonObject
 	 *  @param	int			$notrigger		1=do not execute triggers, 0 otherwise
 	 *  @return	int							>0 if OK, < 0 if KO
 	 */
-	function update($user,$notrigger=0)
+	function update($user, $notrigger = 0)
 	{
 		global $conf, $hookmanager;
 
@@ -350,7 +350,7 @@ class AssetType extends CommonObject
 	 *  									2=Return array of asset id only
 	 * 	@return	mixed						Array of asset or -1 on error
 	 */
-	function listAssetForAssetType($excludefilter='', $mode=0)
+	function listAssetForAssetType($excludefilter = '', $mode = 0)
 	{
 		global $conf, $user;
 
@@ -405,7 +405,7 @@ class AssetType extends CommonObject
 	 *  	@param		int  	$notooltip		1=Disable tooltip
 	 *		@return		string					String with URL
 	 */
-	function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0)
+	function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0)
 	{
 		global $langs;
 

+ 1 - 1
htdocs/blockedlog/class/authority.class.php

@@ -142,7 +142,7 @@ class BlockedLogAuthority
 	 *	@param      string		$signature		Signature of object to load
 	 *	@return     int         				>0 if OK, <0 if KO, 0 if not found
 	 */
-    public function fetch($id, $signature='')
+    public function fetch($id, $signature = '')
     {
 
 		global $langs;

+ 6 - 6
htdocs/blockedlog/class/blockedlog.class.php

@@ -725,7 +725,7 @@ class BlockedLog
 	 * @param	string	$mode	0=unserialize, 1=json_decode
 	 * @return 	string			Value unserialized
 	 */
-	public function dolDecodeBlockedData($data, $mode=0)
+	public function dolDecodeBlockedData($data, $mode = 0)
 	{
 		try
 		{
@@ -763,7 +763,7 @@ class BlockedLog
 	 *  @param	int		$forcesignature		Force signature (for example '0000000000' when we disabled the module)
 	 *	@return	int							<0 if KO, >0 if OK
 	 */
-    public function create($user, $forcesignature='')
+    public function create($user, $forcesignature = '')
     {
 
 		global $conf,$langs,$hookmanager;
@@ -878,7 +878,7 @@ class BlockedLog
 	 *	@param	string		$previoushash		If previous signature hash is known, we can provide it to avoid to make a search of it in database.
 	 *	@return	boolean							True if OK, False if KO
 	 */
-	public function checkSignature($previoushash='')
+	public function checkSignature($previoushash = '')
 	{
 		if (empty($previoushash))
 		{
@@ -921,7 +921,7 @@ class BlockedLog
 	 *	@param int	$beforeid		ID of a record
 	 *  @return	string				Hash of previous record (if beforeid is defined) or hash of last record (if beforeid is 0)
 	 */
-	 public function getPreviousHash($withlock=0, $beforeid=0)
+	 public function getPreviousHash($withlock = 0, $beforeid = 0)
 	 {
 		global $conf;
 
@@ -972,7 +972,7 @@ class BlockedLog
 	 *  @param	string	$search_code	search code
 	 *	@return	array|int				Array of object log or <0 if error
 	 */
-	public function getLog($element, $fk_object, $limit = 0, $sortfield = '', $sortorder = '', $search_fk_user = -1, $search_start = -1, $search_end = -1, $search_ref='', $search_amount='', $search_code='')
+	public function getLog($element, $fk_object, $limit = 0, $sortfield = '', $sortorder = '', $search_fk_user = -1, $search_start = -1, $search_end = -1, $search_ref = '', $search_amount = '', $search_code = '')
 	{
 		global $conf, $cachedlogs;
 
@@ -1070,7 +1070,7 @@ class BlockedLog
 	 * @param	int		$ignoresystem		Ignore system events for the test
      * @return bool
 	 */
-	function alreadyUsed($ignoresystem=0)
+	function alreadyUsed($ignoresystem = 0)
 	{
 		global $conf;
 

+ 16 - 16
htdocs/cashdesk/class/Facturation.class.php

@@ -283,7 +283,7 @@ class Facturation
      * @param	int		$aId	Id
      * @return  id
      */
-    public function id($aId=null)
+    public function id($aId = null)
     {
 
         if ( !$aId )
@@ -308,7 +308,7 @@ class Facturation
      * @param	string	$aRef	Ref
      * @return	string			Ref
      */
-    public function ref($aRef=null)
+    public function ref($aRef = null)
     {
 
         if (is_null($aRef))
@@ -331,7 +331,7 @@ class Facturation
      * @param	int		$aQte		Qty
      * @return	int					Qty
      */
-    public function qte($aQte=null)
+    public function qte($aQte = null)
     {
         if (is_null($aQte))
         {
@@ -354,7 +354,7 @@ class Facturation
      * @param   string	$aStock		Stock
      * @return	string				Stock
      */
-    public function stock($aStock=null)
+    public function stock($aStock = null)
     {
 
         if (is_null($aStock))
@@ -377,7 +377,7 @@ class Facturation
      * @param	string	$aRemisePercent		Discount
      * @return	string						Discount
      */
-    public function remisePercent($aRemisePercent=null)
+    public function remisePercent($aRemisePercent = null)
     {
 
         if (is_null($aRemisePercent))
@@ -400,7 +400,7 @@ class Facturation
      * @param	int		$aMontantRemise		Amount
      * @return	string						Amount
      */
-    public function montantRemise($aMontantRemise=null)
+    public function montantRemise($aMontantRemise = null)
     {
 
         if (is_null($aMontantRemise)) {
@@ -421,7 +421,7 @@ class Facturation
      * @param	int		$aPrix		Price
      * @return	string				Stock
      */
-    public function prix($aPrix=null)
+    public function prix($aPrix = null)
     {
 
         if (is_null($aPrix)) {
@@ -442,7 +442,7 @@ class Facturation
      * @param	int		$aTva		Vat
      * @return	int					Vat
      */
-    public function tva($aTva=null)
+    public function tva($aTva = null)
     {
         if (is_null($aTva)) {
 
@@ -462,7 +462,7 @@ class Facturation
      * @param string	$aNumFacture		Invoice ref
      * @return	string						Invoice ref
      */
-    public function numInvoice($aNumFacture=null)
+    public function numInvoice($aNumFacture = null)
     {
         if (is_null($aNumFacture)) {
 
@@ -482,7 +482,7 @@ class Facturation
      * @param	int		$aModeReglement		Payment mode
      * @return	int							Payment mode
      */
-    public function getSetPaymentMode($aModeReglement=null)
+    public function getSetPaymentMode($aModeReglement = null)
     {
 
         if (is_null($aModeReglement)) {
@@ -503,7 +503,7 @@ class Facturation
      * @param	int		$aMontantEncaisse		Amount
      * @return	int								Amount
      */
-    public function montantEncaisse($aMontantEncaisse=null)
+    public function montantEncaisse($aMontantEncaisse = null)
     {
 
         if (is_null($aMontantEncaisse)) {
@@ -524,7 +524,7 @@ class Facturation
      * @param	int			$aMontantRendu		Amount
      * @return	int								Amount
      */
-    public function montantRendu($aMontantRendu=null)
+    public function montantRendu($aMontantRendu = null)
     {
 
         if (is_null($aMontantRendu)) {
@@ -545,7 +545,7 @@ class Facturation
      * @param	date		$aPaiementLe		Date
      * @return	date							Date
      */
-    public function paiementLe($aPaiementLe=null)
+    public function paiementLe($aPaiementLe = null)
     {
         if (is_null($aPaiementLe)) {
 
@@ -565,7 +565,7 @@ class Facturation
      * @param	int		$aTotalHt		Total amount
      * @return	int						Total amount
      */
-    public function prixTotalHt($aTotalHt=null)
+    public function prixTotalHt($aTotalHt = null)
     {
         if (is_null($aTotalHt)) {
 
@@ -585,7 +585,7 @@ class Facturation
      * @param	int		$aMontantTva	Amount vat
      * @return	int						Amount vat
      */
-    public function montantTva($aMontantTva=null)
+    public function montantTva($aMontantTva = null)
     {
         if (is_null($aMontantTva)) {
 
@@ -605,7 +605,7 @@ class Facturation
      * @param	int		$aTotalTtc		Amount ttc
      * @return	int						Amount ttc
      */
-    public function prixTotalTtc($aTotalTtc=null)
+    public function prixTotalTtc($aTotalTtc = null)
     {
         if (is_null($aTotalTtc))
         {

+ 13 - 13
htdocs/categories/class/categorie.class.php

@@ -234,7 +234,7 @@ class Categorie extends CommonObject
 	 *  @param		string	$type	Type of category ('product', '...') or (0, 1, ...)
 	 * 	@return		int				<0 if KO, >0 if OK
 	 */
-	function fetch($id, $label='', $type=null)
+	function fetch($id, $label = '', $type = null)
 	{
 		global $conf;
 
@@ -501,7 +501,7 @@ class Categorie extends CommonObject
      *	@param	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return	int                 <0 KO >0 OK
 	 */
-	function delete($user, $notrigger=0)
+	function delete($user, $notrigger = 0)
 	{
 		global $conf,$langs;
 
@@ -691,7 +691,7 @@ class Categorie extends CommonObject
 	 *
 	 * @return  int          1 if OK, -1 if KO
 	 */
-	function del_type($obj,$type)
+	function del_type($obj, $type)
 	{
         // phpcs:enable
 		global $user,$langs,$conf;
@@ -749,7 +749,7 @@ class Categorie extends CommonObject
 	 * @return  array|int              -1 if KO, array of instance of object if OK
 	 * @see containsObject
 	 */
-	function getObjectsInCateg($type, $onlyids=0)
+	function getObjectsInCateg($type, $onlyids = 0)
 	{
 		$objs = array();
 
@@ -821,7 +821,7 @@ class Categorie extends CommonObject
 	 * @param	int		$page		Page number
 	 * @return	array|int			Array of categories, 0 if no cat, -1 on error
 	 */
-	function getListForItem($id, $type='customer', $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0)
+	function getListForItem($id, $type = 'customer', $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0)
 	{
 		global $conf;
 
@@ -990,7 +990,7 @@ class Categorie extends CommonObject
 	 *
 	 * @return  array|int               Array of categories. this->cats and this->motherof are set, -1 on error
 	 */
-	function get_full_arbo($type, $markafterid=0)
+	function get_full_arbo($type, $markafterid = 0)
 	{
         // phpcs:enable
 	    global $conf, $langs;
@@ -1076,7 +1076,7 @@ class Categorie extends CommonObject
 	 * 	@param		int		$protection		Deep counter to avoid infinite loop
 	 *	@return		void
 	 */
-	function build_path_from_id_categ($id_categ,$protection=1000)
+	function build_path_from_id_categ($id_categ, $protection = 1000)
 	{
         // phpcs:enable
 		dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG);
@@ -1143,7 +1143,7 @@ class Categorie extends CommonObject
 	 *	@param	boolean		$parent		Just parent categories if true
 	 *	@return	array|int				Table of Object Category, -1 on error
 	 */
-	function get_all_categories($type=null, $parent=false)
+	function get_all_categories($type = null, $parent = false)
 	{
         // phpcs:enable
 		if (! is_numeric($type)) $type = $this->MAP_ID[$type];
@@ -1232,7 +1232,7 @@ class Categorie extends CommonObject
 	 *	@param		int		$type		Type of category (0, 1, ...)
 	 *	@return		array
 	 */
-	function get_main_categories($type=null)
+	function get_main_categories($type = null)
 	{
         // phpcs:enable
 		return $this->get_all_categories($type, true);
@@ -1248,7 +1248,7 @@ class Categorie extends CommonObject
 	 * @param   int     $nocolor     0
 	 * @return	array
 	 */
-	function print_all_ways($sep = " &gt;&gt; ", $url='', $nocolor=0)
+	function print_all_ways($sep = " &gt;&gt; ", $url = '', $nocolor = 0)
 	{
         // phpcs:enable
 		$ways = array();
@@ -1376,7 +1376,7 @@ class Categorie extends CommonObject
 	 *                      	    labels, 'id'= Get array of category IDs
 	 * @return  array|int           Array of category objects or < 0 if KO
 	 */
-	function containing($id, $type, $mode='object')
+	function containing($id, $type, $mode = 'object')
 	{
 		$cats = array();
 
@@ -1522,7 +1522,7 @@ class Categorie extends CommonObject
 	 * 	@param		int		$maxlength		Max length of text
 	 *	@return		string					Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0,$option='',$maxlength=0)
+	function getNomUrl($withpicto = 0, $option = '', $maxlength = 0)
 	{
 		global $langs;
 
@@ -1608,7 +1608,7 @@ class Categorie extends CommonObject
 	 *    @param      int		$nbmax      Nombre maximum de photos (0=pas de max)
 	 *    @return     array       			Tableau de photos
 	 */
-	function liste_photos($dir,$nbmax=0)
+	function liste_photos($dir, $nbmax = 0)
 	{
         // phpcs:enable
 		include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';

+ 9 - 9
htdocs/comm/action/class/actioncomm.class.php

@@ -566,7 +566,7 @@ class ActionComm extends CommonObject
      *    @param	string	$ref_ext	Ref ext to get
      *    @return	int					<0 if KO, >0 if OK
      */
-    function fetch($id, $ref='',$ref_ext='')
+    function fetch($id, $ref = '', $ref_ext = '')
     {
         global $langs;
 
@@ -761,7 +761,7 @@ class ActionComm extends CommonObject
      *    @param    int		$notrigger		1 = disable triggers, 0 = enable triggers
      *    @return   int 					<0 if KO, >0 if OK
      */
-    function delete($notrigger=0)
+    function delete($notrigger = 0)
     {
         global $user,$langs,$conf;
 
@@ -838,7 +838,7 @@ class ActionComm extends CommonObject
      *    @param    int		$notrigger		1 = disable triggers, 0 = enable triggers
      *    @return   int     				<0 if KO, >0 if OK
      */
-    function update($user,$notrigger=0)
+    function update($user, $notrigger = 0)
     {
         global $langs,$conf,$hookmanager;
 
@@ -999,7 +999,7 @@ class ActionComm extends CommonObject
      *   @param		string	$limit			Limit number of answers
      *   @return	array or string			Error string if KO, array with actions if OK
      */
-    static function getActions($db, $socid=0, $fk_element=0, $elementtype='', $filter='', $sortfield='a.datep', $sortorder='DESC', $limit=0)
+    static function getActions($db, $socid = 0, $fk_element = 0, $elementtype = '', $filter = '', $sortfield = 'a.datep', $sortorder = 'DESC', $limit = 0)
     {
         global $conf, $langs;
 
@@ -1051,7 +1051,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
      */
-    function load_board($user, $load_state_board=0)
+    function load_board($user, $load_state_board = 0)
     {
         // phpcs:enable
         global $conf, $langs;
@@ -1164,7 +1164,7 @@ class ActionComm extends CommonObject
      *      @param  int		$hidenastatus   1=Show nothing if status is "Not applicable"
      *    	@return string          		String with status
      */
-    function getLibStatut($mode,$hidenastatus=0)
+    function getLibStatut($mode, $hidenastatus = 0)
     {
         return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep);
     }
@@ -1179,7 +1179,7 @@ class ActionComm extends CommonObject
      *      @param  int     $datestart      Date start of event
      *    	@return string		    		Label
      */
-    function LibStatut($percent,$mode,$hidenastatus=0,$datestart='')
+    function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '')
     {
         // phpcs:enable
         global $langs;
@@ -1257,7 +1257,7 @@ class ActionComm extends CommonObject
      *  	@param  int     $save_lastsearch_value  -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
      *		@return	string							Chaine avec URL
      */
-    function getNomUrl($withpicto=0, $maxlength=0, $classname='', $option='', $overwritepicto=0, $notooltip=0, $save_lastsearch_value=-1)
+    function getNomUrl($withpicto = 0, $maxlength = 0, $classname = '', $option = '', $overwritepicto = 0, $notooltip = 0, $save_lastsearch_value = -1)
     {
 		global $conf, $langs, $user, $hookmanager, $action;
 
@@ -1391,7 +1391,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
      */
-    function build_exportfile($format,$type,$cachedelay,$filename,$filters)
+    function build_exportfile($format, $type, $cachedelay, $filename, $filters)
     {
         // phpcs:enable
         global $conf,$langs,$dolibarr_main_url_root,$mysoc;

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

@@ -178,7 +178,7 @@ class ActionCommReminder 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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->status,$mode);
 	}
@@ -191,7 +191,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
 	 */
-	static function LibStatut($status,$mode=0)
+	static function LibStatut($status, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;

+ 2 - 2
htdocs/comm/action/class/cactioncomm.class.php

@@ -130,7 +130,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.
      */
-    function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0)
+    function liste_array($active = '', $idorcode = 'id', $excludetype = '', $onlyautoornot = 0, $morefilter = '', $shortlabel = 0)
     {
         // phpcs:enable
         global $langs,$conf;
@@ -223,7 +223,7 @@ class CActionComm
      *	@param	int		$withpicto		0=No picto, 1=Include picto into link, 2=Picto only
      *  @return string			      	Label of action type
      */
-    function getNomUrl($withpicto=0)
+    function getNomUrl($withpicto = 0)
     {
         global $langs;
 

+ 1 - 1
htdocs/comm/action/index.php

@@ -1277,7 +1277,7 @@ $db->close();
  * @param	string	$nonew			 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button"
  * @return	void
  */
-function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $nonew=0)
+function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $nonew = 0)
 {
     global $user, $conf, $langs;
     global $action, $filter, $filtert, $status, $actioncode, $usergroup;	// Filters used into search form

+ 1 - 1
htdocs/comm/action/pertype.php

@@ -757,7 +757,7 @@ $db->close();
  * @param	bool	$var			true or false for alternat style on tr/td
  * @return	void
  */
-function show_day_events_pertype($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false)
+function show_day_events_pertype($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $showheader = false, $colorsbytype = array(), $var = false)
 {
 	global $db;
 	global $user, $conf, $langs, $hookmanager, $action;

+ 1 - 1
htdocs/comm/action/peruser.php

@@ -905,7 +905,7 @@ $db->close();
  * @param	bool	$var			true or false for alternat style on tr/td
  * @return	void
  */
-function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false)
+function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $showheader = false, $colorsbytype = array(), $var = false)
 {
 	global $db;
 	global $user, $conf, $langs, $hookmanager, $action;

+ 7 - 7
htdocs/comm/mailing/class/advtargetemailing.class.php

@@ -108,7 +108,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 *  @param  int		$notrigger   0=launch triggers after, 1=disable triggers
 	 *  @return int      		   	 <0 if KO, Id of created object if OK
 	 */
-	function create($user, $notrigger=0)
+	function create($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -260,7 +260,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 *  @param	int		$id    Id object
 	 *  @return int          	<0 if KO, >0 if OK
 	 */
-	function fetch_by_mailing($id=0)
+	function fetch_by_mailing($id = 0)
 	{
         // phpcs:enable
 		global $langs;
@@ -327,7 +327,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 *  @param	string	$type_element	Type target
 	 *  @return int          			<0 if KO, >0 if OK
 	 */
-	function fetch_by_element($id=0, $type_element='mailing')
+	function fetch_by_element($id = 0, $type_element = 'mailing')
 	{
         // phpcs:enable
 		global $langs;
@@ -390,7 +390,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 *  @param  int		$notrigger	 0=launch triggers after, 1=disable triggers
 	 *  @return int     		   	 <0 if KO, >0 if OK
 	 */
-	function update($user, $notrigger=0)
+	function update($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -466,7 +466,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 *  @param  int		$notrigger	 0=launch triggers after, 1=disable triggers
 	 *  @return	int					 <0 if KO, >0 if OK
 	 */
-	function delete($user, $notrigger=0)
+	function delete($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -525,7 +525,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 * 	@param		array		$arrayquery		All element to Query
 	 * 	@return		int			<0 if KO, >0 if OK
 	 */
-	function savequery($user,$arrayquery)
+	function savequery($user, $arrayquery)
 	{
 		global $langs,$conf;
 
@@ -946,7 +946,7 @@ class AdvanceTargetingMailing extends CommonObject
 	 *  									For exemple  jean;joe;jim%%;!jimo;!jima%> will target all jean, joe, start with jim but not jimo and not everythnig taht start by jima
 	 * 	@return		string		Sql to use for the where condition
 	 */
-    public function transformToSQL($column_to_test,$criteria)
+    public function transformToSQL($column_to_test, $criteria)
     {
 		$return_sql_criteria = '(';
 

+ 7 - 7
htdocs/comm/mailing/class/html.formadvtargetemailing.class.php

@@ -92,7 +92,7 @@ class FormAdvTargetEmailing extends Form
 	 * @param array $selected_array or Code or Label of preselected country
 	 * @return string HTML string with select
 	 */
-    function multiselectCountry($htmlname = 'country_id', $selected_array=array())
+    function multiselectCountry($htmlname = 'country_id', $selected_array = array())
     {
 		global $conf, $langs;
 
@@ -194,7 +194,7 @@ class FormAdvTargetEmailing extends Form
 	 * @param array $selected_array selected array
 	 * @return string combo list code
 	 */
-    function multiselectselectLanguage($htmlname='', $selected_array=array())
+    function multiselectselectLanguage($htmlname = '', $selected_array = array())
     {
 
 		global $conf,$langs;
@@ -290,7 +290,7 @@ class FormAdvTargetEmailing extends Form
 	 *  @param  array  $selected_array     Array
 	 *  @return	string                     HTML combo
 	 */
-	function multiselectCivility($htmlname='civilite_id',$selected_array = array())
+	function multiselectCivility($htmlname = 'civilite_id', $selected_array = array())
 	{
 		global $conf,$langs,$user;
 		$langs->load("dict");
@@ -356,7 +356,7 @@ class FormAdvTargetEmailing extends Form
 	 * 	@param	array	$selected_array	value selected
 	 *  @return	string HTML combo
 	 */
-	function multiselectCustomerCategories($htmlname='cust_cat',$selected_array = array())
+	function multiselectCustomerCategories($htmlname = 'cust_cat', $selected_array = array())
 	{
 		return $this->multiselectCategories($htmlname,$selected_array,2);
 	}
@@ -368,7 +368,7 @@ class FormAdvTargetEmailing extends Form
 	 * 	@param	array	$selected_array	value selected
 	 *  @return	string HTML combo
 	 */
-	function multiselectContactCategories($htmlname='contact_cat',$selected_array = array())
+	function multiselectContactCategories($htmlname = 'contact_cat', $selected_array = array())
 	{
 		return $this->multiselectCategories($htmlname,$selected_array,4);
 	}
@@ -381,7 +381,7 @@ class FormAdvTargetEmailing extends Form
 	 * 	@param	int		$type			Type
 	 *  @return	string 					HTML combo
 	 */
-	public function multiselectCategories($htmlname='',$selected_array = array(), $type=0)
+	public function multiselectCategories($htmlname = '', $selected_array = array(), $type = 0)
 	{
 		global $conf,$langs,$user;
 		$langs->load("dict");
@@ -427,7 +427,7 @@ class FormAdvTargetEmailing extends Form
 	 * @param	string		$type_element	Type element. Example: 'mailing'
 	 * @return	string 						HTML combo
 	 */
-    public function selectAdvtargetemailingTemplate($htmlname='template_id', $selected=0, $showempty=0, $type_element='mailing')
+    public function selectAdvtargetemailingTemplate($htmlname = 'template_id', $selected = 0, $showempty = 0, $type_element = 'mailing')
     {
 		global $conf, $user, $langs;
 

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

@@ -271,7 +271,7 @@ class Mailing extends CommonObject
 	 *	@param	int		$option2		Not used
 	 *	@return	int						New id of clone
 	 */
-	function createFromClone($fromid,$option1,$option2)
+	function createFromClone($fromid, $option1, $option2)
 	{
 		global $user,$langs;
 
@@ -536,7 +536,7 @@ class Mailing extends CommonObject
 	 *  @param  int     $save_lastsearch_value    	-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return	string								String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
 	{
 		global $db, $conf, $langs, $hookmanager;
 		global $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -607,7 +607,7 @@ class Mailing extends CommonObject
 	 *  @param	int		$mode          	0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
 	 *  @return string        			Label
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -620,7 +620,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
 	 */
-	function LibStatut($statut,$mode=0)
+	function LibStatut($statut, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;
@@ -670,7 +670,7 @@ class Mailing extends CommonObject
 	 *  @param	strin	$desc			Desc error
 	 *  @return string        			Label
 	 */
-	public static function libStatutDest($statut,$mode=0,$desc='')
+	public static function libStatutDest($statut, $mode = 0, $desc = '')
 	{
 		global $langs;
 		$langs->load('mails');

+ 2 - 2
htdocs/comm/propal/class/api_proposals.class.php

@@ -559,7 +559,7 @@ class Proposals extends DolibarrApi
      *
      * @return array
 	 */
-	function validate($id, $notrigger=0)
+	function validate($id, $notrigger = 0)
 	{
 		if(! DolibarrApiAccess::$user->rights->propal->creer) {
 			throw new RestException(401);
@@ -607,7 +607,7 @@ class Proposals extends DolibarrApi
 	 *
 	 * @return  array
 	 */
-	function close($id, $status, $note_private='', $notrigger=0)
+	function close($id, $status, $note_private = '', $notrigger = 0)
 	{
 		if(! DolibarrApiAccess::$user->rights->propal->creer) {
 			throw new RestException(401);

+ 34 - 34
htdocs/comm/propal/class/propal.class.php

@@ -239,7 +239,7 @@ class Propal extends CommonObject
 	 *	@param      int		$socid		Id third party
 	 *	@param      int		$propalid   Id proposal
 	 */
-	function __construct($db, $socid="", $propalid=0)
+	function __construct($db, $socid = "", $propalid = 0)
 	{
 		global $conf,$langs;
 
@@ -267,7 +267,7 @@ class Propal extends CommonObject
 	 *	TODO	Replace calls to this function by generation objet Ligne
 	 *			inserted into table $this->products
 	 */
-	function add_product($idproduct, $qty, $remise_percent=0)
+	function add_product($idproduct, $qty, $remise_percent = 0)
 	{
         // phpcs:enable
 		global $conf, $mysoc;
@@ -434,7 +434,7 @@ class Propal extends CommonObject
      *    	@return    	int         	    			>0 if OK, <0 if KO
      *    	@see       	add_product
      */
-	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $fk_product=0, $remise_percent=0.0, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=0, $pa_ht=0, $label='',$date_start='', $date_end='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0, $pu_ht_devise=0, $fk_remise_except=0)
+	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $info_bits = 0, $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0, $fk_remise_except = 0)
 	{
 		global $mysoc, $conf, $langs;
 
@@ -663,7 +663,7 @@ class Propal extends CommonObject
 	 * 	@param		int			$notrigger			disable line update trigger
 	 *  @return     int     		        		0 if OK, <0 if KO
 	 */
-	function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0, $txlocaltax2=0.0, $desc='', $price_base_type='HT', $info_bits=0, $special_code=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=0, $pa_ht=0, $label='', $type=0, $date_start='', $date_end='', $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0)
+	function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0)
 	{
 		global $mysoc;
 
@@ -869,7 +869,7 @@ class Propal extends CommonObject
 	 * 	@param		int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *  @return     int     			<0 if KO, >=0 if OK
 	 */
-	function create($user, $notrigger=0)
+	function create($user, $notrigger = 0)
 	{
 		global $conf,$hookmanager;
 		$error=0;
@@ -1216,7 +1216,7 @@ class Propal extends CommonObject
 	 *		@param		int				$socid			Id of thirdparty
 	 * 	 	@return		int								New id of clone
 	 */
-	function createFromClone($socid=0)
+	function createFromClone($socid = 0)
 	{
 		global $user,$conf,$hookmanager;
 
@@ -1340,7 +1340,7 @@ class Propal extends CommonObject
 	 *	@param		string		$ref		Ref of proposal
 	 *	@return     int         			>0 if OK, <0 if KO
 	 */
-	function fetch($rowid,$ref='')
+	function fetch($rowid, $ref = '')
 	{
 
 		$sql = "SELECT p.rowid, p.ref, p.entity, p.remise, p.remise_percent, p.remise_absolue, p.fk_soc";
@@ -1504,7 +1504,7 @@ class Propal extends CommonObject
 	 *      @param      int		$notrigger	    0=launch triggers after, 1=disable triggers
 	 *      @return     int      			   	<0 if KO, >0 if OK
 	 */
-	function update(User $user, $notrigger=0)
+	function update(User $user, $notrigger = 0)
 	{
 		global $conf;
 
@@ -1599,7 +1599,7 @@ class Propal extends CommonObject
 	 * @param		int		$only_product	Return only physical products
 	 * @return		int						<0 if KO, >0 if OK
 	 */
-	function fetch_lines($only_product=0)
+	function fetch_lines($only_product = 0)
 	{
         // phpcs:enable
 		$this->lines=array();
@@ -1718,7 +1718,7 @@ class Propal extends CommonObject
 	 *  @param	int		$notrigger	1=Does not execute triggers, 0=execute triggers
 	 *  @return int         		<0 if KO, 0=Nothing done, >=0 if OK
 	 */
-	function valid($user, $notrigger=0)
+	function valid($user, $notrigger = 0)
 	{
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 
@@ -1842,7 +1842,7 @@ class Propal extends CommonObject
 	 *  @param  int			$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *  @return	int         			<0 if KO, >0 if OK
 	 */
-	function set_date($user, $date, $notrigger=0)
+	function set_date($user, $date, $notrigger = 0)
 	{
         // phpcs:enable
 		if (empty($date))
@@ -1911,7 +1911,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         				<0 if KO, >0 if OK
 	 */
-	function set_echeance($user, $date_fin_validite, $notrigger=0)
+	function set_echeance($user, $date_fin_validite, $notrigger = 0)
 	{
         // phpcs:enable
 		if (! empty($user->rights->propal->creer))
@@ -1973,7 +1973,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         				<0 if ko, >0 if ok
 	 */
-	function set_date_livraison($user, $date_livraison, $notrigger=0)
+	function set_date_livraison($user, $date_livraison, $notrigger = 0)
 	{
         // phpcs:enable
 		if (! empty($user->rights->propal->creer))
@@ -2035,7 +2035,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *  @return     int           			<0 if KO, >0 if OK
 	 */
-	function set_availability($user, $id, $notrigger=0)
+	function set_availability($user, $id, $notrigger = 0)
 	{
         // phpcs:enable
 		if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT)
@@ -2106,7 +2106,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *  @return     int           		<0 if KO, >0 if OK
 	 */
-	function set_demand_reason($user, $id, $notrigger=0)
+	function set_demand_reason($user, $id, $notrigger = 0)
 	{
         // phpcs:enable
 		if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT)
@@ -2179,7 +2179,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *  @return     int						<0 if ko, >0 if ok
 	 */
-	function set_ref_client($user, $ref_client, $notrigger=0)
+	function set_ref_client($user, $ref_client, $notrigger = 0)
 	{
         // phpcs:enable
 		if (! empty($user->rights->propal->creer))
@@ -2244,7 +2244,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         		<0 if ko, >0 if ok
 	 */
-	function set_remise_percent($user, $remise, $notrigger=0)
+	function set_remise_percent($user, $remise, $notrigger = 0)
 	{
         // phpcs:enable
 		$remise=trim($remise)?trim($remise):0;
@@ -2311,7 +2311,7 @@ class Propal extends CommonObject
 	 *  @param  	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         		<0 if ko, >0 if ok
 	 */
-	function set_remise_absolue($user, $remise, $notrigger=0)
+	function set_remise_absolue($user, $remise, $notrigger = 0)
 	{
         // phpcs:enable
 		$remise=trim($remise)?trim($remise):0;
@@ -2380,7 +2380,7 @@ class Propal extends CommonObject
 	 *  @param		int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         		<0 if KO, >0 if OK
 	 */
-	function reopen($user, $statut, $note='', $notrigger=0)
+	function reopen($user, $statut, $note = '', $notrigger = 0)
 	{
 
 		$this->statut = $statut;
@@ -2441,7 +2441,7 @@ class Propal extends CommonObject
 	 *  @param		int		$notrigger	1=Does not execute triggers, 0=Execute triggers
 	 *	@return     int         		<0 if KO, >0 if OK
 	 */
-	function cloture($user, $statut, $note="", $notrigger=0)
+	function cloture($user, $statut, $note = "", $notrigger = 0)
 	{
 		global $langs,$conf;
 
@@ -2544,7 +2544,7 @@ class Propal extends CommonObject
 	 *  @param		int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return     int     			<0 si ko, >0 si ok
 	 */
-	function classifyBilled(User $user, $notrigger=0)
+	function classifyBilled(User $user, $notrigger = 0)
 	{
 		$error=0;
 
@@ -2600,7 +2600,7 @@ class Propal extends CommonObject
 	 *  @param		int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int					<0 if KO, >0 if OK
 	 */
-	function set_draft($user, $notrigger=0)
+	function set_draft($user, $notrigger = 0)
 	{
         // phpcs:enable
 		$error=0;
@@ -2665,7 +2665,7 @@ class Propal extends CommonObject
 	 *    @param    string	$sortorder			Sort order
 	 *    @return	int		       				-1 if KO, array with result if OK
 	 */
-	function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC')
+	function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datep', $sortorder = 'DESC')
 	{
         // phpcs:enable
 		global $user;
@@ -2833,7 +2833,7 @@ class Propal extends CommonObject
 	 *	@param	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *	@return	int						1 if ok, otherwise if error
 	 */
-	function delete($user, $notrigger=0)
+	function delete($user, $notrigger = 0)
 	{
 		global $conf;
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -2957,7 +2957,7 @@ class Propal extends CommonObject
 	 *  @return int                  	>0 if OK, <0 if KO
 	 *  @deprecated  use set_availability
 	 */
-	function availability($availability_id, $notrigger=0)
+	function availability($availability_id, $notrigger = 0)
 	{
 		global $user;
 
@@ -3028,7 +3028,7 @@ class Propal extends CommonObject
 	 *	@return int						>0 si ok, <0 si ko
 	 *	@deprecated use set_demand_reason
 	 */
-	function demand_reason($demand_reason_id, $notrigger=0)
+	function demand_reason($demand_reason_id, $notrigger = 0)
 	{
         // phpcs:enable
 		global $user;
@@ -3153,7 +3153,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut, $mode);
 	}
@@ -3166,7 +3166,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
 	 */
-	function LibStatut($statut,$mode=1)
+	function LibStatut($statut, $mode = 1)
 	{
         // phpcs:enable
 		global $conf;
@@ -3213,7 +3213,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
 	 */
-	function load_board($user,$mode)
+	function load_board($user, $mode)
 	{
         // phpcs:enable
 		global $conf, $langs;
@@ -3495,7 +3495,7 @@ class Propal extends CommonObject
 	 *  @param      int     $save_lastsearch_value    -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return     string          		          String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $get_params='', $notooltip=0, $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $get_params = '', $notooltip = 0, $save_lastsearch_value = -1)
 	{
 		global $langs, $conf, $user;
 
@@ -3585,7 +3585,7 @@ class Propal extends CommonObject
          *  @param   null|array  $moreparams     Array to provide more information
 	 * 	@return     int         				0 if KO, 1 if OK
 	 */
-	public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
+	public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
 	{
 		global $conf,$langs;
 
@@ -3854,7 +3854,7 @@ class PropaleLigne extends CommonObjectLine
 	 *	@param		int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
-	function insert($notrigger=0)
+	function insert($notrigger = 0)
 	{
 		global $conf,$user;
 
@@ -3997,7 +3997,7 @@ class PropaleLigne extends CommonObjectLine
 	 *	@param 	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return	 int  				<0 if ko, >0 if ok
 	 */
-	function delete(User $user, $notrigger=0)
+	function delete(User $user, $notrigger = 0)
 	{
 		global $conf;
 
@@ -4051,7 +4051,7 @@ class PropaleLigne extends CommonObjectLine
 	 *	@param 	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return	int					<0 if ko, >0 if ok
 	 */
-	function update($notrigger=0)
+	function update($notrigger = 0)
 	{
 		global $conf,$user;
 

+ 2 - 2
htdocs/comm/propal/class/propalestats.class.php

@@ -56,7 +56,7 @@ class PropaleStats extends Stats
      * @param   int		$userid    Id user for filter (creation user)
 	 * @param 	string	$mode	   Option ('customer', 'supplier')
 	 */
-	function __construct($db, $socid=0, $userid=0, $mode='customer')
+	function __construct($db, $socid = 0, $userid = 0, $mode = 'customer')
 	{
 		global $user, $conf;
 
@@ -106,7 +106,7 @@ class PropaleStats extends Stats
      *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 * @return	array				Array with number by month
 	 */
-	function getNbByMonth($year, $format=0)
+	function getNbByMonth($year, $format = 0)
 	{
 		global $user;
 

+ 3 - 3
htdocs/commande/class/api_orders.class.php

@@ -496,7 +496,7 @@ class Orders extends DolibarrApi
      *
      * @return  array
      */
-    function validate($id, $idwarehouse=0, $notrigger=0)
+    function validate($id, $idwarehouse = 0, $notrigger = 0)
     {
         if(! DolibarrApiAccess::$user->rights->commande->creer) {
 			throw new RestException(401);
@@ -629,7 +629,7 @@ class Orders extends DolibarrApi
      *
      * @return  int
      */
-    function close($id, $notrigger=0)
+    function close($id, $notrigger = 0)
     {
     	if(! DolibarrApiAccess::$user->rights->commande->creer) {
     		throw new RestException(401);
@@ -675,7 +675,7 @@ class Orders extends DolibarrApi
      *
      * @return  array
      */
-    function settodraft($id, $idwarehouse=-1)
+    function settodraft($id, $idwarehouse = -1)
     {
         if(! DolibarrApiAccess::$user->rights->commande->creer) {
             throw new RestException(401);

+ 31 - 31
htdocs/commande/class/commande.class.php

@@ -313,7 +313,7 @@ class Commande extends CommonOrder
 	 *  @param		int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *	@return  	int						<=0 if OK, 0=Nothing done, >0 if KO
 	 */
-	function valid($user, $idwarehouse=0, $notrigger=0)
+	function valid($user, $idwarehouse = 0, $notrigger = 0)
 	{
 		global $conf,$langs;
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -474,7 +474,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
 	 */
-	function set_draft($user, $idwarehouse=-1)
+	function set_draft($user, $idwarehouse = -1)
 	{
         //phpcs:enable
 		global $conf,$langs;
@@ -617,7 +617,7 @@ class Commande extends CommonOrder
 	 *  @param		int		$notrigger	1=Does not execute triggers, 0=Execute triggers
 	 *	@return		int					<0 if KO, >0 if OK
 	 */
-	function cloture($user, $notrigger=0)
+	function cloture($user, $notrigger = 0)
 	{
 		global $conf;
 
@@ -677,7 +677,7 @@ class Commande extends CommonOrder
 	 *	@param	int		$idwarehouse	Id warehouse to use for stock change.
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
-	function cancel($idwarehouse=-1)
+	function cancel($idwarehouse = -1)
 	{
 		global $conf,$user,$langs;
 
@@ -758,7 +758,7 @@ class Commande extends CommonOrder
 	 *	@param		int	    $notrigger	Disable all triggers
 	 *	@return 	int			        <0 if KO, >0 if OK
 	 */
-	function create($user, $notrigger=0)
+	function create($user, $notrigger = 0)
 	{
 		global $conf,$langs;
 		$error=0;
@@ -1060,7 +1060,7 @@ class Commande extends CommonOrder
 	 *	@param		int			$socid			Id of thirdparty
 	 *	@return		int							New id of clone
 	 */
-	function createFromClone($socid=0)
+	function createFromClone($socid = 0)
 	{
 		global $user,$hookmanager;
 
@@ -1302,7 +1302,7 @@ class Commande extends CommonOrder
 	 *	par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit)
 	 *	et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue)
 	 */
-	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $info_bits=0, $fk_remise_except=0, $price_base_type='HT', $pu_ttc=0, $date_start='', $date_end='', $type=0, $rang=-1, $special_code=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='',$array_options=0, $fk_unit=null, $origin='', $origin_id=0, $pu_ht_devise = 0)
+	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $info_bits = 0, $fk_remise_except = 0, $price_base_type = 'HT', $pu_ttc = 0, $date_start = '', $date_end = '', $type = 0, $rang = -1, $special_code = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $fk_unit = null, $origin = '', $origin_id = 0, $pu_ht_devise = 0)
 	{
 		global $mysoc, $conf, $langs, $user;
 
@@ -1531,7 +1531,7 @@ class Commande extends CommonOrder
 	 *	TODO	Remplacer les appels a cette fonction par generation objet Ligne
 	 *			insere dans tableau $this->products
 	 */
-	function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='')
+	function add_product($idproduct, $qty, $remise_percent = 0.0, $date_start = '', $date_end = '')
 	{
         // phpcs:enable
 		global $conf, $mysoc;
@@ -1616,7 +1616,7 @@ class Commande extends CommonOrder
 	 * 	@param		string		$ref_int		Internal reference of other object
 	 *	@return     int         				>0 if OK, <0 if KO, 0 if not found
 	 */
-	function fetch($id, $ref='', $ref_ext='', $ref_int='')
+	function fetch($id, $ref = '', $ref_ext = '', $ref_int = '')
 	{
 
 		// Check parameters
@@ -1845,7 +1845,7 @@ class Commande extends CommonOrder
 	 *	@param		int		$only_product	Return only physical products
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
-	function fetch_lines($only_product=0)
+	function fetch_lines($only_product = 0)
 	{
         // phpcs:enable
 		$this->lines=array();
@@ -2027,7 +2027,7 @@ class Commande extends CommonOrder
 	 *	@param      int		$filtre_statut      Filter on shipment status
 	 * 	@return     int                			<0 if KO, Nb of lines found if OK
 	 */
-	function loadExpeditions($filtre_statut=-1)
+	function loadExpeditions($filtre_statut = -1)
 	{
 		$this->expeditions = array();
 
@@ -2103,7 +2103,7 @@ class Commande extends CommonOrder
 	 *
 	 *	TODO		FONCTION NON FINIE A FINIR
 	 */
-	function stock_array($filtre_statut=self::STATUS_CANCELED)
+	function stock_array($filtre_statut = self::STATUS_CANCELED)
 	{
         // phpcs:enable
 		$this->stocks = array();
@@ -2143,7 +2143,7 @@ class Commande extends CommonOrder
 	 *  @param      int		$lineid		Id of line to delete
 	 *  @return     int        		 	>0 if OK, 0 if nothing to do, <0 if KO
 	 */
-	function deleteline($user=null, $lineid=0)
+	function deleteline($user = null, $lineid = 0)
 	{
 		if ($this->statut == self::STATUS_DRAFT)
 		{
@@ -2221,7 +2221,7 @@ class Commande extends CommonOrder
 	 * 	@param     	int			$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int 					<0 if KO, >0 if OK
 	 */
-	function set_remise($user, $remise, $notrigger=0)
+	function set_remise($user, $remise, $notrigger = 0)
 	{
         // phpcs:enable
 		$remise=trim($remise)?trim($remise):0;
@@ -2289,7 +2289,7 @@ class Commande extends CommonOrder
 	 * 		@param     	int			$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *		@return		int 					<0 if KO, >0 if OK
 	 */
-	function set_remise_absolue($user, $remise, $notrigger=0)
+	function set_remise_absolue($user, $remise, $notrigger = 0)
 	{
         // phpcs:enable
 		$remise=trim($remise)?trim($remise):0;
@@ -2357,7 +2357,7 @@ class Commande extends CommonOrder
 	 * 	@param     	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         		<0 if KO, >0 if OK
 	 */
-	function set_date($user, $date, $notrigger=0)
+	function set_date($user, $date, $notrigger = 0)
 	{
         // phpcs:enable
 		if ($user->rights->commande->creer)
@@ -2423,7 +2423,7 @@ class Commande extends CommonOrder
 	 *  @param     	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         				<0 si ko, >0 si ok
 	 */
-	function set_date_livraison($user, $date_livraison, $notrigger=0)
+	function set_date_livraison($user, $date_livraison, $notrigger = 0)
 	{
         // phpcs:enable
 		if ($user->rights->commande->creer)
@@ -2494,7 +2494,7 @@ class Commande extends CommonOrder
 	 *  @param    	string	$sortorder		Sort order
 	 *  @return     int             		-1 if KO, array with result if OK
 	 */
-	function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC')
+	function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC')
 	{
         // phpcs:enable
 		global $user;
@@ -2562,7 +2562,7 @@ class Commande extends CommonOrder
 	 *  @param     	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *	@return     int         				>0 if OK, <0 if KO
 	 */
-	function availability($availability_id, $notrigger=0)
+	function availability($availability_id, $notrigger = 0)
 	{
 		global $user;
 
@@ -2633,7 +2633,7 @@ class Commande extends CommonOrder
 	 *  @param     	int		$notrigger			1=Does not execute triggers, 0= execute triggers
 	 *  @return     int        			 		>0 if ok, <0 if ko
 	 */
-	function demand_reason($demand_reason_id, $notrigger=0)
+	function demand_reason($demand_reason_id, $notrigger = 0)
 	{
         // phpcs:enable
 		global $user;
@@ -2706,7 +2706,7 @@ class Commande extends CommonOrder
 	 *  @param     	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *	@return     int             		<0 if KO, >0 if OK
 	 */
-	function set_ref_client($user, $ref_client, $notrigger=0)
+	function set_ref_client($user, $ref_client, $notrigger = 0)
 	{
         // phpcs:enable
 		if ($user->rights->commande->creer)
@@ -2769,7 +2769,7 @@ class Commande extends CommonOrder
 	 * @param	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 * @return	int                 <0 if KO, >0 if OK
 	 */
-	function classifyBilled(User $user, $notrigger=0)
+	function classifyBilled(User $user, $notrigger = 0)
 	{
 		$error = 0;
 
@@ -2904,7 +2904,7 @@ class Commande extends CommonOrder
 	 * 	@param		int				$notrigger			disable line update trigger
 	 *  @return   	int              					< 0 if KO, > 0 if OK
 	 */
-	function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1=0.0,$txlocaltax2=0.0, $price_base_type='HT', $info_bits=0, $date_start='', $date_end='', $type=0, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $fk_unit=null, $pu_ht_devise = 0, $notrigger=0)
+	function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $price_base_type = 'HT', $info_bits = 0, $date_start = '', $date_end = '', $type = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0)
 	{
 		global $conf, $mysoc, $langs, $user;
 
@@ -3094,7 +3094,7 @@ class Commande extends CommonOrder
 	 *      @param      int		$notrigger	    0=launch triggers after, 1=disable triggers
 	 *      @return     int      			   	<0 if KO, >0 if OK
 	 */
-	function update(User $user, $notrigger=0)
+	function update(User $user, $notrigger = 0)
 	{
 		global $conf;
 
@@ -3189,7 +3189,7 @@ class Commande extends CommonOrder
 	 *	@param	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 * 	@return	int					<=0 if KO, >0 if OK
 	 */
-	function delete($user, $notrigger=0)
+	function delete($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -3408,7 +3408,7 @@ class Commande extends CommonOrder
 	 *  @param      int     $donotshowbilled  Do not show billed status after order status
 	 *  @return     string					  Label of status
 	 */
-	function LibStatut($statut,$billed,$mode,$donotshowbilled=0)
+	function LibStatut($statut, $billed, $mode, $donotshowbilled = 0)
 	{
         // phpcs:enable
 		global $langs, $conf;
@@ -3501,7 +3501,7 @@ class Commande extends CommonOrder
 	 *  @param      int         $save_lastsearch_value    -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return     string          			          String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $notooltip=0, $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $notooltip = 0, $save_lastsearch_value = -1)
 	{
 		global $conf, $langs, $user;
 
@@ -3782,7 +3782,7 @@ class Commande extends CommonOrder
 	 *  @param      null|array  $moreparams     Array to provide more information
 	 *  @return     int         				0 if KO, 1 if OK
 	 */
-	public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
+	public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
 	{
 		global $conf,$langs;
 
@@ -4022,7 +4022,7 @@ class OrderLine extends CommonOrderLine
 	 *  @param      int		$notrigger	    0=launch triggers after, 1=disable triggers
 	 *	@return	 int  <0 si ko, >0 si ok
 	 */
-	function delete(User $user, $notrigger=0)
+	function delete(User $user, $notrigger = 0)
 	{
 		global $conf, $langs;
 
@@ -4083,7 +4083,7 @@ class OrderLine extends CommonOrderLine
 	 *	@param      int		$notrigger		1 = disable triggers
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
-	function insert($user=null, $notrigger=0)
+	function insert($user = null, $notrigger = 0)
 	{
 		global $langs, $conf;
 
@@ -4228,7 +4228,7 @@ class OrderLine extends CommonOrderLine
 	 *	@param      int		$notrigger		1 = disable triggers
 	 *	@return		int		<0 si ko, >0 si ok
 	 */
-	function update(User $user, $notrigger=0)
+	function update(User $user, $notrigger = 0)
 	{
 		global $conf,$langs;
 

+ 3 - 3
htdocs/commande/class/commandestats.class.php

@@ -55,7 +55,7 @@ class CommandeStats extends Stats
 	 * @param 	string	$mode	   Option ('customer', 'supplier')
 	 * @param   int		$userid    Id user for filter (creation user)
 	 */
-	function __construct($db, $socid, $mode, $userid=0)
+	function __construct($db, $socid, $mode, $userid = 0)
 	{
 		global $user, $conf;
 
@@ -101,7 +101,7 @@ class CommandeStats extends Stats
      *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 * @return	array				Array with number by month
 	 */
-	function getNbByMonth($year, $format=0)
+	function getNbByMonth($year, $format = 0)
 	{
 		global $user;
 
@@ -144,7 +144,7 @@ class CommandeStats extends Stats
      * @param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 * @return	array				Array with amount by month
 	 */
-	function getAmountByMonth($year, $format=0)
+	function getAmountByMonth($year, $format = 0)
 	{
 		global $user;
 

+ 15 - 15
htdocs/compta/bank/class/account.class.php

@@ -352,7 +352,7 @@ class Account extends CommonObject
 	 *      @param  string      $type       To search using type
 	 *      @return array|int               Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error
 	 */
-	function get_url($fk_bank='', $url_id='', $type='')
+	function get_url($fk_bank = '', $url_id = '', $type = '')
 	{
         // phpcs:enable
 		$lines = array();
@@ -417,7 +417,7 @@ class Account extends CommonObject
 	 *  @param	int			$datev			Date value
 	 *  @return	int							Rowid of added entry, <0 if KO
 	 */
-	function addline($date, $oper, $label, $amount, $num_chq, $categorie, User $user, $emetteur='',$banque='', $accountancycode='', $datev=null)
+	function addline($date, $oper, $label, $amount, $num_chq, $categorie, User $user, $emetteur = '', $banque = '', $accountancycode = '', $datev = null)
 	{
 		// Deprecation warning
 		if (is_numeric($oper)) {
@@ -525,7 +525,7 @@ class Account extends CommonObject
 	 *  @param  int     $notrigger  1=Disable triggers
 	 *  @return int        			< 0 if KO, > 0 if OK
 	 */
-	function create(User $user, $notrigger=0)
+	function create(User $user, $notrigger = 0)
 	{
 		global $langs,$conf, $hookmanager;
 
@@ -860,7 +860,7 @@ class Account extends CommonObject
 	 *      @param  string	$ref     	Ref of bank account to get
 	 *      @return	int					<0 if KO, >0 if OK
 	 */
-	function fetch($id, $ref='')
+	function fetch($id, $ref = '')
 	{
 		global $conf;
 
@@ -1076,7 +1076,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->clos,$mode);
 	}
@@ -1163,7 +1163,7 @@ class Account extends CommonObject
 	 * 	@param	int		$option		1=Exclude future operation date (this is to exclude input made in advance and have real account sold)
 	 *	@return	int					Current sold (value date <= today)
 	 */
-	function solde($option=0)
+	function solde($option = 0)
 	{
 		$solde=0;
 
@@ -1329,7 +1329,7 @@ class Account extends CommonObject
      *  @param	int  	$notooltip		 			1=Disable tooltip
 	 *	@return	string								Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0, $mode='', $option='', $save_lastsearch_value=-1, $notooltip=0)
+	function getNomUrl($withpicto = 0, $mode = '', $option = '', $save_lastsearch_value = -1, $notooltip = 0)
 	{
 		global $conf, $langs, $user;
 
@@ -1549,7 +1549,7 @@ class Account extends CommonObject
 	 * @return array
 	 * @see useDetailedBBAN
 	 */
-	public function getFieldsToShow($includeibanbic=0)
+	public function getFieldsToShow($includeibanbic = 0)
 	{
 		//Get the required properties depending on the country
 		$detailedBBAN = $this->useDetailedBBAN();
@@ -1765,7 +1765,7 @@ class AccountLine extends CommonObject
 	 *  @param      string	$num     	External num to load (ex: num of transaction for paypal fee)
 	 *	@return		int					<0 if KO, 0 if OK but not found, >0 if OK and found
 	 */
-	function fetch($rowid,$ref='',$num='')
+	function fetch($rowid, $ref = '', $num = '')
 	{
 		global $conf;
 
@@ -2011,7 +2011,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$conciliated	1=Set transaction to conciliated, 0=Keep transaction non conciliated
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
-	function update_conciliation(User $user, $cat, $conciliated=1)
+	function update_conciliation(User $user, $cat, $conciliated = 1)
 	{
         // phpcs:enable
 		global $conf,$langs;
@@ -2075,7 +2075,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$sign		1 or -1
 	 *	@return	int					>0 if OK, 0 if KO
 	 */
-	function datev_change($rowid,$sign=1)
+	function datev_change($rowid, $sign = 1)
 	{
         // phpcs:enable
 		$sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid;
@@ -2142,7 +2142,7 @@ class AccountLine extends CommonObject
 	 *	@param	int		$sign		1 or -1
 	 *	@return	int					>0 if OK, 0 if KO
 	 */
-	function dateo_change($rowid,$sign=1)
+	function dateo_change($rowid, $sign = 1)
 	{
         // phpcs:enable
 		$sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid;
@@ -2257,7 +2257,7 @@ class AccountLine extends CommonObject
 	 * 		@param	int     $notooltip		1=Disable tooltip
 	 *		@return	string					Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0,$maxlen=0,$option='',$notooltip=0)
+	function getNomUrl($withpicto = 0, $maxlen = 0, $option = '', $notooltip = 0)
 	{
 		global $langs;
 
@@ -2298,7 +2298,7 @@ class AccountLine extends CommonObject
 	 *    @param	int		$mode       0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
 	 *    @return   string        		Libelle
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->status,$mode);
 	}
@@ -2311,7 +2311,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
 	 */
-	function LibStatut($statut,$mode=0)
+	function LibStatut($statut, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;

+ 1 - 1
htdocs/compta/bank/class/api_bankaccounts.class.php

@@ -325,7 +325,7 @@ class BankAccounts extends DolibarrApi
      *
      * @url POST {id}/lines
      */
-    function addLine($id, $date, $type, $label, $amount, $category=0, $cheque_number='', $cheque_writer='', $cheque_bank='')
+    function addLine($id, $date, $type, $label, $amount, $category = 0, $cheque_number = '', $cheque_writer = '', $cheque_bank = '')
     {
         if (! DolibarrApiAccess::$user->rights->banque->modifier) {
             throw new RestException(401);

+ 5 - 5
htdocs/compta/bank/class/paymentvarious.class.php

@@ -111,7 +111,7 @@ class PaymentVarious extends CommonObject
 	 * @param   int		$notrigger      0=no, 1=yes (no update trigger)
 	 * @return  int         			<0 if KO, >0 if OK
 	 */
-	function update($user=null, $notrigger=0)
+	function update($user = null, $notrigger = 0)
 	{
 		global $conf, $langs;
 
@@ -181,7 +181,7 @@ class PaymentVarious extends CommonObject
 	 *  @param  User	$user       User that load
 	 *  @return int         		<0 if KO, >0 if OK
 	 */
-	function fetch($id, $user=null)
+	function fetch($id, $user = null)
 	{
 		global $langs;
 		$sql = "SELECT";
@@ -505,7 +505,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -518,7 +518,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
 	 */
-	function LibStatut($statut,$mode=0)
+	function LibStatut($statut, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;
@@ -567,7 +567,7 @@ class PaymentVarious extends CommonObject
      *  @param	int  	$notooltip		 			1=Disable tooltip
 	 *	@return string								String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $save_lastsearch_value=-1, $notooltip=0)
+	function getNomUrl($withpicto = 0, $option = '', $save_lastsearch_value = -1, $notooltip = 0)
 	{
 		global $db, $conf, $langs, $hookmanager;
 		global $langs;

+ 3 - 3
htdocs/compta/cashcontrol/class/cashcontrol.class.php

@@ -295,7 +295,7 @@ class CashControl 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
 	 */
-	public function getLibStatut($mode=0)
+	public function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->status, $mode);
 	}
@@ -308,7 +308,7 @@ class CashControl 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
 	 */
-	public function LibStatut($status, $mode=0)
+	public function LibStatut($status, $mode = 0)
 	{
 		// phpcs:enable
 		if (empty($this->labelstatus))
@@ -364,7 +364,7 @@ class CashControl extends CommonObject
 	 * @param  int    $notooltip			 No tooltip
 	 * @return string                                String with URL
 	 */
-	public function getNomUrl($withpicto=0, $option='', $maxlength=0, $save_lastsearch_value=-1, $notooltip=0)
+	public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $save_lastsearch_value = -1, $notooltip = 0)
 	{
 		global $conf, $langs, $hookmanager;
 		include_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';

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

@@ -245,7 +245,7 @@ class Deplacement extends CommonObject
 	* @param	string	$ref	Ref of record
 	* @return	int				<0 if KO, >0 if OK
 	*/
-	function fetch($id, $ref='')
+	function fetch($id, $ref = '')
 	{
 		$sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet, extraparams";
 		$sql.= " FROM ".MAIN_DB_PREFIX."deplacement";
@@ -316,7 +316,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -329,7 +329,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
 	 */
-	function LibStatut($statut,$mode=0)
+	function LibStatut($statut, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;
@@ -374,7 +374,7 @@ class Deplacement extends CommonObject
 	 *	@param		int		$withpicto		0=No picto, 1=Include picto into link, 2=Only picto
 	 *	@return		string					Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0)
+	function getNomUrl($withpicto = 0)
 	{
 		global $langs;
 
@@ -400,7 +400,7 @@ class Deplacement extends CommonObject
 	 * @param	int		$active		Active or not
 	 * @return	array
 	 */
-	function listOfTypes($active=1)
+	function listOfTypes($active = 1)
 	{
 	   global $langs;
 

+ 3 - 3
htdocs/compta/deplacement/class/deplacementstats.class.php

@@ -50,7 +50,7 @@ class DeplacementStats extends Stats
      * @param   mixed		$userid    Id user for filter or array of user ids
 	 * @return 	void
 	 */
-	function __construct($db, $socid=0, $userid=0)
+	function __construct($db, $socid = 0, $userid = 0)
 	{
 		global $conf;
 
@@ -96,7 +96,7 @@ class DeplacementStats extends Stats
      *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 *	@return	array			Array of values
 	 */
-	function getNbByMonth($year, $format=0)
+	function getNbByMonth($year, $format = 0)
 	{
 		$sql = "SELECT MONTH(dated) as dm, count(*)";
 		$sql.= " FROM ".$this->from;
@@ -118,7 +118,7 @@ class DeplacementStats extends Stats
      *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 *	@return	array				Array of values
 	 */
-	function getAmountByMonth($year, $format=0)
+	function getAmountByMonth($year, $format = 0)
 	{
 		$sql = "SELECT date_format(dated,'%m') as dm, sum(".$this->field.")";
 		$sql.= " FROM ".$this->from;

+ 7 - 7
htdocs/compta/facture/class/api_invoices.class.php

@@ -104,7 +104,7 @@ class Invoices extends DolibarrApi
      *
 	 * @throws RestException
      */
-    function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids='', $status='', $sqlfilters = '')
+    function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '')
     {
         global $db, $conf;
 
@@ -600,7 +600,7 @@ class Invoices extends DolibarrApi
      * @throws 500
      *
      */
-    function addContact($id, $fk_socpeople, $type_contact, $source, $notrigger=0)
+    function addContact($id, $fk_socpeople, $type_contact, $source, $notrigger = 0)
     {
         if(! DolibarrApiAccess::$user->rights->facture->creer) {
                 throw new RestException(401);
@@ -650,7 +650,7 @@ class Invoices extends DolibarrApi
      * @throws 500
      *
      */
-    function settodraft($id, $idwarehouse=-1)
+    function settodraft($id, $idwarehouse = -1)
     {
         if(! DolibarrApiAccess::$user->rights->facture->creer) {
             throw new RestException(401);
@@ -702,7 +702,7 @@ class Invoices extends DolibarrApi
      *
      * @return  array
      */
-    function validate($id, $idwarehouse=0, $notrigger=0)
+    function validate($id, $idwarehouse = 0, $notrigger = 0)
     {
     	if(! DolibarrApiAccess::$user->rights->facture->creer) {
     		throw new RestException(401);
@@ -753,7 +753,7 @@ class Invoices extends DolibarrApi
      * @throws 404
      * @throws 500
      */
-    function settopaid($id, $close_code='', $close_note='')
+    function settopaid($id, $close_code = '', $close_note = '')
     {
         if(! DolibarrApiAccess::$user->rights->facture->creer) {
             throw new RestException(401);
@@ -994,7 +994,7 @@ class Invoices extends DolibarrApi
      * @throws 401
      * @throws 404
      */
-    function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement='', $comment='', $chqemetteur='', $chqbank='')
+    function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '')
     {
         global $conf;
 
@@ -1114,7 +1114,7 @@ class Invoices extends DolibarrApi
      * @throws 403
      * @throws 404
      */
-    function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement='', $comment='', $chqemetteur='', $chqbank='')
+    function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '')
     {
         global $conf;
 

+ 12 - 12
htdocs/compta/facture/class/facture-rec.class.php

@@ -321,7 +321,7 @@ class FactureRec extends CommonInvoice
 	 * 	@param		int		$ref_int		Internal reference of other object
 	 *	@return     int         			>0 if OK, <0 if KO, 0 if not found
 	 */
-	function fetch($rowid, $ref='', $ref_ext='', $ref_int='')
+	function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '')
 	{
 		$sql = 'SELECT f.rowid, f.entity, f.titre, f.suspended, f.fk_soc, f.amount, f.tva, f.localtax1, f.localtax2, f.total, f.total_ttc';
 		$sql.= ', f.remise_percent, f.remise_absolue, f.remise';
@@ -573,7 +573,7 @@ class FactureRec extends CommonInvoice
 	 *	@param		int		$idwarehouse	Id warehouse to use for stock change.
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
-	function delete(User $user, $notrigger=0, $idwarehouse=-1)
+	function delete(User $user, $notrigger = 0, $idwarehouse = -1)
 	{
 	    $rowid=$this->id;
 
@@ -644,7 +644,7 @@ class FactureRec extends CommonInvoice
 	 *  @param		int			$date_end_fill		1=Flag to fill end date when generating invoice
      *	@return    	int             				<0 if KO, Id of line if OK
 	 */
-	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise=0, $date_start_fill=0, $date_end_fill=0)
+	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $rang = -1, $special_code = 0, $label = '', $fk_unit = null, $pu_ht_devise = 0, $date_start_fill = 0, $date_end_fill = 0)
 	{
 	    global $mysoc;
 
@@ -826,7 +826,7 @@ class FactureRec extends CommonInvoice
 	 *  @param		int			$date_end_fill		1=Flag to fill end date when generating invoice
 	 *	@return    	int             				<0 if KO, Id of line if OK
 	 */
-	function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $label='', $fk_unit=null, $pu_ht_devise = 0, $notrigger=0, $date_start_fill=0, $date_end_fill=0)
+	function updateline($rowid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $rang = -1, $special_code = 0, $label = '', $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $date_start_fill = 0, $date_end_fill = 0)
 	{
 	    global $mysoc;
 
@@ -1002,7 +1002,7 @@ class FactureRec extends CommonInvoice
 	 *  @param	int		$forcevalidation		1=Force validation of invoice whatever is template auto_validate flag.
 	 *  @return	int								0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK)
 	 */
-	function createRecurringInvoices($restrictioninvoiceid=0, $forcevalidation=0)
+	function createRecurringInvoices($restrictioninvoiceid = 0, $forcevalidation = 0)
 	{
 		global $conf, $langs, $db, $user, $hookmanager;
 
@@ -1159,7 +1159,7 @@ class FactureRec extends CommonInvoice
      * @param  int		$save_lastsearch_value    	-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 * @return string 			         			String with URL
 	 */
-	function getNomUrl($withpicto=0,$option='',$max=0,$short=0,$moretitle='',$notooltip='',$save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = '', $save_lastsearch_value = -1)
 	{
 		global $langs;
 
@@ -1210,7 +1210,7 @@ class FactureRec extends CommonInvoice
 	 *  @param      integer	$alreadypaid    Not used on recurring invoices
 	 *  @return     string			        Label of status
 	 */
-	function getLibStatut($mode=0, $alreadypaid=-1)
+	function getLibStatut($mode = 0, $alreadypaid = -1)
 	{
 
 		return $this->LibStatut($this->frequency?1:0, $this->suspended, $mode, $alreadypaid, empty($this->type)?0:$this->type);
@@ -1227,7 +1227,7 @@ class FactureRec extends CommonInvoice
 	 *	@param		int		$type			Type invoice
 	 *	@return     string        			Label of status
 	 */
-	function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0)
+	function LibStatut($recur, $status, $mode = 0, $alreadypaid = -1, $type = 0)
 	{
         // phpcs:enable
 		global $langs;
@@ -1328,7 +1328,7 @@ class FactureRec extends CommonInvoice
 	 *	@param	string		$option		''=Create a specimen invoice with lines, 'nolines'=No lines
 	 *  @return	void
 	 */
-	function initAsSpecimen($option='')
+	function initAsSpecimen($option = '')
 	{
 		global $user,$langs,$conf;
 
@@ -1480,7 +1480,7 @@ class FactureRec extends CommonInvoice
 	 *	@param     	string	$unit 			unit of frequency  (d, m, y)
      *	@return		int						<0 if KO, >0 if OK
      */
-    function setFrequencyAndUnit($frequency,$unit)
+    function setFrequencyAndUnit($frequency, $unit)
     {
         if (! $this->table_element)
         {
@@ -1523,7 +1523,7 @@ class FactureRec extends CommonInvoice
      *	@param     	int			$increment_nb_gen_done	0 do nothing more, >0 increment nb_gen_done
      *	@return		int									<0 if KO, >0 if OK
      */
-    function setNextDate($date, $increment_nb_gen_done=0)
+    function setNextDate($date, $increment_nb_gen_done = 0)
     {
         if (! $this->table_element)
         {
@@ -1823,7 +1823,7 @@ class FactureLigneRec extends CommonInvoiceLine
      *  @param		int		$notrigger				No trigger
      *	@return    	int             				<0 if KO, Id of line if OK
      */
-    function update(User $user, $notrigger=0)
+    function update(User $user, $notrigger = 0)
     {
     	global $conf;
 

+ 28 - 28
htdocs/compta/facture/class/facture.class.php

@@ -289,7 +289,7 @@ class Facture extends CommonInvoice
 	 * 	@param	int		$forceduedate	1=Do not recalculate due date from payment condition but force it with value
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
-	function create(User $user, $notrigger=0, $forceduedate=0)
+	function create(User $user, $notrigger = 0, $forceduedate = 0)
 	{
 		global $langs,$conf,$mysoc,$hookmanager;
 		$error=0;
@@ -854,7 +854,7 @@ class Facture extends CommonInvoice
 	 *	@param		int		$invertdetail	Reverse sign of amounts for lines
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
-	function createFromCurrent(User $user, $invertdetail=0)
+	function createFromCurrent(User $user, $invertdetail = 0)
 	{
 		global $conf;
 
@@ -945,7 +945,7 @@ class Facture extends CommonInvoice
 	 *		@param		int				$socid			Id of thirdparty
 	 * 	 	@return		int								New id of clone
 	 */
-	function createFromClone($socid=0)
+	function createFromClone($socid = 0)
 	{
 		global $user,$hookmanager, $conf;
 
@@ -1162,7 +1162,7 @@ class Facture extends CommonInvoice
 	 * @param	int				$withpicto			Add download picto into link
 	 * @return	string			HTML link to file
 	 */
-	function getDirectExternalLink($withpicto=0)
+	function getDirectExternalLink($withpicto = 0)
 	{
 		global $dolibarr_main_url_root;
 
@@ -1193,7 +1193,7 @@ class Facture extends CommonInvoice
      *  @param  int     $save_lastsearch_value		-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *  @return string 			         			String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $max=0, $short=0, $moretitle='', $notooltip=0, $addlinktonotes=0, $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1)
 	{
 		global $langs, $conf, $user, $form;
 
@@ -1301,7 +1301,7 @@ class Facture extends CommonInvoice
 	 *  @param		bool	$fetch_situation	Fetch the previous and next situation in $tab_previous_situation_invoice and $tab_next_situation_invoice
 	 *	@return     int         			>0 if OK, <0 if KO, 0 if not found
 	 */
-	function fetch($rowid, $ref='', $ref_ext='', $ref_int='', $fetch_situation=false)
+	function fetch($rowid, $ref = '', $ref_ext = '', $ref_int = '', $fetch_situation = false)
 	{
 		global $conf;
 
@@ -1604,7 +1604,7 @@ class Facture extends CommonInvoice
 	 *      @param      int		$notrigger	    0=launch triggers after, 1=disable triggers
 	 *      @return     int      			   	<0 if KO, >0 if OK
 	 */
-	function update(User $user, $notrigger=0)
+	function update(User $user, $notrigger = 0)
 	{
 		global $conf;
 
@@ -1819,7 +1819,7 @@ class Facture extends CommonInvoice
 	 *  @param     	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
-	function set_ref_client($ref_client, $notrigger=0)
+	function set_ref_client($ref_client, $notrigger = 0)
 	{
         // phpcs:enable
 	    global $user;
@@ -1884,7 +1884,7 @@ class Facture extends CommonInvoice
 	 *	@param		int		$idwarehouse	Id warehouse to use for stock change.
 	 *	@return		int						<0 if KO, 0=Refused, >0 if OK
 	 */
-	function delete($user, $notrigger=0, $idwarehouse=-1)
+	function delete($user, $notrigger = 0, $idwarehouse = -1)
 	{
 		global $langs,$conf;
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -2058,7 +2058,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
 	 */
-	function set_paid($user, $close_code='', $close_note='')
+	function set_paid($user, $close_code = '', $close_note = '')
 	{
         // phpcs:enable
 		$error=0;
@@ -2168,7 +2168,7 @@ class Facture extends CommonInvoice
 	 *	@param	string	$close_note		Comment
 	 *	@return int         			<0 if KO, >0 if OK
 	 */
-	function set_canceled($user, $close_code='', $close_note='')
+	function set_canceled($user, $close_code = '', $close_note = '')
 	{
         // phpcs:enable
 
@@ -2231,7 +2231,7 @@ class Facture extends CommonInvoice
 	 * @param	int		$notrigger		1=Does not execute triggers, 0= execute triggers
      * @return	int						<0 if KO, 0=Nothing done because invoice is not a draft, >0 if OK
 	 */
-	function validate($user, $force_number='', $idwarehouse=0, $notrigger=0)
+	function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0)
 	{
 		global $conf,$langs;
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -2529,7 +2529,7 @@ class Facture extends CommonInvoice
 	 *	@param	int		$idwarehouse	Id warehouse to use for stock change.
 	 *	@return	int						<0 if KO, >0 if OK
 	 */
-	function set_draft($user,$idwarehouse=-1)
+	function set_draft($user, $idwarehouse = -1)
 	{
         // phpcs:enable
 		global $conf,$langs;
@@ -2649,7 +2649,7 @@ class Facture extends CommonInvoice
 	 * 		@param		double		$pu_ht_devise		Unit price in currency
 	 *    	@return    	int             				<0 if KO, Id of line if OK
 	 */
-	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=self::TYPE_STANDARD, $rang=-1, $special_code=0, $origin='', $origin_id=0, $fk_parent_line=0, $fk_fournprice=null, $pa_ht=0, $label='', $array_options=0, $situation_percent=100, $fk_prev_id=0, $fk_unit = null, $pu_ht_devise = 0)
+	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = 0, $fk_remise_except = '', $price_base_type = 'HT', $pu_ttc = 0, $type = self::TYPE_STANDARD, $rang = -1, $special_code = 0, $origin = '', $origin_id = 0, $fk_parent_line = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $array_options = 0, $situation_percent = 100, $fk_prev_id = 0, $fk_unit = null, $pu_ht_devise = 0)
 	{
 		// Deprecation warning
 		if ($label) {
@@ -2879,7 +2879,7 @@ class Facture extends CommonInvoice
 	 * 	@param		int			$notrigger			disable line update trigger
 	 *  @return    	int             				< 0 if KO, > 0 if OK
 	 */
-	function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1=0, $txlocaltax2=0, $price_base_type='HT', $info_bits=0, $type= self::TYPE_STANDARD, $fk_parent_line=0, $skip_update_total=0, $fk_fournprice=null, $pa_ht=0, $label='', $special_code=0, $array_options=0, $situation_percent=100, $fk_unit = null, $pu_ht_devise = 0, $notrigger=0)
+	function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0)
 	{
 		global $conf,$user;
 		// Deprecation warning
@@ -3197,7 +3197,7 @@ class Facture extends CommonInvoice
 	 *  @param     	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int 		<0 if ko, >0 if ok
 	 */
-	function set_remise($user, $remise, $notrigger=0)
+	function set_remise($user, $remise, $notrigger = 0)
 	{
         // phpcs:enable
 		// Clean parameters
@@ -3263,7 +3263,7 @@ class Facture extends CommonInvoice
 	 *  @param     	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int 				<0 if KO, >0 if OK
 	 */
-	function set_remise_absolue($user, $remise, $notrigger=0)
+	function set_remise_absolue($user, $remise, $notrigger = 0)
 	{
         // phpcs:enable
 		if (empty($remise)) $remise=0;
@@ -3330,7 +3330,7 @@ class Facture extends CommonInvoice
 	 *      @param     string		$mode		'next' for next value or 'last' for last value
 	 *      @return    string					free ref or last ref
 	 */
-	function getNextNumRef($soc,$mode='next')
+	function getNextNumRef($soc, $mode = 'next')
 	{
 		global $conf, $langs;
 		$langs->load("bills");
@@ -3472,7 +3472,7 @@ class Facture extends CommonInvoice
 	 *  @param    	string	$sortorder		Sort order
 	 *  @return     int             		-1 if KO, array with result if OK
 	 */
-	function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
+	function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC')
 	{
         // phpcs:enable
 		global $conf,$user;
@@ -3543,7 +3543,7 @@ class Facture extends CommonInvoice
 	 *	@param		int		$socid		Id thirdparty
 	 *	@return    	array				Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
 	 */
-	function list_replacable_invoices($socid=0)
+	function list_replacable_invoices($socid = 0)
 	{
         // phpcs:enable
 		global $conf;
@@ -3593,7 +3593,7 @@ class Facture extends CommonInvoice
 	 *	@param		int		$socid		Id thirdparty
 	 *	@return    	array				Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
 	 */
-	function list_qualified_avoir_invoices($socid=0)
+	function list_qualified_avoir_invoices($socid = 0)
 	{
         // phpcs:enable
 		global $conf;
@@ -3668,7 +3668,7 @@ class Facture extends CommonInvoice
 	 *  @param		float	$amount		Amount we request direct debit for
 	 *	@return     int         		<0 if KO, >0 if OK
 	 */
-	function demande_prelevement($fuser, $amount=0)
+	function demande_prelevement($fuser, $amount = 0)
 	{
         // phpcs:enable
 
@@ -3894,7 +3894,7 @@ class Facture extends CommonInvoice
 	 *	@param	string		$option		''=Create a specimen invoice with lines, 'nolines'=No lines
 	 *  @return	void
 	 */
-	function initAsSpecimen($option='')
+	function initAsSpecimen($option = '')
 	{
 		global $langs;
 
@@ -4110,7 +4110,7 @@ class Facture extends CommonInvoice
 	 *  @param   null|array  $moreparams     Array to provide more information
 	 *	@return int        					<0 if KO, >0 if OK
 	 */
-	public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
+	public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
 	{
 		global $conf,$langs;
 
@@ -4215,7 +4215,7 @@ class Facture extends CommonInvoice
 	 *  @param     	int		$notrigger	1=Does not execute triggers, 0= execute triggers
 	 *	@return		int 				<0 if KO, >0 if OK
 	 */
-	function setFinal(User $user, $notrigger=0)
+	function setFinal(User $user, $notrigger = 0)
 	{
 		$error=0;
 
@@ -4512,7 +4512,7 @@ class FactureLigne extends CommonInvoiceLine
 	 *  @param      int     $noerrorifdiscountalreadylinked  1=Do not make error if lines is linked to a discount and discount already linked to another
 	 *	@return		int						                 <0 if KO, >0 if OK
 	 */
-	function insert($notrigger=0, $noerrorifdiscountalreadylinked=0)
+	function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0)
 	{
 		global $langs,$user,$conf;
 
@@ -4729,7 +4729,7 @@ class FactureLigne extends CommonInvoiceLine
 	 *	@param		int		$notrigger	Disable triggers
 	 *	@return		int					<0 if KO, >0 if OK
 	 */
-	function update($user='',$notrigger=0)
+	function update($user = '', $notrigger = 0)
 	{
 		global $user,$conf;
 
@@ -4945,7 +4945,7 @@ class FactureLigne extends CommonInvoiceLine
 	 * @param  bool    $include_credit_note		Include credit note or not
 	 * @return int                     >= 0
 	 */
-	function get_prev_progress($invoiceid, $include_credit_note=true)
+	function get_prev_progress($invoiceid, $include_credit_note = true)
 	{
         // phpcs:enable
 		if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {

+ 3 - 3
htdocs/compta/facture/class/facturestats.class.php

@@ -53,7 +53,7 @@ class FactureStats extends Stats
 	 * 	@param 	string		$mode	   	Option ('customer', 'supplier')
      * 	@param	int			$userid    	Id user for filter (creation user)
 	 */
-	function __construct($db, $socid, $mode, $userid=0)
+	function __construct($db, $socid, $mode, $userid = 0)
 	{
 		global $user, $conf;
 
@@ -100,7 +100,7 @@ class FactureStats extends Stats
      *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 *	@return	array				Array of values
 	 */
-	function getNbByMonth($year, $format=0)
+	function getNbByMonth($year, $format = 0)
 	{
 		global $user;
 
@@ -145,7 +145,7 @@ class FactureStats extends Stats
      *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 *	@return	array				Array with amount by month
 	 */
-	function getAmountByMonth($year, $format=0)
+	function getAmountByMonth($year, $format = 0)
 	{
 		global $user;
 

+ 3 - 3
htdocs/compta/facture/class/paymentterm.class.php

@@ -82,7 +82,7 @@ class PaymentTerm // extends CommonObject
      *      @param      int		$notrigger	    0=launch triggers after, 1=disable triggers
      *      @return     int       			  	<0 if KO, Id of created object if OK
      */
-    function create($user, $notrigger=0)
+    function create($user, $notrigger = 0)
     {
     	global $conf, $langs;
 		$error=0;
@@ -268,7 +268,7 @@ class PaymentTerm // extends CommonObject
      *      @param      int		$notrigger	    0=launch triggers after, 1=disable triggers
      *      @return     int       			  	<0 if KO, >0 if OK
      */
-	function update($user=null, $notrigger=0)
+	function update($user = null, $notrigger = 0)
 	{
 		global $conf, $langs;
 
@@ -345,7 +345,7 @@ class PaymentTerm // extends CommonObject
 	 *  @param      int		$notrigger	0=launch triggers after, 1=disable triggers
 	 *	@return		int					<0 if KO, >0 if OK
 	 */
-	function delete($user, $notrigger=0)
+	function delete($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;

+ 4 - 4
htdocs/compta/localtax/class/localtax.class.php

@@ -163,7 +163,7 @@ class Localtax extends CommonObject
      *	@param		int		$notrigger		0=no, 1=yes (no update trigger)
      *	@return		int						<0 if KO, >0 if OK
      */
-    function update(User $user, $notrigger=0)
+    function update(User $user, $notrigger = 0)
     {
     	global $conf, $langs;
 
@@ -628,7 +628,7 @@ class Localtax extends CommonObject
 	 *	@param		string	$option			Sur quoi pointe le lien
 	 *	@return		string					Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0, $option='')
+	function getNomUrl($withpicto = 0, $option = '')
 	{
 		global $langs;
 
@@ -652,7 +652,7 @@ class Localtax extends CommonObject
 	 * @param	int		$mode       0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
 	 * @return  string				Libelle
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -665,7 +665,7 @@ class Localtax 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)
+    function LibStatut($status, $mode = 0)
     {
         // phpcs:enable
         global $langs;  // TODO Renvoyer le libelle anglais et faire traduction a affichage

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

@@ -84,7 +84,7 @@ class RemiseCheque extends CommonObject
 	 *	@param 	string	$ref		 	Ref record
 	 * 	@return	int						<0 if KO, > 0 if OK
 	 */
-	function fetch($id,$ref='')
+	function fetch($id, $ref = '')
 	{
 		global $conf;
 
@@ -299,7 +299,7 @@ class RemiseCheque extends CommonObject
 	 *	@param  User	$user 		Utilisateur qui effectue l'operation
 	 *	@return	int
 	 */
-	function delete($user='')
+	function delete($user = '')
 	{
 		global $conf;
 
@@ -416,7 +416,7 @@ class RemiseCheque extends CommonObject
 	 *      @param     string		$mode		'next' for next value or 'last' for last value
 	 *      @return    string					free ref or last ref
 	 */
-	function getNextNumRef($mode='next')
+	function getNextNumRef($mode = 'next')
 	{
 		global $conf, $db, $langs, $mysoc;
 		$langs->load("bills");
@@ -988,7 +988,7 @@ class RemiseCheque extends CommonObject
 	 *	@param	string		$option		''=Create a specimen invoice with lines, 'nolines'=No lines
 	 *  @return	void
 	 */
-	function initAsSpecimen($option='')
+	function initAsSpecimen($option = '')
 	{
 		global $user,$langs,$conf;
 
@@ -1013,7 +1013,7 @@ class RemiseCheque extends CommonObject
      *  @param  int     $save_lastsearch_value    	-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return	string								Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
 	{
 		global $conf, $langs;
 
@@ -1064,7 +1064,7 @@ class RemiseCheque extends CommonObject
 	 *  @param	int		$mode       0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
 	 *  @return string				Libelle
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -1077,7 +1077,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
 	 */
-	function LibStatut($status,$mode=0)
+	function LibStatut($status, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage

+ 13 - 13
htdocs/compta/paiement/class/paiement.class.php

@@ -157,7 +157,7 @@ class Paiement extends CommonObject
 	 *    @param	int		$fk_bank	Id of bank line associated to payment
 	 *    @return   int		            <0 if KO, 0 if not found, >0 if OK
 	 */
-	public function fetch($id, $ref='', $fk_bank='')
+	public function fetch($id, $ref = '', $fk_bank = '')
 	{
 		$sql = 'SELECT p.rowid, p.ref, p.datep as dp, p.amount, p.statut, p.ext_payment_id, p.ext_payment_site, p.fk_bank,';
 		$sql.= ' c.code as type_code, c.libelle as type_libelle,';
@@ -224,7 +224,7 @@ class Paiement extends CommonObject
 	 *    @param    int		$closepaidinvoices   	1=Also close payed invoices to paid, 0=Do nothing more
 	 *    @return   int                 			id of created payment, < 0 if error
 	 */
-	function create($user, $closepaidinvoices=0)
+	function create($user, $closepaidinvoices = 0)
 	{
 		global $conf, $langs;
 
@@ -488,7 +488,7 @@ class Paiement extends CommonObject
 	 *  @param	int		$notrigger		No trigger
 	 *  @return int     				<0 si ko, >0 si ok
 	 */
-	function delete($notrigger=0)
+	function delete($notrigger = 0)
 	{
 		global $conf, $user, $langs;
 
@@ -598,7 +598,7 @@ class Paiement extends CommonObject
      *      @param	int		$notrigger			No trigger
      *      @return int                 		<0 if KO, bank_line_id if OK
      */
-    function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque,$notrigger=0)
+    function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque, $notrigger = 0)
     {
         global $conf,$langs,$user;
 
@@ -897,7 +897,7 @@ class Paiement extends CommonObject
 	 *	  @param	User	$user		User making validation
 	 *    @return   int     			<0 if KO, >0 if OK
 	 */
-	function valide(User $user=null)
+	function valide(User $user = null)
 	{
 		$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 1 WHERE rowid = '.$this->id;
 
@@ -921,7 +921,7 @@ class Paiement extends CommonObject
 	 *	  @param	User	$user		User making reject
 	 *    @return   int     			<0 if KO, >0 if OK
 	 */
-	function reject(User $user=null)
+	function reject(User $user = null)
 	{
 		$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 2 WHERE rowid = '.$this->id;
 
@@ -989,7 +989,7 @@ class Paiement extends CommonObject
 	 *  @param	string	$filter         Critere de filtre
 	 *  @return array					Tableau des id de factures
 	 */
-	function getBillsArray($filter='')
+	function getBillsArray($filter = '')
 	{
 		$sql = 'SELECT fk_facture';
 		$sql.= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'facture as f';
@@ -1027,7 +1027,7 @@ class Paiement extends CommonObject
 	 *      @param     string		$mode		'next' for next value or 'last' for last value
 	 *      @return    string					free ref or last ref
 	 */
-	function getNextNumRef($soc,$mode='next')
+	function getNextNumRef($soc, $mode = 'next')
 	{
 		global $conf, $db, $langs;
 		$langs->load("bills");
@@ -1138,7 +1138,7 @@ class Paiement extends CommonObject
 	 *	@param	string		$option		''=Create a specimen invoice with lines, 'nolines'=No lines
 	 *  @return	void
 	 */
-	function initAsSpecimen($option='')
+	function initAsSpecimen($option = '')
 	{
 		global $user,$langs,$conf;
 
@@ -1164,7 +1164,7 @@ class Paiement extends CommonObject
      *  @param	int  	$notooltip		1=Disable tooltip
 	 *	@return	string					Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $mode='withlistofinvoices', $notooltip=0)
+	function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0)
 	{
 		global $conf, $langs;
 
@@ -1222,7 +1222,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -1235,7 +1235,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
 	 */
-	function LibStatut($status,$mode=0)
+	function LibStatut($status, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage
@@ -1286,7 +1286,7 @@ class Paiement extends CommonObject
 	 *	@param		int		$force_thirdparty_id	Force thirdparty id
 	 *	@return		int								<0 if KO, >0 if OK
 	 */
-	function fetch_thirdparty($force_thirdparty_id=0)
+	function fetch_thirdparty($force_thirdparty_id = 0)
 	{
         // phpcs:enable
 		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';

+ 12 - 12
htdocs/compta/prelevement/class/bonprelevement.class.php

@@ -81,7 +81,7 @@ class BonPrelevement extends CommonObject
 	 *  @param		DoliDB		$db      	Database handler
 	 *  @param		string		$filename	Filename of withdraw receipt
 	 */
-	function __construct($db, $filename='')
+	function __construct($db, $filename = '')
 	{
 		global $conf,$langs;
 
@@ -276,7 +276,7 @@ class BonPrelevement extends CommonObject
 	 *  @param	string	$ref		Ref of direct debit
 	 *	@return	int					>0 if OK, <0 if KO
 	 */
-	function fetch($rowid, $ref='')
+	function fetch($rowid, $ref = '')
 	{
 		global $conf;
 
@@ -630,7 +630,7 @@ class BonPrelevement extends CommonObject
 	 *  @param 	int		$amounts 	If you want to get the amount of the order for each invoice
 	 *	@return	array 				Id of invoices
 	 */
-	private function getListInvoices($amounts=0)
+	private function getListInvoices($amounts = 0)
 	{
 		global $conf;
 
@@ -731,7 +731,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	int		$agence		dolibarr mysoc agence
 	 *	@return	int					<O if KO, number of invoices if OK
 	 */
-	function NbFactureAPrelever($banque=0,$agence=0)
+	function NbFactureAPrelever($banque = 0, $agence = 0)
 	{
         // phpcs:enable
 		global $conf;
@@ -777,7 +777,7 @@ class BonPrelevement extends CommonObject
          * @param       string  $executiondate	Date to execute the transfer
 	 *	@return	int					<0 if KO, nbre of invoice withdrawed if OK
 	 */
-	function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='')
+	function Create($banque = 0, $agence = 0, $mode = 'real', $format = 'ALL', $executiondate = '')
 	{
         // phpcs:enable
 		global $conf,$langs;
@@ -1138,7 +1138,7 @@ class BonPrelevement extends CommonObject
 	 *  @param	User	$user		Object user that delete
 	 *	@return	int					>0 if OK, <0 if KO
 	 */
-	function delete($user=null)
+	function delete($user = null)
 	{
 		$this->db->begin();
 
@@ -1178,7 +1178,7 @@ class BonPrelevement extends CommonObject
 	 *	@param	string	$option		link target
 	 *	@return	string				URL of target
 	 */
-	function getNomUrl($withpicto=0,$option='')
+	function getNomUrl($withpicto = 0, $option = '')
 	{
 		global $langs;
 
@@ -1299,7 +1299,7 @@ class BonPrelevement extends CommonObject
          * @param string $executiondate		Date to execute transfer
 	 *	@return		int					0 if OK, <0 if KO
 	 */
-	function generate($format='ALL',$executiondate='')
+	function generate($format = 'ALL', $executiondate = '')
 	{
 		global $conf,$langs,$mysoc;
 
@@ -1493,7 +1493,7 @@ class BonPrelevement extends CommonObject
 	 *  @param	string	$rib_dom		rib domiciliation
 	 *	@return	void
 	 */
-	function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom='')
+	function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $ref, $facid, $rib_dom = '')
 	{
         // phpcs:enable
 		fputs($this->file, "06");
@@ -1726,7 +1726,7 @@ class BonPrelevement extends CommonObject
 	 *  @param	string	$format			FRST or RCUR or ALL
 	 *	@return	string					String with SEPA Sender
 	 */
-	function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n', $format='FRST')
+	function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf = '\n', $format = 'FRST')
 	{
         // phpcs:enable
 		// SEPA INITIALISATION
@@ -1905,7 +1905,7 @@ class BonPrelevement extends CommonObject
 	 *    @param    int		$mode   0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
 	 * 	  @return	string     		Label
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -1918,7 +1918,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
 	 */
-	function LibStatut($statut,$mode=0)
+	function LibStatut($statut, $mode = 0)
 	{
         // phpcs:enable
 		if (empty($this->labelstatut))

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

@@ -123,7 +123,7 @@ class LignePrelevement
 	 *    @param	int		$mode       0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
 	 * 	  @return   string      		Label
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -136,7 +136,7 @@ class LignePrelevement
 	 *    @param    int		$mode       0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
 	 * 	  @return   string      		Label
 	 */
-	function LibStatut($statut,$mode=0)
+	function LibStatut($statut, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;

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

@@ -82,7 +82,7 @@ class RejetPrelevement
 	 * @param 	int			$facturation		Facturation
 	 * @return	void
 	 */
-	function create($user, $id, $motif, $date_rejet, $bonid, $facturation=0)
+	function create($user, $id, $motif, $date_rejet, $bonid, $facturation = 0)
 	{
 		global $langs,$conf;
 
@@ -282,7 +282,7 @@ class RejetPrelevement
 	 * @return	array				Array List of invoices related to the withdrawal line
 	 * @TODO	A withdrawal line is today linked to one and only one invoice. So the function should return only one object ?
 	 */
-	private function getListInvoices($amounts=0)
+	private function getListInvoices($amounts = 0)
 	{
 		global $conf;
 

+ 5 - 5
htdocs/compta/salaries/class/paymentsalary.class.php

@@ -108,7 +108,7 @@ class PaymentSalary extends CommonObject
 	 * @param	int		$notrigger	    0=no, 1=yes (no update trigger)
 	 * @return  int         			<0 if KO, >0 if OK
 	 */
-	function update($user=null, $notrigger=0)
+	function update($user = null, $notrigger = 0)
 	{
 		global $conf, $langs;
 
@@ -189,7 +189,7 @@ class PaymentSalary extends CommonObject
 	 *  @param  User	$user       User that load
 	 *  @return int         		<0 if KO, >0 if OK
 	 */
-	function fetch($id, $user=null)
+	function fetch($id, $user = null)
 	{
 		global $langs;
 		$sql = "SELECT";
@@ -544,7 +544,7 @@ class PaymentSalary extends CommonObject
      *  @param  int     $save_lastsearch_value    	-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return	string								Chaine with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
 	{
 		global $db, $conf, $langs, $hookmanager;
 		global $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -652,7 +652,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 	    return $this->LibStatut($this->statut,$mode);
 	}
@@ -665,7 +665,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
 	 */
-	function LibStatut($status,$mode=0)
+	function LibStatut($status, $mode = 0)
 	{
         // phpcs:enable
 	    global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage

+ 3 - 3
htdocs/compta/salaries/class/salariesstats.class.php

@@ -49,7 +49,7 @@ class SalariesStats extends Stats
 	 * @param   mixed       $userid    Id user for filter or array of user ids
 	 * @return  void
 	 */
-	function __construct($db, $socid=0, $userid=0)
+	function __construct($db, $socid = 0, $userid = 0)
 	{
 		global $conf;
 
@@ -94,7 +94,7 @@ class SalariesStats extends Stats
 	 *	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 *	@return	array				Array of values
 	 */
-	function getNbByMonth($year, $format=0)
+	function getNbByMonth($year, $format = 0)
 	{
 		$sql = "SELECT MONTH(datep) as dm, count(*)";
 		$sql.= " FROM ".$this->from;
@@ -116,7 +116,7 @@ class SalariesStats extends Stats
 	*	@param	int		$format		0=Label of absiss is a translated text, 1=Label of absiss is month number, 2=Label of absiss is first letter of month
 	 *	@return	array				Array of values
 	 */
-	function getAmountByMonth($year, $format=0)
+	function getAmountByMonth($year, $format = 0)
 	{
 		$sql = "SELECT date_format(datep,'%m') as dm, sum(".$this->field.")";
 		$sql.= " FROM ".$this->from;

+ 3 - 3
htdocs/compta/sociales/class/cchargesociales.class.php

@@ -404,7 +404,7 @@ class Cchargesociales
      *  @param  string  $morecss            Add more css on link
 	 *	@return	string						String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $notooltip=0, $maxlen=24, $morecss='')
+	function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '')
 	{
 		global $langs, $conf, $db;
         global $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -438,7 +438,7 @@ class Cchargesociales
 	 *  @param	int		$mode          0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
 	 *  @return	string 			       Label of status
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->status,$mode);
 	}
@@ -451,7 +451,7 @@ class Cchargesociales
 	 *  @param  int		$mode          	0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
 	 *  @return string 			       	Label of status
 	 */
-	function LibStatut($status,$mode=0)
+	function LibStatut($status, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;

+ 4 - 4
htdocs/compta/sociales/class/chargesociales.class.php

@@ -93,7 +93,7 @@ class ChargeSociales extends CommonObject
      *  @param	string  $ref	Ref
      *  @return	int <0 KO >0 OK
      */
-    function fetch($id, $ref='')
+    function fetch($id, $ref = '')
     {
         $sql = "SELECT cs.rowid, cs.date_ech";
         $sql.= ", cs.libelle as lib, cs.fk_type, cs.amount, cs.fk_projet as fk_project, cs.paye, cs.periode, cs.import_key";
@@ -419,7 +419,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
      */
-    function getLibStatut($mode=0,$alreadypaid=-1)
+    function getLibStatut($mode = 0, $alreadypaid = -1)
     {
         return $this->LibStatut($this->paye,$mode,$alreadypaid);
     }
@@ -433,7 +433,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
      */
-    function LibStatut($statut,$mode=0,$alreadypaid=-1)
+    function LibStatut($statut, $mode = 0, $alreadypaid = -1)
     {
         // phpcs:enable
         global $langs;
@@ -491,7 +491,7 @@ class ChargeSociales extends CommonObject
      *  @param  int     $save_lastsearch_value		-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
      *	@return	string								String with link
      */
-    function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0, $short=0, $save_lastsearch_value=-1)
+    function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $short = 0, $save_lastsearch_value = -1)
     {
     	global $langs, $conf, $user, $form;
 

+ 7 - 7
htdocs/compta/sociales/class/paymentsocialcontribution.class.php

@@ -104,7 +104,7 @@ class PaymentSocialContribution extends CommonObject
 	 *	@param		int		$closepaidcontrib   	1=Also close payed contributions to paid, 0=Do nothing more
 	 *  @return     int     						<0 if KO, id of payment if OK
 	 */
-	function create($user, $closepaidcontrib=0)
+	function create($user, $closepaidcontrib = 0)
 	{
 		global $conf, $langs;
 
@@ -292,7 +292,7 @@ class PaymentSocialContribution extends CommonObject
 	 *  @param  int		$notrigger	    0=launch triggers after, 1=disable triggers
 	 *  @return int         			<0 if KO, >0 if OK
 	 */
-	function update($user=null, $notrigger=0)
+	function update($user = null, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -379,7 +379,7 @@ class PaymentSocialContribution extends CommonObject
 	 *  @param  int		$notrigger		0=launch triggers after, 1=disable triggers
 	 *  @return int						<0 if KO, >0 if OK
 	 */
-	function delete($user, $notrigger=0)
+	function delete($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -540,7 +540,7 @@ class PaymentSocialContribution extends CommonObject
      *      @param  string	$emetteur_banque    Name of bank
      *      @return int                 		<0 if KO, >0 if OK
      */
-    function addPaymentToBank($user,$mode,$label,$accountid,$emetteur_nom,$emetteur_banque)
+    function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque)
     {
         global $conf;
 
@@ -656,7 +656,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
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 		return $this->LibStatut($this->statut,$mode);
 	}
@@ -669,7 +669,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
 	 */
-	function LibStatut($status,$mode=0)
+	function LibStatut($status, $mode = 0)
 	{
         // phpcs:enable
 		global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage
@@ -720,7 +720,7 @@ class PaymentSocialContribution extends CommonObject
 	 * 	@param	int		$maxlen			Longueur max libelle
 	 *	@return	string					Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0,$maxlen=0)
+	function getNomUrl($withpicto = 0, $maxlen = 0)
 	{
 		global $langs;
 

+ 5 - 5
htdocs/compta/tva/class/tva.class.php

@@ -173,7 +173,7 @@ class Tva extends CommonObject
      * @param	int		$notrigger	    0=no, 1=yes (no update trigger)
      * @return  int         			<0 if KO, >0 if OK
      */
-    function update($user, $notrigger=0)
+    function update($user, $notrigger = 0)
     {
     	global $conf, $langs;
 
@@ -241,7 +241,7 @@ class Tva extends CommonObject
      *  @param  User	$user       User that load
      *  @return int         		<0 if KO, >0 if OK
      */
-    function fetch($id, $user=null)
+    function fetch($id, $user = null)
     {
     	global $langs;
         $sql = "SELECT";
@@ -687,7 +687,7 @@ class Tva extends CommonObject
      *  @param	string	$morecss			More CSS
 	 *	@return	string					Chaine with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='')
+	function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '')
 	{
 		global $langs, $conf;
 
@@ -813,7 +813,7 @@ class Tva extends CommonObject
 	 * @param	int		$mode       0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
 	 * @return  string				Libelle
 	 */
-	function getLibStatut($mode=0)
+	function getLibStatut($mode = 0)
 	{
 	    return $this->LibStatut($this->statut,$mode);
 	}
@@ -826,7 +826,7 @@ class Tva extends CommonObject
 	 * @param   int		$mode       0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
 	 * @return	string  		    Libelle du statut
 	 */
-    function LibStatut($status,$mode=0)
+    function LibStatut($status, $mode = 0)
     {
         // phpcs:enable
         global $langs;	// TODO Renvoyer le libelle anglais et faire traduction a affichage

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

@@ -313,7 +313,7 @@ class Contact extends CommonObject
 	 *      @param		int		$nosyncuser		No sync linked user (external users and contacts are linked)
 	 *      @return     int      			   	<0 if KO, >0 if OK
 	 */
-	function update($id, $user=null, $notrigger=0, $action='update', $nosyncuser=0)
+	function update($id, $user = null, $notrigger = 0, $action = 'update', $nosyncuser = 0)
 	{
 		global $conf, $langs, $hookmanager;
 
@@ -501,7 +501,7 @@ class Contact extends CommonObject
 	 *									2=Return key only (uid=qqq)
 	 *	@return		string				DN
 	 */
-	function _load_ldap_dn($info,$mode=0)
+	function _load_ldap_dn($info, $mode = 0)
 	{
         // phpcs:enable
 		global $conf;
@@ -597,7 +597,7 @@ class Contact extends CommonObject
 	 *  @param      int		    $notrigger	0=no, 1=yes
      *  @return     int         			<0 if KO, >=0 if OK
 	 */
-	function update_perso($id, $user=null, $notrigger=0)
+	function update_perso($id, $user = null, $notrigger = 0)
 	{
         // phpcs:enable
 	    $error=0;
@@ -686,7 +686,7 @@ class Contact extends CommonObject
      *  @param		string	$email		Email
 	 *  @return     int     		    -1 if KO, 0 if OK but not found, 1 if OK
 	 */
-	function fetch($id, $user=null, $ref_ext='', $email='')
+	function fetch($id, $user = null, $ref_ext = '', $email = '')
 	{
 		global $langs;
 
@@ -931,7 +931,7 @@ class Contact extends CommonObject
 	 *   	@param		int		$notrigger		Disable all trigger
 	 *		@return		int						<0 if KO, >0 if OK
 	 */
-	function delete($notrigger=0)
+	function delete($notrigger = 0)
 	{
 		global $conf, $langs, $user;
 
@@ -1124,7 +1124,7 @@ class Contact extends CommonObject
 	 *	@param		int			$notooltip					1=Disable tooltip
 	 *	@return		string									String with URL
 	 */
-	function getNomUrl($withpicto=0, $option='', $maxlen=0, $moreparam='', $save_lastsearch_value=-1, $notooltip=0)
+	function getNomUrl($withpicto = 0, $option = '', $maxlen = 0, $moreparam = '', $save_lastsearch_value = -1, $notooltip = 0)
 	{
 		global $conf, $langs, $hookmanager;
 
@@ -1231,7 +1231,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
 	 */
-	function LibStatut($statut,$mode)
+	function LibStatut($statut, $mode)
 	{
         // phpcs:enable
 		global $langs;

+ 2 - 2
htdocs/contrat/class/api_contracts.class.php

@@ -555,7 +555,7 @@ class Contracts extends DolibarrApi
      *   "notrigger": 0
      * }
      */
-    function validate($id, $notrigger=0)
+    function validate($id, $notrigger = 0)
     {
         if (! DolibarrApiAccess::$user->rights->contrat->creer) {
 			throw new RestException(401);
@@ -601,7 +601,7 @@ class Contracts extends DolibarrApi
      *   "notrigger": 0
      * }
      */
-    function close($id, $notrigger=0)
+    function close($id, $notrigger = 0)
     {
     	if (! DolibarrApiAccess::$user->rights->contrat->creer) {
     		throw new RestException(401);

+ 22 - 22
htdocs/contrat/class/contrat.class.php

@@ -261,7 +261,7 @@ class Contrat extends CommonObject
 	 * 	@param	string		$comment	A comment typed by user
 	 *  @return int         			<0 if KO, >0 if OK
 	 */
-	function active_line($user, $line_id, $date, $date_end='', $comment='')
+	function active_line($user, $line_id, $date, $date_end = '', $comment = '')
 	{
         // phpcs:enable
 		$result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment);
@@ -284,7 +284,7 @@ class Contrat extends CommonObject
 	 * 	@param	string		$comment	A comment typed by user
 	 *  @return int         			<0 if KO, >0 if OK
 	 */
-	function close_line($user, $line_id, $date_end, $comment='')
+	function close_line($user, $line_id, $date_end, $comment = '')
 	{
         // phpcs:enable
 		$result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment);
@@ -307,7 +307,7 @@ class Contrat extends CommonObject
 	 *	@return	int							<0 if KO, >0 if OK
 	 *  @see closeAll
 	 */
-	function activateAll($user, $date_start='', $notrigger=0, $comment='')
+	function activateAll($user, $date_start = '', $notrigger = 0, $comment = '')
 	{
 		if (empty($date_start)) $date_start = dol_now();
 
@@ -363,7 +363,7 @@ class Contrat extends CommonObject
 	 * @return	int							<0 if KO, >0 if OK
 	 * @see activateAll
 	 */
-	function closeAll(User $user, $notrigger=0, $comment='')
+	function closeAll(User $user, $notrigger = 0, $comment = '')
 	{
 		$this->db->begin();
 
@@ -419,7 +419,7 @@ class Contrat extends CommonObject
      * @param	int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 * @return	int						<0 if KO, >0 if OK
 	 */
-	function validate(User $user, $force_number='', $notrigger=0)
+	function validate(User $user, $force_number = '', $notrigger = 0)
 	{
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 		global $langs, $conf;
@@ -547,7 +547,7 @@ class Contrat extends CommonObject
      * @param	int		$notrigger		1=Does not execute triggers, 0=execute triggers
 	 * @return	int						<0 if KO, >0 if OK
 	 */
-	function reopen($user, $notrigger=0)
+	function reopen($user, $notrigger = 0)
 	{
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
 		global $langs, $conf;
@@ -614,7 +614,7 @@ class Contrat extends CommonObject
 	 *    @param	string	$ref_supplier	Supplier ref
 	 *    @return   int     				<0 if KO, 0 if not found, Id of contract if OK
 	 */
-	function fetch($id, $ref='', $ref_customer='', $ref_supplier='')
+	function fetch($id, $ref = '', $ref_customer = '', $ref_supplier = '')
 	{
 		$sql = "SELECT rowid, statut, ref, fk_soc, mise_en_service as datemise,";
 		$sql.= " ref_supplier, ref_customer,";
@@ -1242,7 +1242,7 @@ class Contrat extends CommonObject
 	 *  @param  int		$notrigger	 0=launch triggers after, 1=disable triggers
 	 *  @return int     		   	 <0 if KO, >0 if OK
 	 */
-	function update($user, $notrigger=0)
+	function update($user, $notrigger = 0)
 	{
 		global $conf, $langs;
 		$error=0;
@@ -1360,7 +1360,7 @@ class Contrat extends CommonObject
 	 * 	@param 	string		$rang 				Position
 	 *  @return int             				<0 if KO, >0 if OK
 	 */
-	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type='HT', $pu_ttc=0.0, $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0, $fk_unit = null, $rang=0)
+	function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $remise_percent, $date_start, $date_end, $price_base_type = 'HT', $pu_ttc = 0.0, $info_bits = 0, $fk_fournprice = null, $pa_ht = 0, $array_options = 0, $fk_unit = null, $rang = 0)
 	{
 		global $user, $langs, $conf, $mysoc;
 		$error=0;
@@ -1570,7 +1570,7 @@ class Contrat extends CommonObject
 	 * 	@param 	string		$fk_unit 			Code of the unit to use. Null to use the default one
 	 *  @return int              				< 0 si erreur, > 0 si ok
 	 */
-	function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx=0.0, $localtax2tx=0.0, $date_debut_reel='', $date_fin_reel='', $price_base_type='HT', $info_bits=0, $fk_fournprice=null, $pa_ht = 0,$array_options=0, $fk_unit = null)
+	function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $tvatx, $localtax1tx = 0.0, $localtax2tx = 0.0, $date_debut_reel = '', $date_fin_reel = '', $price_base_type = 'HT', $info_bits = 0, $fk_fournprice = null, $pa_ht = 0, $array_options = 0, $fk_unit = null)
 	{
 		global $user, $conf, $langs, $mysoc;
 
@@ -1840,7 +1840,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
 	 */
-	function LibStatut($statut,$mode)
+	function LibStatut($statut, $mode)
 	{
         // phpcs:enable
 		global $langs;
@@ -1909,7 +1909,7 @@ class Contrat extends CommonObject
      *  @param  int     $save_lastsearch_value		-1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
 	 *	@return	string								Chaine avec URL
 	 */
-	function getNomUrl($withpicto=0, $maxlength=0, $notooltip=0, $save_lastsearch_value=-1)
+	function getNomUrl($withpicto = 0, $maxlength = 0, $notooltip = 0, $save_lastsearch_value = -1)
 	{
 		global $conf, $langs, $user;
 
@@ -2022,7 +2022,7 @@ class Contrat extends CommonObject
 	 *  @param	int		$statut     Status of lines to get
 	 *  @return array       		Array of line's rowid
 	 */
-	function array_detail($statut=-1)
+	function array_detail($statut = -1)
 	{
         // phpcs:enable
 		$tab=array();
@@ -2059,7 +2059,7 @@ class Contrat extends CommonObject
 	 *	@param	string		$option		'all' or 'others'
 	 *  @return array   				Array of contracts id
 	 */
-	function getListOfContracts($option='all')
+	function getListOfContracts($option = 'all')
 	{
 		$tab=array();
 
@@ -2100,7 +2100,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
 	 */
-	function load_board($user,$mode)
+	function load_board($user, $mode)
 	{
         // phpcs:enable
 		global $conf, $langs;
@@ -2336,7 +2336,7 @@ class Contrat extends CommonObject
          *  @param   null|array  $moreparams     Array to provide more information
 	 * 	@return     int         				0 if KO, 1 if OK
 	 */
-	public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
+	public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
 	{
 		global $conf,$langs;
 
@@ -2382,7 +2382,7 @@ class Contrat extends CommonObject
 	 * @param int $notrigger	1=Does not execute triggers, 0= execute triggers
 	 * @return int New id of clone
 	 */
-    function createFromClone($socid = 0, $notrigger=0)
+    function createFromClone($socid = 0, $notrigger = 0)
     {
 		global $db, $user, $langs, $conf, $hookmanager, $extrafields;
 
@@ -2658,7 +2658,7 @@ class ContratLigne extends CommonObjectLine
 	 *  @param	string	$moreatt	More attribute
 	 *  @return string      		Libelle
 	 */
-	static function LibStatut($statut,$mode,$expired=-1,$moreatt='')
+	static function LibStatut($statut, $mode, $expired = -1, $moreatt = '')
 	{
         // phpcs:enable
 		global $langs;
@@ -2720,7 +2720,7 @@ class ContratLigne extends CommonObjectLine
 	 *  @param	int		$maxlength		Max length
 	 *  @return	string					Chaine avec URL
  	 */
-	function getNomUrl($withpicto=0,$maxlength=0)
+	function getNomUrl($withpicto = 0, $maxlength = 0)
 	{
 		global $langs;
 
@@ -2747,7 +2747,7 @@ class ContratLigne extends CommonObjectLine
 	 * 		@param	string	$ref		Ref of contract
 	 *    	@return int         		<0 if KO, >0 if OK
 	 */
-	function fetch($id, $ref='')
+	function fetch($id, $ref = '')
 	{
 
 		// Check parameters
@@ -2879,7 +2879,7 @@ class ContratLigne extends CommonObjectLine
 	 *      @param  int		$notrigger	    0=no, 1=yes (no update trigger)
 	 *      @return int         			<0 if KO, >0 if OK
 	 */
-	function update($user, $notrigger=0)
+	function update($user, $notrigger = 0)
 	{
 		global $conf, $langs, $mysoc;
 
@@ -3257,7 +3257,7 @@ class ContratLigne extends CommonObjectLine
      * @param    int	$notrigger		1=Does not execute triggers, 0=Execute triggers
 	 * @return int                    	<0 if KO, >0 if OK
 	 */
-	function close_line($user, $date_end, $comment = '', $notrigger=0)
+	function close_line($user, $date_end, $comment = '', $notrigger = 0)
 	{
         // phpcs:enable
 		global $langs, $conf;

+ 1 - 1
htdocs/core/ajax/ajaxdirtree.php

@@ -337,7 +337,7 @@ if ((! isset($mode) || $mode != 'noajax') && is_object($db)) $db->close();
  * @param	int		$depth					Depth
  * @return	void
  */
-function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, $modulepart, $websitekey, $pageid, $preopened, $fullpathpreopened, $depth=0)
+function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, $modulepart, $websitekey, $pageid, $preopened, $fullpathpreopened, $depth = 0)
 {
 	global $conf, $db, $langs, $form;
 	global $dolibarr_main_data_root;

+ 3 - 3
htdocs/core/boxes/box_actions.php

@@ -54,7 +54,7 @@ class box_actions extends ModeleBoxes
 	 *  @param  DoliDB	$db      	Database handler
 	 *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param='')
+	function __construct($db, $param = '')
 	{
 	    global $user;
 
@@ -69,7 +69,7 @@ class box_actions extends ModeleBoxes
      *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 
@@ -189,7 +189,7 @@ class box_actions extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		global $langs, $conf;
 		$out = parent::showBox($this->info_box_head, $this->info_box_contents);

+ 3 - 3
htdocs/core/boxes/box_activity.php

@@ -53,7 +53,7 @@ class box_activity extends ModeleBoxes
      *  @param  DoliDB  $db         Database handler
      *  @param  string  $param      More parameters
      */
-    function __construct($db,$param)
+    function __construct($db, $param)
     {
         global $conf, $user;
 
@@ -74,7 +74,7 @@ class box_activity extends ModeleBoxes
      *  @param  int     $max        Maximum number of records to load
      *  @return void
      */
-    function loadBox($max=5)
+    function loadBox($max = 5)
     {
         global $conf, $user, $langs, $db;
 
@@ -457,7 +457,7 @@ class box_activity extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_bookmarks.php

@@ -50,7 +50,7 @@ class box_bookmarks extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $user;
 
@@ -65,7 +65,7 @@ class box_bookmarks extends ModeleBoxes
      *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 		$langs->load("boxes");
@@ -157,7 +157,7 @@ class box_bookmarks extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_clients.php

@@ -54,7 +54,7 @@ class box_clients extends ModeleBoxes
 	 *  @param  DoliDB	$db      	Database handler
      *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param='')
+	function __construct($db, $param = '')
 	{
 		global $conf, $user;
 
@@ -72,7 +72,7 @@ class box_clients extends ModeleBoxes
      *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 		$langs->load("boxes");
@@ -173,7 +173,7 @@ class box_clients extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_commandes.php

@@ -54,7 +54,7 @@ class box_commandes extends ModeleBoxes
      *  @param  DoliDB  $db         Database handler
      *  @param  string  $param      More parameters
      */
-    function __construct($db,$param)
+    function __construct($db, $param)
     {
         global $user;
 
@@ -69,7 +69,7 @@ class box_commandes extends ModeleBoxes
      *  @param	int		$max        Maximum number of records to load
      *  @return	void
      */
-    function loadBox($max=5)
+    function loadBox($max = 5)
     {
         global $user, $langs, $db, $conf;
 
@@ -198,7 +198,7 @@ class box_commandes extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
         return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
     }

+ 3 - 3
htdocs/core/boxes/box_comptes.php

@@ -56,7 +56,7 @@ class box_comptes extends ModeleBoxes
 	 *  @param  DoliDB	$db      	Database handler
      *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param='')
+	function __construct($db, $param = '')
 	{
 		global $conf, $user;
 
@@ -75,7 +75,7 @@ class box_comptes extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 
@@ -184,7 +184,7 @@ class box_comptes extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_contacts.php

@@ -56,7 +56,7 @@ class box_contacts extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $user;
 
@@ -71,7 +71,7 @@ class box_contacts extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 		$langs->load("boxes");
@@ -185,7 +185,7 @@ class box_contacts extends ModeleBoxes
 	 *	@param	int	$nooutput	No print, only return string
 	 *	@return	string
 	 */
-	function showBox($head = null, $contents = null, $nooutput=0)
+	function showBox($head = null, $contents = null, $nooutput = 0)
 	{
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_contracts.php

@@ -53,7 +53,7 @@ class box_contracts extends ModeleBoxes
      *  @param  DoliDB  $db         Database handler
      *  @param  string  $param      More parameters
      */
-    function __construct($db,$param)
+    function __construct($db, $param)
     {
         global $user;
 
@@ -68,7 +68,7 @@ class box_contracts extends ModeleBoxes
      *  @param	int		$max        Maximum number of records to load
      *  @return	void
      */
-    function loadBox($max=5)
+    function loadBox($max = 5)
     {
     	global $user, $langs, $db, $conf;
 
@@ -189,7 +189,7 @@ class box_contracts extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
         return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
     }

+ 3 - 3
htdocs/core/boxes/box_external_rss.php

@@ -56,7 +56,7 @@ class box_external_rss extends ModeleBoxes
      * 	@param	DoliDB	$db			Database handler
      *  @param	string	$param		More parameters
      */
-    function __construct($db,$param)
+    function __construct($db, $param)
     {
 		$this->db=$db;
 		$this->paramdef=$param;
@@ -69,7 +69,7 @@ class box_external_rss extends ModeleBoxes
      *  @param	int		$cachedelay		Delay we accept for cache file
      *  @return	void
      */
-    function loadBox($max=5, $cachedelay=3600)
+    function loadBox($max = 5, $cachedelay = 3600)
     {
         global $user, $langs, $conf;
         $langs->load("boxes");
@@ -195,7 +195,7 @@ class box_external_rss extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
         return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
     }

+ 3 - 3
htdocs/core/boxes/box_factures.php

@@ -52,7 +52,7 @@ class box_factures extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $user;
 
@@ -67,7 +67,7 @@ class box_factures extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -209,7 +209,7 @@ class box_factures extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_factures_fourn.php

@@ -53,7 +53,7 @@ class box_factures_fourn extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $user;
 
@@ -68,7 +68,7 @@ class box_factures_fourn extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -214,7 +214,7 @@ class box_factures_fourn extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_factures_fourn_imp.php

@@ -52,7 +52,7 @@ class box_factures_fourn_imp extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $user;
 
@@ -67,7 +67,7 @@ class box_factures_fourn_imp extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -201,7 +201,7 @@ class box_factures_fourn_imp extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_factures_imp.php

@@ -55,7 +55,7 @@ class box_factures_imp extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $user;
 
@@ -70,7 +70,7 @@ class box_factures_imp extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -207,7 +207,7 @@ class box_factures_imp extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_ficheinter.php

@@ -53,7 +53,7 @@ class box_ficheinter extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $user;
 
@@ -68,7 +68,7 @@ class box_ficheinter extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
 	 *  @return	void
 	*/
-	function loadBox($max=10)
+	function loadBox($max = 10)
 	{
 		global $user, $langs, $db, $conf;
 
@@ -166,7 +166,7 @@ class box_ficheinter extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_fournisseurs.php

@@ -53,7 +53,7 @@ class box_fournisseurs extends ModeleBoxes
      *  @param  DoliDB  $db         Database handler
      *  @param  string  $param      More parameters
      */
-    function __construct($db,$param)
+    function __construct($db, $param)
     {
         global $user;
 
@@ -68,7 +68,7 @@ class box_fournisseurs extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
      */
-    function loadBox($max=5)
+    function loadBox($max = 5)
     {
         global $conf, $user, $langs, $db;
         $langs->load("boxes");
@@ -160,7 +160,7 @@ class box_fournisseurs extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
         return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
     }

+ 3 - 3
htdocs/core/boxes/box_goodcustomers.php

@@ -55,7 +55,7 @@ class box_goodcustomers extends ModeleBoxes
 	 *  @param  DoliDB	$db      	Database handler
      *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param='')
+	function __construct($db, $param = '')
 	{
 		global $conf, $user;
 
@@ -74,7 +74,7 @@ class box_goodcustomers extends ModeleBoxes
      *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 		$langs->load("boxes");
@@ -169,7 +169,7 @@ class box_goodcustomers extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_graph_invoices_permonth.php

@@ -48,7 +48,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
 	 * 	@param	DoliDB	$db			Database handler
 	 *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 		global $user;
 
@@ -63,7 +63,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -275,7 +275,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_graph_invoices_supplier_permonth.php

@@ -48,7 +48,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
 	 * 	@param	DoliDB	$db			Database handler
 	 *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 		global $user;
 
@@ -63,7 +63,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -274,7 +274,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_graph_orders_permonth.php

@@ -48,7 +48,7 @@ class box_graph_orders_permonth extends ModeleBoxes
 	 * 	@param	DoliDB	$db			Database handler
 	 *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 		global $user;
 
@@ -63,7 +63,7 @@ class box_graph_orders_permonth extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -273,7 +273,7 @@ class box_graph_orders_permonth extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_graph_orders_supplier_permonth.php

@@ -48,7 +48,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
 	 * 	@param	DoliDB	$db			Database handler
 	 *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 		global $user;
 
@@ -63,7 +63,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -272,7 +272,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_graph_product_distribution.php

@@ -51,7 +51,7 @@ class box_graph_product_distribution extends ModeleBoxes
 	 * 	@param	DoliDB	$db			Database handler
 	 *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 		global $user, $conf;
 
@@ -70,7 +70,7 @@ class box_graph_product_distribution extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -412,7 +412,7 @@ class box_graph_product_distribution extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_graph_propales_permonth.php

@@ -48,7 +48,7 @@ class box_graph_propales_permonth extends ModeleBoxes
 	 * 	@param	DoliDB	$db			Database handler
 	 *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 		global $user;
 
@@ -63,7 +63,7 @@ class box_graph_propales_permonth extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -276,7 +276,7 @@ class box_graph_propales_permonth extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 1 - 1
htdocs/core/boxes/box_last_modified_ticket.php

@@ -187,7 +187,7 @@ class box_last_modified_ticket extends ModeleBoxes
      *     @param  int   $nooutput No print, only return string
      *     @return string
      */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
         parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
     }

+ 1 - 1
htdocs/core/boxes/box_last_ticket.php

@@ -187,7 +187,7 @@ class box_last_ticket extends ModeleBoxes
      *     @param  int   $nooutput No print, only return string
      *     @return string
      */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
         parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
     }

+ 3 - 3
htdocs/core/boxes/box_lastlogin.php

@@ -53,7 +53,7 @@ class box_lastlogin extends ModeleBoxes
      *  @param  DoliDB  $db         Database handler
      *  @param  string  $param      More parameters
      */
-    function __construct($db,$param)
+    function __construct($db, $param)
     {
         global $conf;
 
@@ -66,7 +66,7 @@ class box_lastlogin extends ModeleBoxes
      *  @param  int     $max        Maximum number of records to load
      *  @return void
      */
-    function loadBox($max=5)
+    function loadBox($max = 5)
     {
         global $conf, $user, $langs, $db;
 
@@ -109,7 +109,7 @@ class box_lastlogin extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	void
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_members.php

@@ -55,7 +55,7 @@ class box_members extends ModeleBoxes
 	 *  @param  DoliDB	$db      	Database handler
      *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param='')
+	function __construct($db, $param = '')
 	{
 		global $conf, $user;
 
@@ -74,7 +74,7 @@ class box_members extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 		$langs->load("boxes");
@@ -178,7 +178,7 @@ class box_members extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_produits.php

@@ -55,7 +55,7 @@ class box_produits extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $conf, $user;
 
@@ -73,7 +73,7 @@ class box_produits extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf, $hookmanager;
 
@@ -226,7 +226,7 @@ class box_produits extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_produits_alerte_stock.php

@@ -57,7 +57,7 @@ class box_produits_alerte_stock extends ModeleBoxes
 	 *  @param  DoliDB	$db      	Database handler
 	 *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param='')
+	function __construct($db, $param = '')
 	{
 	    global $conf,$user;
 
@@ -75,7 +75,7 @@ class box_produits_alerte_stock extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf, $hookmanager;
 
@@ -238,7 +238,7 @@ class box_produits_alerte_stock extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
         return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_project.php

@@ -51,7 +51,7 @@ class box_project extends ModeleBoxes
      *  @param  DoliDB  $db         Database handler
      *  @param  string  $param      More parameters
      */
-    function __construct($db,$param='')
+    function __construct($db, $param = '')
     {
         global $user, $langs;
 
@@ -70,7 +70,7 @@ class box_project extends ModeleBoxes
 	*  @param   int		$max        Maximum number of records to load
 	*  @return  void
 	*/
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $conf, $user, $langs, $db;
 
@@ -195,7 +195,7 @@ class box_project extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_propales.php

@@ -54,7 +54,7 @@ class box_propales extends ModeleBoxes
      *  @param  DoliDB  $db         Database handler
      *  @param  string  $param      More parameters
      */
-    function __construct($db,$param)
+    function __construct($db, $param)
     {
         global $user;
 
@@ -69,7 +69,7 @@ class box_propales extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
      */
-    function loadBox($max=5)
+    function loadBox($max = 5)
     {
     	global $user, $langs, $db, $conf;
 
@@ -188,7 +188,7 @@ class box_propales extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
         return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
     }

+ 3 - 3
htdocs/core/boxes/box_prospect.php

@@ -56,7 +56,7 @@ class box_prospect extends ModeleBoxes
 	 *  @param  DoliDB	$db      	Database handler
      *  @param	string	$param		More parameters
 	 */
-	function __construct($db,$param='')
+	function __construct($db, $param = '')
 	{
 		global $conf, $user;
 
@@ -74,7 +74,7 @@ class box_prospect extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 
@@ -176,7 +176,7 @@ class box_prospect extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

+ 3 - 3
htdocs/core/boxes/box_services_contracts.php

@@ -54,7 +54,7 @@ class box_services_contracts extends ModeleBoxes
 	 *  @param  DoliDB  $db         Database handler
 	 *  @param  string  $param      More parameters
 	 */
-	function __construct($db,$param)
+	function __construct($db, $param)
 	{
 	    global $user;
 
@@ -69,7 +69,7 @@ class box_services_contracts extends ModeleBoxes
 	 *  @param	int		$max        Maximum number of records to load
      *  @return	void
 	 */
-	function loadBox($max=5)
+	function loadBox($max = 5)
 	{
 		global $user, $langs, $db, $conf;
 
@@ -241,7 +241,7 @@ class box_services_contracts extends ModeleBoxes
 	 *  @param	int		$nooutput	No print, only return string
 	 *	@return	string
 	 */
-    function showBox($head = null, $contents = null, $nooutput=0)
+    function showBox($head = null, $contents = null, $nooutput = 0)
     {
 		return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
 	}

Някои файлове не бяха показани, защото твърде много файлове са промени