From 5fdd798e9128e0b0ffdf165b6acf059a71164b7d Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Sat, 27 Sep 2014 17:13:15 +0200
Subject: [PATCH] Fix: phpcheckstyle from phpcs 1.5.5 (closing tags and & char
 on parameter).

---
 htdocs/admin/commande.php                     |  1 -
 htdocs/admin/menus/other.php                  |  1 -
 htdocs/admin/stock.php                        |  6 ++---
 htdocs/admin/system/database.php              |  7 +++---
 htdocs/admin/system/dbtable.php               |  1 -
 htdocs/admin/system/dolibarr.php              |  1 -
 htdocs/admin/system/index.php                 |  2 --
 htdocs/admin/tools/eaccelerator.php           |  1 -
 htdocs/admin/tools/purge.php                  |  1 -
 htdocs/admin/tools/update.php                 |  1 -
 htdocs/admin/translation.php                  |  1 -
 htdocs/admin/workflow.php                     |  1 -
 htdocs/cashdesk/affIndex.php                  |  1 -
 htdocs/cashdesk/facturation.php               |  2 --
 htdocs/cashdesk/tpl/menu.tpl.php              |  1 -
 htdocs/categories/viewcat.php                 |  1 -
 htdocs/comm/action/class/actioncomm.class.php |  1 -
 htdocs/comm/fiche.php                         |  7 +++---
 htdocs/commande/customer.php                  |  8 +++----
 htdocs/compta/facture/apercu.php              |  1 -
 htdocs/core/actions_sendmails.inc.php         |  2 --
 htdocs/core/actions_setnotes.inc.php          |  2 --
 htdocs/core/class/dolprintipp.class.php       |  1 -
 htdocs/core/lib/holiday.lib.php               |  1 -
 htdocs/core/lib/product.lib.php               |  2 --
 htdocs/core/lib/trip.lib.php                  |  4 +---
 htdocs/core/lib/usergroups.lib.php            |  1 -
 htdocs/core/login/functions_empty.php         |  2 --
 htdocs/core/login/functions_forceuser.php     |  3 ---
 htdocs/core/login/functions_http.php          |  3 ---
 htdocs/core/login/functions_ldap.php          |  2 --
 htdocs/core/login/functions_openid.php        |  2 --
 htdocs/core/menus/standard/auguria.lib.php    |  2 --
 .../core/modules/propale/modules_propale.php  |  1 -
 htdocs/fichinter/document.php                 |  2 +-
 htdocs/holiday/define_holiday.php             |  3 ++-
 htdocs/langs/en_US/compta.lang                |  2 +-
 htdocs/livraison/class/livraison.class.php    |  2 --
 htdocs/opensurvey/fonctions.php               | 23 +++++++++----------
 htdocs/opensurvey/results.php                 |  1 -
 htdocs/printipp/admin/printipp.php            |  8 +++----
 htdocs/societe/ajaxcompanies.php              |  2 --
 .../canvas/actions_card_common.class.php      |  1 -
 test/phpunit/CommandeFournisseurTest.php      |  1 -
 test/phpunit/CommandeTest.php                 |  1 -
 test/phpunit/CommonObjectTest.php             |  1 -
 test/phpunit/CompanyBankAccountTest.php       |  2 +-
 test/phpunit/EntrepotTest.php                 |  1 -
 test/phpunit/ExportTest.php                   |  2 +-
 test/phpunit/FactureRecTest.php               |  1 -
 test/phpunit/FactureTest.php                  |  2 +-
 test/phpunit/FunctionsLibTest.php             |  2 +-
 test/phpunit/PropalTest.php                   |  2 +-
 test/phpunit/SocieteTest.php                  |  2 +-
 test/phpunit/UserTest.php                     |  1 -
 test/phpunit/WebservicesInvoicesTest.php      |  2 +-
 test/phpunit/WebservicesThirdpartyTest.php    |  2 +-
 57 files changed, 42 insertions(+), 98 deletions(-)

diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index 6736f9d2279..1d05efa8e99 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -534,4 +534,3 @@ print '<br>';
 llxFooter();
 
 $db->close();
