Fix constructors does not need return value

This commit is contained in:
Laurent Destailleur 2018-09-16 10:22:23 +02:00
parent e90a60d4ee
commit d6ee00f2e7
43 changed files with 4 additions and 66 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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');
}
/**

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

@ -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;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -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;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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;
}
/**

View File

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

View File

@ -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;
}
/**

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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