Browse Source

Fix constructors does not need return value

Laurent Destailleur 6 years ago
parent
commit
d6ee00f2e7
43 changed files with 4 additions and 66 deletions
  1. 0 1
      htdocs/blockedlog/class/authority.class.php
  2. 0 1
      htdocs/compta/salaries/class/paymentsalary.class.php
  3. 0 1
      htdocs/compta/sociales/class/chargesociales.class.php
  4. 0 1
      htdocs/core/class/ccountry.class.php
  5. 0 1
      htdocs/core/class/cstate.class.php
  6. 0 1
      htdocs/core/class/ctypent.class.php
  7. 0 1
      htdocs/core/class/events.class.php
  8. 1 3
      htdocs/core/class/fiscalyear.class.php
  9. 0 1
      htdocs/core/class/html.formactions.class.php
  10. 0 1
      htdocs/core/class/html.formadmin.class.php
  11. 0 1
      htdocs/core/class/html.formbarcode.class.php
  12. 0 2
      htdocs/core/class/html.formcompany.class.php
  13. 0 1
      htdocs/core/class/html.formcron.class.php
  14. 0 1
      htdocs/core/class/html.formfile.class.php
  15. 0 2
      htdocs/core/class/html.formmail.class.php
  16. 1 3
      htdocs/core/class/html.formmargin.class.php
  17. 0 2
      htdocs/core/class/html.formother.class.php
  18. 0 1
      htdocs/core/class/html.formprojet.class.php
  19. 0 2
      htdocs/core/class/html.formsms.class.php
  20. 0 2
      htdocs/core/class/html.formticket.class.php
  21. 1 3
      htdocs/core/class/html.formwebsite.class.php
  22. 0 4
      htdocs/core/class/link.class.php
  23. 1 1
      htdocs/core/class/rssparser.class.php
  24. 0 2
      htdocs/core/modules/mailings/advthirdparties.modules.php
  25. 0 1
      htdocs/cron/class/cronjob.class.php
  26. 0 1
      htdocs/expedition/class/expeditionbatch.class.php
  27. 0 2
      htdocs/expensereport/class/expensereport.class.php
  28. 0 2
      htdocs/fourn/class/fournisseur.commande.dispatch.class.php
  29. 0 2
      htdocs/hrm/class/establishment.class.php
  30. 0 1
      htdocs/loan/class/loan.class.php
  31. 0 1
      htdocs/opensurvey/class/opensurveysondage.class.php
  32. 0 2
      htdocs/product/class/html.formproduct.class.php
  33. 0 2
      htdocs/product/class/product.class.php
  34. 0 1
      htdocs/product/class/productbatch.class.php
  35. 0 2
      htdocs/product/class/productcustomerprice.class.php
  36. 0 1
      htdocs/product/class/propalmergepdfproduct.class.php
  37. 0 1
      htdocs/product/dynamic_price/class/price_expression.class.php
  38. 0 1
      htdocs/product/dynamic_price/class/price_global_variable.class.php
  39. 0 1
      htdocs/product/dynamic_price/class/price_global_variable_updater.class.php
  40. 0 2
      htdocs/projet/class/taskstats.class.php
  41. 0 1
      htdocs/resource/class/dolresource.class.php
  42. 0 2
      htdocs/resource/class/html.formresource.class.php
  43. 0 1
      htdocs/ticket/class/ticketlogs.class.php

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

@@ -52,7 +52,6 @@ class BlockedLogAuthority
 	 */
     public function __construct($db)
     {
-
     	$this->db = $db;
 	}
 

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

@@ -82,7 +82,6 @@ class PaymentSalary extends CommonObject
 		$this->db = $db;
 		$this->element = 'payment_salary';
 		$this->table_element = 'payment_salary';