-?>
diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php
index 0ec3119c097..36733add335 100644
--- a/htdocs/admin/menus/other.php
+++ b/htdocs/admin/menus/other.php
@@ -143,4 +143,3 @@ print '</table>';
 
 llxFooter();
 $db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php
index 9b80662c180..3cc9e70ca31 100644
--- a/htdocs/admin/stock.php
+++ b/htdocs/admin/stock.php
@@ -77,7 +77,7 @@ if($action)
 	if($action == 'STOCK_USE_VIRTUAL_STOCK') {
 	    $res = dolibarr_set_const($db, "STOCK_USE_VIRTUAL_STOCK", GETPOST('STOCK_USE_VIRTUAL_STOCK','alpha'),'chaine',0,'',$conf->entity);
 	}
-	
+
 	if($action == 'STOCK_MUST_BE_ENOUGH_FOR_INVOICE') {
 	    $res = dolibarr_set_const($db, "STOCK_MUST_BE_ENOUGH_FOR_INVOICE", GETPOST('STOCK_MUST_BE_ENOUGH_FOR_INVOICE','alpha'),'chaine',0,'',$conf->entity);
 	}
@@ -329,7 +329,7 @@ if ($virtualdiffersfromphysical)
 	print '</table>';
 }
 
-$db->close();
 
 llxFooter();
-?>
+
+$db->close();
diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php
index f32122df7b9..d9833a13d01 100644
--- a/htdocs/admin/system/database.php
+++ b/htdocs/admin/system/database.php
@@ -81,7 +81,7 @@ else
 		print '<td width="300">'.$langs->trans("Parameters").'</td>';
 		print '<td>'.$langs->trans("Value").'</td>';
 		print '</tr>'."\n";
-	
+
 		// arraytest is an array of test to do
 		$arraytest=array();
 		if (preg_match('/mysql/i',$db->type))
@@ -91,7 +91,7 @@ else
 				'collation_database'=>array('var'=>'dolibarr_main_db_collation','valifempty'=>'utf8_general_ci')
 			);
 		}
-	
+
 		$listtouse=array();
 		if ($listname == 'listofvars') $listtouse=$listofvars;
 		if ($listname == 'listofstatus') $listtouse=$listofstatus;
@@ -124,4 +124,5 @@ else
 }
 
 llxFooter();
-?>
\ No newline at end of file
+
+$db->close();
diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php
index fe182c2e73e..0990d89acd0 100644
--- a/htdocs/admin/system/dbtable.php
+++ b/htdocs/admin/system/dbtable.php
@@ -130,4 +130,3 @@ else
 
 llxFooter();
 $db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index 8be469006ff..fe9bde59cec 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -379,4 +379,3 @@ print '</table>';
 llxFooter();
 
 $db->close();
-?>
diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php
index 640d5138362..1f95dce57cf 100644
--- a/htdocs/admin/system/index.php
+++ b/htdocs/admin/system/index.php
@@ -118,5 +118,3 @@ print info_admin($langs->trans("SystemInfoDesc")).'<br>';
 llxFooter();
 
 $db->close();
-
-?>
diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php
index a3f046f4510..8f82f33d039 100644
--- a/htdocs/admin/tools/eaccelerator.php
+++ b/htdocs/admin/tools/eaccelerator.php
@@ -350,4 +350,3 @@ print "<br><br>";
 llxFooter();
 
 $db->close();
-?>
diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php
index cac0bce888c..30c7ba4dd43 100644
--- a/htdocs/admin/tools/purge.php
+++ b/htdocs/admin/tools/purge.php
@@ -166,4 +166,3 @@ if (preg_match('/^confirm/i',$choice))
 
 llxFooter();
 $db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php
index e449d265fa3..8b0b105d0f0 100644
--- a/htdocs/admin/tools/update.php
+++ b/htdocs/admin/tools/update.php
@@ -174,4 +174,3 @@ if (! empty($result['return']))
 
 llxFooter();
 $db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php
index 8e5370a957e..66bc4fb22ba 100644
--- a/htdocs/admin/translation.php
+++ b/htdocs/admin/translation.php
@@ -69,4 +69,3 @@ print $langs->trans("SeeAlso").': <a href="'.$urlwikitranslatordoc.'" target="_b
 llxFooter();
 
 $db->close();
