Browse Source

Clean code

Laurent Destailleur 1 year ago
parent
commit
1f738e5a7b

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

@@ -356,8 +356,6 @@ class Contact extends CommonObject
 	 */
 	public function __construct($db)
 	{
-		global $conf, $langs;
-
 		$this->db = $db;
 		$this->statut = 1; // By default, status is enabled
 

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

@@ -1738,8 +1738,6 @@ abstract class CommonObject
 	public function fetch_thirdparty($force_thirdparty_id = 0)
 	{
 		// phpcs:enable
-		global $conf;
-
 		if (empty($this->socid) && empty($this->fk_soc) && empty($force_thirdparty_id)) {
 			return 0;
 		}

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

@@ -276,8 +276,6 @@ trait CommonPeople
 	 */
 	public function setUpperOrLowerCase()
 	{
-		global $conf;
-
 		if (getDolGlobalString('MAIN_FIRST_TO_UPPER')) {
 			$this->lastname = dol_ucwords(dol_strtolower($this->lastname));
 			$this->firstname = dol_ucwords(dol_strtolower($this->firstname));

+ 1 - 1
htdocs/societe/class/societe.class.php

@@ -888,7 +888,7 @@ class Societe extends CommonObject
 	 */
 	public function create(User $user, $notrigger = 0)
 	{
-		global $langs, $conf, $mysoc;
+		global $langs, $conf;
 
 		$error = 0;