-		return 1;
 	}
 
 	/**

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

@@ -76,7 +76,6 @@ class ChargeSociales extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
     /**

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

@@ -76,7 +76,6 @@ class Ccountry // extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

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

@@ -70,7 +70,6 @@ class Cstate // extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

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

@@ -66,7 +66,6 @@ class Ctypent // extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

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

@@ -117,7 +117,6 @@ class Events // extends CommonObject
 	function __construct($db)
 	{
 		$this->db = $db;
-		return 1;
 	}
 
 

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

@@ -79,9 +79,7 @@ class Fiscalyear extends CommonObject
 		$this->db = $db;
 
 		$this->statuts_short = array(0 => 'Opened', 1 => 'Closed');
-        $this->statuts = array(0 => 'Opened', 1 => 'Closed');
-
-		return 1;
+		$this->statuts = array(0 => 'Opened', 1 => 'Closed');
 	}
 
 	/**

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

@@ -48,7 +48,6 @@ class FormActions
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

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

@@ -41,7 +41,6 @@ class FormAdmin
 	function __construct($db)
 	{
 		$this->db = $db;
-		return 1;
 	}
 
     // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps

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

@@ -48,7 +48,6 @@ class FormBarCode
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

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

@@ -49,8 +49,6 @@ class FormCompany
 	function __construct($db)
 	{
 		$this->db = $db;
-
-		return 1;
 	}
 
 

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

@@ -46,7 +46,6 @@ class FormCron extends Form
 	function __construct($db)
 	{
 		$this->db = $db;
-		return 1;
 	}
 
 

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

@@ -54,7 +54,6 @@ class FormFile
 	{
 		$this->db = $db;
 		$this->numoffiles=0;
-		return 1;
 	}
 
 

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

@@ -132,8 +132,6 @@ class FormMail extends Form
 		$this->withbodyreadonly=0;
 		$this->withdeliveryreceiptreadonly=0;
 		$this->withfckeditor=-1;	// -1 = Auto
-
-		return 1;
 	}
 
     // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps

+ 1 - 3
htdocs/core/class/html.formmargin.class.php

@@ -32,7 +32,7 @@ class FormMargin
      * @var DoliDB Database handler.
      */
     public $db;
-    
+
     /**
 	 * @var string Error code (or message)
 	 */
@@ -47,8 +47,6 @@ class FormMargin
     function __construct($db)
     {
         $this->db = $db;
-
-        return 1;
     }
 
 

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

@@ -53,8 +53,6 @@ class FormOther
     function __construct($db)
     {
         $this->db = $db;
-
-        return 1;
     }
 
 

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

@@ -48,7 +48,6 @@ class FormProjets
 	function __construct($db)
 	{
 		$this->db = $db;
-		return 1;
 	}
 
     // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps

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

@@ -84,8 +84,6 @@ class FormSms
         $this->withtoreadonly=0;
         $this->withtopicreadonly=0;
         $this->withbodyreadonly=0;
-
-        return 1;
     }
 
     // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps

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

@@ -112,8 +112,6 @@ class FormTicket
         $this->withref = 0;
         $this->withextrafields = 0;         // Show extrafields or not
         //$this->withtopicreadonly=0;
-
-        return 1;
     }
 
     /**

+ 1 - 3
htdocs/core/class/html.formwebsite.class.php

@@ -28,7 +28,7 @@
 class FormWebsite
 {
     private $db;
-    
+
     /**
 	 * @var string Error code (or message)
 	 */
@@ -43,8 +43,6 @@ class FormWebsite
     function __construct($db)
     {
         $this->db = $db;
-
-        return 1;
     }
 
 

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

@@ -62,11 +62,7 @@ class Link extends CommonObject
      */
     public function __construct($db)
     {
-        global $conf;
-
         $this->db = $db;
-
-        return 1;
     }
 
 

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

@@ -61,7 +61,7 @@ class RssParser
      */
     public function __construct($db)
     {
-    	$this->db=$db;
+    	$this->db = $db;
     }
 
     /**

+ 0 - 2
htdocs/core/modules/mailings/advthirdparties.modules.php

@@ -46,8 +46,6 @@ class mailing_advthirdparties extends MailingTargets
 	 */
 	function __construct($db)
 	{
-		global $conf;
-
 		$this->db=$db;
 	}
 

+ 0 - 1
htdocs/cron/class/cronjob.class.php

@@ -92,7 +92,6 @@ class Cronjob extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

+ 0 - 1
htdocs/expedition/class/expeditionbatch.class.php