-?>
diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php
index cea1690b818..bbf2ce751ba 100644
--- a/htdocs/admin/workflow.php
+++ b/htdocs/admin/workflow.php
@@ -146,4 +146,3 @@ print '</table>';
 llxFooter();
 
 $db->close();
-?>
diff --git a/htdocs/cashdesk/affIndex.php b/htdocs/cashdesk/affIndex.php
index df282cd6df1..5a713eed4d9 100644
--- a/htdocs/cashdesk/affIndex.php
+++ b/htdocs/cashdesk/affIndex.php
@@ -75,4 +75,3 @@ include_once 'affPied.php';
 
 print '</div></div></div>'."\n";
 print '</body></html>'."\n";
-?>
\ No newline at end of file
diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php
index 4d442c0dbd3..32411f627fb 100644
--- a/htdocs/cashdesk/facturation.php
+++ b/htdocs/cashdesk/facturation.php
@@ -191,5 +191,3 @@ $obj_facturation->paiementLe('RESET');
 
 // Affichage des templates
 require ('tpl/facturation1.tpl.php');
-
-?>
diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php
index 59800fb57c1..4ee52ce0da6 100644
--- a/htdocs/cashdesk/tpl/menu.tpl.php
+++ b/htdocs/cashdesk/tpl/menu.tpl.php
@@ -78,4 +78,3 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
 }
 print '</li></ul>';
 print '</div>';
-?>
\ No newline at end of file
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index bec834e1ff9..010306d1e00 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -520,4 +520,3 @@ if($object->type == 4)
 
 llxFooter();
 $db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index e41e556f3d9..9919dc21e80 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -1071,4 +1071,3 @@ class ActionComm extends CommonObject
 
 }
 
-?>
diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php
index 7a79b658a76..7ba1cc8bc48 100644
--- a/htdocs/comm/fiche.php
+++ b/htdocs/comm/fiche.php
@@ -821,11 +821,11 @@ if ($id > 0)
 	/*
 	 * Barre d'actions
 	 */
-	
+
 	$parameters = array();
 	$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been
-	
-	
+
+
 	print '<div class="tabsAction">';
 
 	if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
@@ -933,4 +933,3 @@ dol_htmloutput_mesg('',$mesgs);
 // End of page
 llxFooter();
 $db->close();
-?>
diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php
index 373775a0da0..29812903d12 100644
--- a/htdocs/commande/customer.php
+++ b/htdocs/commande/customer.php
@@ -156,7 +156,7 @@ if ($resql)
 
 		print "<tr ".$bc[$var].">";
 		print '<td>';
-		
+
         $result='';
         $lien=$lienfin='';
         $lien = '<a href="'.dol_buildpath('/commande/orderstoinvoice.php',1).'?socid='.$obj->rowid.'">';
@@ -164,7 +164,7 @@ if ($resql)
         $name=$obj->nom;
         $result.=($lien.img_object($langs->trans("ShowCompany").': '.$name,'company').$lienfin);
         $result.=$lien.(dol_trunc($name,$maxlen)).$lienfin;
-		
+
 		print $result;
 		print '</td>';
 		print '<td>'.$obj->town.'&nbsp;</td>';
@@ -185,7 +185,7 @@ else
 	dol_print_error($db);
 }
 
+llxFooter();
+
 $db->close();
 
-llxFooter();
-?>
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index e1662708489..856640e306e 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -420,4 +420,3 @@ elseif (file_exists($fileimagebis))
 $db->close();
 
 llxFooter();
-?>
diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php
index f13113487c1..3af164abfab 100644
--- a/htdocs/core/actions_sendmails.inc.php
+++ b/htdocs/core/actions_sendmails.inc.php
@@ -229,5 +229,3 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
 	}
 
 }
-
-?>
\ No newline at end of file
diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php
index 3b2bbef75bb..74f576cf852 100644
--- a/htdocs/core/actions_setnotes.inc.php
+++ b/htdocs/core/actions_setnotes.inc.php
@@ -43,5 +43,3 @@ else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('
 	$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');
 	if ($result < 0) setEventMessage($object->error,'errors');
 }
-
-?>
\ No newline at end of file
diff --git a/htdocs/core/class/dolprintipp.class.php b/htdocs/core/class/dolprintipp.class.php
index 768741d9368..942ee3da3c3 100644
--- a/htdocs/core/class/dolprintipp.class.php
+++ b/htdocs/core/class/dolprintipp.class.php
@@ -201,4 +201,3 @@ class dolprintIPP
         return $ipp->printer_attributes;
     }
 }
-?>
diff --git a/htdocs/core/lib/holiday.lib.php b/htdocs/core/lib/holiday.lib.php
index dd299ab5c2c..6b4877b14b2 100644
--- a/htdocs/core/lib/holiday.lib.php
+++ b/htdocs/core/lib/holiday.lib.php
@@ -50,4 +50,3 @@ function holiday_prepare_head($object)
 	return $head;
 }
 
-?>
diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php
index e8c86b37db9..a252b361dcf 100644
--- a/htdocs/core/lib/product.lib.php
+++ b/htdocs/core/lib/product.lib.php
@@ -357,5 +357,3 @@ function measuring_units_string($unit,$measuring_style='')
 
 	return $measuring_units[$unit];
 }
-
-?>
diff --git a/htdocs/core/lib/trip.lib.php b/htdocs/core/lib/trip.lib.php
index 60794497554..7d58e9e01b1 100644
--- a/htdocs/core/lib/trip.lib.php
+++ b/htdocs/core/lib/trip.lib.php
@@ -54,10 +54,8 @@ function trip_prepare_head($object)
 	$head[$h][1] = $langs->trans("Info");
 	$head[$h][2] = 'info';
 	$h++;
-	
+
 	complete_head_from_modules($conf,$langs,$object,$head,$h,'trip','remove');
 
 	return $head;
 }
-
-?>
\ No newline at end of file
diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php
index d6097b6f5a1..75a78627f52 100644
--- a/htdocs/core/lib/usergroups.lib.php
+++ b/htdocs/core/lib/usergroups.lib.php
@@ -342,4 +342,3 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
     print '</table>';
 }
 
-?>
diff --git a/htdocs/core/login/functions_empty.php b/htdocs/core/login/functions_empty.php
index c96a5023d4d..e4379ee2c3a 100644
--- a/htdocs/core/login/functions_empty.php
+++ b/htdocs/core/login/functions_empty.php
@@ -39,5 +39,3 @@ function check_user_password_empty($usertotest,$passwordtotest,$entitytotest)
 
 	return $login;
 }
-
-?>
\ No newline at end of file
diff --git a/htdocs/core/login/functions_forceuser.php b/htdocs/core/login/functions_forceuser.php
index e74a253550a..94201c74ad0 100644
--- a/htdocs/core/login/functions_forceuser.php
+++ b/htdocs/core/login/functions_forceuser.php
@@ -46,6 +46,3 @@ function check_user_password_forceuser($usertotest,$passwordtotest,$entitytotest
 
 	return $login;
 }
-
-
-?>
\ No newline at end of file
diff --git a/htdocs/core/login/functions_http.php b/htdocs/core/login/functions_http.php
index b224b27f15b..285ebebbabf 100644
--- a/htdocs/core/login/functions_http.php
+++ b/htdocs/core/login/functions_http.php
@@ -43,6 +43,3 @@ function check_user_password_http($usertotest,$passwordtotest,$entitytotest)
 
 	return $login;
 }
-
-
-?>
\ No newline at end of file
diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php
index 403530ac80b..88a5f55de19 100644
--- a/htdocs/core/login/functions_ldap.php
+++ b/htdocs/core/login/functions_ldap.php
@@ -227,5 +227,3 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest)
 	return $login;
 }
 
-
-?>
diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php
index e183bc40795..2470567d596 100644
--- a/htdocs/core/login/functions_openid.php
+++ b/htdocs/core/login/functions_openid.php
@@ -112,5 +112,3 @@ function check_user_password_openid($usertotest,$passwordtotest,$entitytotest)
 
     return $login;
 }
-
-?>
\ No newline at end of file
diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php
index 427a03d9929..e8d71496820 100644
--- a/htdocs/core/menus/standard/auguria.lib.php
+++ b/htdocs/core/menus/standard/auguria.lib.php
@@ -430,5 +430,3 @@ function dol_auguria_showmenu($type_user, &$menuentry, &$listofmodulesforexterna
 	if (! $menuentry['perms']) return 2;															// No permissions and user is external
 	return 1;
 }