@@ -51,7 +51,6 @@ class ExpeditionLineBatch extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 	/**

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

@@ -148,8 +148,6 @@ class ExpenseReport extends CommonObject
         $this->statuts_short = array(0 => 'Draft', 2 => 'Validated', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused');
         $this->statuts = array(0 => 'Draft', 2 => 'ValidatedWaitingApproval', 4 => 'Canceled', 5 => 'Approved', 6 => 'Paid', 99 => 'Refused');
         $this->statuts_logo = array(0 => 'statut0', 2 => 'statut1', 4 => 'statut5', 5 => 'statut3', 6 => 'statut6', 99 => 'statut5');
-
-        return 1;
     }
 
     /**

+ 0 - 2
htdocs/fourn/class/fournisseur.commande.dispatch.class.php

@@ -103,8 +103,6 @@ class CommandeFournisseurDispatch extends CommonObject
         $this->statutshort[0] = 'Received';
         $this->statutshort[1] = 'Verified';
         $this->statutshort[2] = 'Denied';
-
-        return 1;
     }
 
 

+ 0 - 2
htdocs/hrm/class/establishment.class.php

@@ -93,8 +93,6 @@ class Establishment extends CommonObject
 
 		$this->statuts_short = array(0 => 'Closed', 1 => 'Opened');
         $this->statuts = array(0 => 'Closed', 1 => 'Opened');
-
-		return 1;
 	}
 
 	/**

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

@@ -75,7 +75,6 @@ class Loan extends CommonObject
 	function __construct($db)
 	{
 		$this->db = $db;
-		return 1;
 	}
 
 	/**

+ 0 - 1
htdocs/opensurvey/class/opensurveysondage.class.php

@@ -111,7 +111,6 @@ class Opensurveysondage extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

+ 0 - 2
htdocs/product/class/html.formproduct.class.php

@@ -52,8 +52,6 @@ class FormProduct
 	function __construct($db)
 	{
 		$this->db = $db;
-
-		return 1;
 	}
 
 

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

@@ -354,8 +354,6 @@ class Product extends CommonObject
 	 */
 	function __construct($db)
 	{
-		global $langs;
-
 		$this->db = $db;
 		$this->canvas = '';
 	}

+ 0 - 1
htdocs/product/class/productbatch.class.php

@@ -56,7 +56,6 @@ class Productbatch extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

+ 0 - 2
htdocs/product/class/productcustomerprice.class.php

@@ -75,9 +75,7 @@ class Productcustomerprice extends CommonObject
 	 */
     function __construct($db)
     {
-
 		$this->db = $db;
-		return 1;
 	}
 
 	/**

+ 0 - 1
htdocs/product/class/propalmergepdfproduct.class.php

@@ -62,7 +62,6 @@ class Propalmergepdfproduct extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

+ 0 - 1
htdocs/product/dynamic_price/class/price_expression.class.php

@@ -65,7 +65,6 @@ class PriceExpression
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

+ 0 - 1
htdocs/product/dynamic_price/class/price_global_variable.class.php

@@ -71,7 +71,6 @@ class PriceGlobalVariable
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

+ 0 - 1
htdocs/product/dynamic_price/class/price_global_variable_updater.class.php

@@ -78,7 +78,6 @@ class PriceGlobalVariableUpdater
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
 

+ 0 - 2
htdocs/projet/class/taskstats.class.php

@@ -36,8 +36,6 @@ class TaskStats extends Stats
      */
 	function __construct($db)
 	{
-		global $conf, $user;
-
 		$this->db = $db;
 
 		require_once 'task.class.php';

+ 0 - 1
htdocs/resource/class/dolresource.class.php

@@ -61,7 +61,6 @@ class Dolresource extends CommonObject
     function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
     /**

+ 0 - 2
htdocs/resource/class/html.formresource.class.php

@@ -55,8 +55,6 @@ class FormResource
     function __construct($db)
     {
         $this->db = $db;
-
-        return 1;
     }
 
 

+ 0 - 1
htdocs/ticket/class/ticketlogs.class.php

@@ -75,7 +75,6 @@ class Ticketlogs// extends CommonObject
     public function __construct($db)
     {
         $this->db = $db;
-        return 1;
     }
 
     /**