-
-?>
diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php
index 289862c8523..8e45f3b86f2 100644
--- a/htdocs/core/modules/propale/modules_propale.php
+++ b/htdocs/core/modules/propale/modules_propale.php
@@ -253,4 +253,3 @@ function propale_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0,
 	}
 }
 
-?>
diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php
index 54728df36d9..fd039efff24 100644
--- a/htdocs/fichinter/document.php
+++ b/htdocs/fichinter/document.php
@@ -131,7 +131,7 @@ else
 	print $langs->trans("ErrorUnknown");
 }
 
+
 llxFooter();
 
 $db->close();
-?>
diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php
index 4e1540c99e5..c432d37007b 100644
--- a/htdocs/holiday/define_holiday.php
+++ b/htdocs/holiday/define_holiday.php
@@ -190,7 +190,8 @@ print '</form>';
 
 dol_fiche_end();
 
+
 llxFooter();
 
 $db->close();
-?>
+
diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang
index 281ee374343..e0931bf5812 100644
--- a/htdocs/langs/en_US/compta.lang
+++ b/htdocs/langs/en_US/compta.lang
@@ -167,7 +167,7 @@ AccountancyDashboard=Accountancy summary
 ByProductsAndServices=By products and services
 RefExt=External ref
 ToCreateAPredefinedInvoice=To create a predefined invoice, create a standard invoice then, without validating it, click onto button "Convert to predefined invoice".
-LinkedOrder=linked to order
+LinkedOrder=Link to order
 ReCalculate=Recalculate
 Mode1=Method 1
 Mode2=Method 2
diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php
index dd5ebf38573..65213cea647 100644
--- a/htdocs/livraison/class/livraison.class.php
+++ b/htdocs/livraison/class/livraison.class.php
@@ -968,5 +968,3 @@ class LivraisonLigne
 	}
 
 }
-
-?>
diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php
index c3c80a59b86..b2077c05bbf 100644
--- a/htdocs/opensurvey/fonctions.php
+++ b/htdocs/opensurvey/fonctions.php
@@ -25,14 +25,14 @@
 /**
  * Returns an array with the tabs for the "Opensurvey poll" section
  * It loads tabs from modules looking for the entity Opensurveyso
- * 
+ *
  * @param Opensurveysondage $object Current viewing poll
  * @return array Tabs for the opensurvey section
  */
 function opensurvey_prepare_head(Opensurveysondage $object) {
-	
+
 	global $langs, $conf;
-	
+
 	$h = 0;
 	$head = array();
 
@@ -40,7 +40,7 @@ function opensurvey_prepare_head(Opensurveysondage $object) {
 	$head[0][1] = $langs->trans("Card");
 	$head[0][2] = 'general';
 	$h++;
-	
+
 	$head[1][0] = 'results.php?id='.$object->id_sondage;
 	$head[1][1] = $langs->trans("SurveyResults");
 	$head[1][2] = 'preview';
@@ -111,12 +111,12 @@ function showlogo()
 			$urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=companylogo&amp;file=thumbs/'.urlencode($mysoc->logo_small);
 		}
 	}
-	
+
 	if (!$urllogo && (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')))
 	{
 		$urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png';
 	}
-	
+
 	print '<div style="text-align:center"><img alt="Logo" id="logosubscribe" title="" src="'.$urllogo.'"/></div>';
 	print '<br>';
 }
@@ -205,14 +205,14 @@ function dol_survey_random($car)
 function ajouter_sondage()
 {
 	global $db, $user;
-	
+
 	require_once DOL_DOCUMENT_ROOT.'/opensurvey/class/opensurveysondage.class.php';
 
 	$sondage=dol_survey_random(16);
 
 	$allow_comments = empty($_SESSION['allow_comments']) ? 0 : 1;
 	$allow_spy = empty($_SESSION['allow_spy']) ? 0 : 1;
-	
+
 	// Insert survey
 	$opensurveysondage = new Opensurveysondage($db);
 	$opensurveysondage->id_sondage = $sondage;
@@ -226,9 +226,9 @@ function ajouter_sondage()
 	$opensurveysondage->allow_comments = $allow_comments;
 	$opensurveysondage->allow_spy = $allow_spy;
 	$opensurveysondage->sujet = $_SESSION['toutchoix'];
-	
+
 	$res = $opensurveysondage->create($user);
-	
+
 	if ($res < 0) {
 		dol_print_error($db);
 	}
@@ -243,11 +243,10 @@ function ajouter_sondage()
 	unset($_SESSION['toutchoix']);
 	unset($_SESSION['totalchoixjour']);
 	unset($_SESSION['champdatefin']);
-	
+
 	$urlback=dol_buildpath('/opensurvey/card.php',1).'?id='.$sondage;
 
 	header("Location: ".$urlback);
 	exit();
 }
 
-?>
diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php
index 00daab24b27..c5baba61242 100644
--- a/htdocs/opensurvey/results.php
+++ b/htdocs/opensurvey/results.php
@@ -1083,4 +1083,3 @@ print '<a name="bas"></a>'."\n";
 llxFooterSurvey();
 
 $db->close();
-?>
diff --git a/htdocs/printipp/admin/printipp.php b/htdocs/printipp/admin/printipp.php
index 08202b38f8e..6aaf44f8bdd 100644
--- a/htdocs/printipp/admin/printipp.php
+++ b/htdocs/printipp/admin/printipp.php
@@ -149,7 +149,7 @@ if ($mode == 'config' && $user->admin)
     print $langs->trans("PRINTIPP_PASSWORD").'</td><td>';
     print '<input size="32" type="text" name="PRINTIPP_PASSWORD" value="'.$conf->global->PRINTIPP_PASSWORD.'">';
     print '</td></tr>';
-    
+
     //$var=true;
     //print '<tr class="liste_titre">';
     //print '<td>'.$langs->trans("OtherParameter").'</td>';
@@ -181,7 +181,7 @@ if ($mode == 'test' && $user->admin)
     print '<td>Media</td>';
     print '<td>Supported</td>';
     print "</tr>\n";
-    
+
     $list = $printer->getlist_available_printers();
     $var = true;
     foreach ($list as $value)
@@ -203,13 +203,13 @@ if ($mode == 'test' && $user->admin)
         print "</tr>\n";
     }
     print '</table>';
-    
+
     if (count($list) == 0) print $langs->trans("NoPrinterFound");
 }
 
 dol_fiche_end();
 
+
 llxFooter();
 
 $db->close();
-?>
diff --git a/htdocs/societe/ajaxcompanies.php b/htdocs/societe/ajaxcompanies.php
index 32fbe2e2c00..de116453cf2 100644
--- a/htdocs/societe/ajaxcompanies.php
+++ b/htdocs/societe/ajaxcompanies.php
@@ -110,5 +110,3 @@ else
 {
     echo json_encode(array('nom'=>'ErrorBadParameter','label'=>'ErrorBadParameter','key'=>'ErrorBadParameter','value'=>'ErrorBadParameter'));
 }
-
-?>
\ No newline at end of file
diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index 6f6cb067333..39f0dc761f8 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -706,4 +706,3 @@ abstract class ActionsCardCommon
 
 }
 
-?>
diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php
index 2c83b4fdfc3..90c0d10e3fb 100644
--- a/test/phpunit/CommandeFournisseurTest.php
+++ b/test/phpunit/CommandeFournisseurTest.php
@@ -338,4 +338,3 @@ class CommandeFournisseurTest extends PHPUnit_Framework_TestCase
     }
 
 }
-?>
\ No newline at end of file
diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php
index 451e886a761..8a2e3f57120 100644
--- a/test/phpunit/CommandeTest.php
+++ b/test/phpunit/CommandeTest.php
@@ -265,4 +265,3 @@ class CommandeTest extends PHPUnit_Framework_TestCase
     }
 
 }
-?>
\ No newline at end of file
diff --git a/test/phpunit/CommonObjectTest.php b/test/phpunit/CommonObjectTest.php
index cbdde31e14d..a22146dfc2a 100644
--- a/test/phpunit/CommonObjectTest.php
+++ b/test/phpunit/CommonObjectTest.php
@@ -183,4 +183,3 @@ class CommonObjectTest extends PHPUnit_Framework_TestCase
     	return $result;
     }
 }
-?>
\ No newline at end of file
diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php
index 24d6ad03d80..693282e62c4 100644
--- a/test/phpunit/CompanyBankAccountTest.php
+++ b/test/phpunit/CompanyBankAccountTest.php
@@ -233,4 +233,4 @@ class CompanyBankAccountTest extends PHPUnit_Framework_TestCase
     }
 
 }
-?>
+
diff --git a/test/phpunit/EntrepotTest.php b/test/phpunit/EntrepotTest.php
index efd5f54008f..53788d71dab 100755
--- a/test/phpunit/EntrepotTest.php
+++ b/test/phpunit/EntrepotTest.php
@@ -257,4 +257,3 @@ class EntrepotTest extends PHPUnit_Framework_TestCase
         return;
     }
 }
-?>
\ No newline at end of file
diff --git a/test/phpunit/ExportTest.php b/test/phpunit/ExportTest.php
index d5938fc4691..641fe3b7f9e 100755
--- a/test/phpunit/ExportTest.php
+++ b/test/phpunit/ExportTest.php
@@ -265,4 +265,4 @@ class ExportTest extends PHPUnit_Framework_TestCase
         return true;
     }
 }
-?>
+
diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php
index 7b5caffc2df..4d4783240fa 100644
--- a/test/phpunit/FactureRecTest.php
+++ b/test/phpunit/FactureRecTest.php
@@ -196,4 +196,3 @@ class FactureRecTest extends PHPUnit_Framework_TestCase
         return $retAr;
     }
 }
-?>
\ No newline at end of file
diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php
index cc54953875c..2227559ffd3 100644
--- a/test/phpunit/FactureTest.php
+++ b/test/phpunit/FactureTest.php
@@ -329,4 +329,4 @@ class FactureTest extends PHPUnit_Framework_TestCase
         return $retAr;
     }
 }
-?>
+
diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php
index dbb3f6d8b8d..78c2278ba69 100755
--- a/test/phpunit/FunctionsLibTest.php
+++ b/test/phpunit/FunctionsLibTest.php
@@ -799,4 +799,4 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
     }
 
 }
-?>
+
diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php
index 3cac847a01f..089b279f75c 100644
--- a/test/phpunit/PropalTest.php
+++ b/test/phpunit/PropalTest.php
@@ -265,4 +265,4 @@ class PropalTest extends PHPUnit_Framework_TestCase
     }
 
 }
-?>
+
diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php
index 162248f2e98..97aa0f0a954 100755
--- a/test/phpunit/SocieteTest.php
+++ b/test/phpunit/SocieteTest.php
@@ -456,4 +456,4 @@ class SocieteTest extends PHPUnit_Framework_TestCase
     }
 
 }
-?>
+
diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php
index ef103eb1a46..e0eaa03acec 100644
--- a/test/phpunit/UserTest.php
+++ b/test/phpunit/UserTest.php
@@ -318,4 +318,3 @@ class UserTest extends PHPUnit_Framework_TestCase
     	return $retAr;
     }
 }
-?>
\ No newline at end of file
diff --git a/test/phpunit/WebservicesInvoicesTest.php b/test/phpunit/WebservicesInvoicesTest.php
index 12c01eeba70..85c2398c568 100755
--- a/test/phpunit/WebservicesInvoicesTest.php
+++ b/test/phpunit/WebservicesInvoicesTest.php
@@ -181,4 +181,4 @@ class WebservicesInvoicesTest extends PHPUnit_Framework_TestCase
     }
 
 }
-?>
+
diff --git a/test/phpunit/WebservicesThirdpartyTest.php b/test/phpunit/WebservicesThirdpartyTest.php
index 8ef0c383955..bf7cdc357c0 100755
--- a/test/phpunit/WebservicesThirdpartyTest.php
+++ b/test/phpunit/WebservicesThirdpartyTest.php
@@ -181,4 +181,4 @@ class WebservicesThirdpartyTest extends PHPUnit_Framework_TestCase
     }
 
 }
-?>
+
-- 
GitLab