Squiz.Functions.FunctionDeclarationArgumentSpacing

This commit is contained in:
Frédéric FRANCE 2019-01-27 15:20:16 +01:00
parent a9da6a2d51
commit f0cdf300d1
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
541 changed files with 2338 additions and 2329 deletions

View File

@ -65,7 +65,7 @@
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed"> <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" /> <rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
<!-- <!--
@ -191,6 +191,15 @@
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" /> <rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" /> <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 --> <!-- Rules from PEAR Standard -->

View File

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

View File

@ -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 * @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 * @return void
*/ */
function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='') function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = '')
{ {
global $conf,$langs,$db; global $conf,$langs,$db;
global $form; global $form;

View File

@ -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 * @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 * @return void
*/ */
function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='') function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $context = '')
{ {
global $conf,$langs,$db; global $conf,$langs,$db;
global $form, $mysoc; global $form, $mysoc;

View File

@ -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 * @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 * @return void
*/ */
function fieldListJournal($fieldlist, $obj='', $tabname='', $context='') function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '')
{ {
global $conf,$langs,$db; global $conf,$langs,$db;
global $form, $mysoc; global $form, $mysoc;

View File

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

View File

@ -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 * @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 * @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; global $langs, $conf, $user;
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; 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 * @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 * @return string Label of status
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->status,$mode); 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 * @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 * @return string Label of status
*/ */
function LibStatut($statut,$mode=0) function LibStatut($statut, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;

View File

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

View File

@ -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 * @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 * @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 $db, $conf, $langs;
global $dolibarr_main_authentication, $dolibarr_main_demo; global $dolibarr_main_authentication, $dolibarr_main_demo;
@ -470,7 +470,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode * @param string $mode Mode
* @return int <0 if KO, Id of created object if OK * @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; global $conf;
@ -641,7 +641,7 @@ class BookKeeping extends CommonObject
* *
* @return int <0 if KO, 0 if not found, >0 if OK * @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; global $conf;
@ -1090,7 +1090,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode * @param string $mode Mode
* @return int <0 if KO, >0 if OK * @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; $error = 0;
@ -1225,7 +1225,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode * @param string $mode Mode
* @return number <0 if KO, >0 if OK * @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; $error=0;
@ -1260,7 +1260,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode * @param string $mode Mode
* @return int <0 if KO, >0 if OK * @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); dol_syslog(__METHOD__, LOG_DEBUG);
@ -1338,7 +1338,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode * @param string $mode Mode
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function deleteByYearAndJournal($delyear='', $journal='', $mode='') function deleteByYearAndJournal($delyear = '', $journal = '', $mode = '')
{ {
global $conf; global $conf;
@ -1500,7 +1500,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode * @param string $mode Mode
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function fetchPerMvt($piecenum, $mode='') public function fetchPerMvt($piecenum, $mode = '')
{ {
global $conf; global $conf;
@ -1536,7 +1536,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode * @param string $mode Mode
* @return string Next numero to use * @return string Next numero to use
*/ */
public function getNextNumMvt($mode='') public function getNextNumMvt($mode = '')
{ {
global $conf; global $conf;
@ -1565,7 +1565,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode * @param string $mode Mode
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetchAllPerMvt($piecenum, $mode='') function fetchAllPerMvt($piecenum, $mode = '')
{ {
global $conf; global $conf;
@ -1687,7 +1687,7 @@ class BookKeeping extends CommonObject
* @param string $piece_num Piece num * @param string $piece_num Piece num
* @return int int <0 if KO, >0 if OK * @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; $error = 0;

View File

@ -246,7 +246,7 @@ class Adherent extends CommonObject
* @param string $moreinheader Add more html headers * @param string $moreinheader Add more html headers
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
global $conf,$langs; global $conf,$langs;
@ -358,7 +358,7 @@ class Adherent extends CommonObject
* @param string $morphy Nature of the adherent (physical or moral) * @param string $morphy Nature of the adherent (physical or moral)
* @return string Label * @return string Label
*/ */
function getmorphylib($morphy='') function getmorphylib($morphy = '')
{ {
global $langs; global $langs;
if (! $morphy) { $morphy=$this->morphy; } if (! $morphy) { $morphy=$this->morphy; }
@ -374,7 +374,7 @@ class Adherent extends CommonObject
* @param int $notrigger 1 ne declenche pas les triggers, 0 sinon * @param int $notrigger 1 ne declenche pas les triggers, 0 sinon
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function create($user,$notrigger=0) function create($user, $notrigger = 0)
{ {
global $conf,$langs; global $conf,$langs;
@ -500,7 +500,7 @@ class Adherent extends CommonObject
* @param string $action Current action for hookmanager * @param string $action Current action for hookmanager
* @return int <0 if KO, >0 if OK * @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; global $conf, $langs, $hookmanager;
@ -817,7 +817,7 @@ class Adherent extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, 0=nothing to do, >0 if OK * @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; global $conf, $langs;
@ -927,7 +927,7 @@ class Adherent extends CommonObject
* @param int $nosyncuser Do not synchronize linked user * @param int $nosyncuser Do not synchronize linked user
* @return string If OK return clear password, 0 if no change, < 0 if error * @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; global $conf, $langs;
@ -1147,7 +1147,7 @@ class Adherent extends CommonObject
* @param string $lastname Lastname * @param string $lastname Lastname
* @return void * @return void
*/ */
function fetch_name($firstname,$lastname) function fetch_name($firstname, $lastname)
{ {
// phpcs:enable // phpcs:enable
global $conf; global $conf;
@ -1183,7 +1183,7 @@ class Adherent extends CommonObject
* @param bool $fetch_subscriptions To load member subscriptions * @param bool $fetch_subscriptions To load member subscriptions
* @return int >0 if OK, 0 if not found, <0 if KO * @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; global $langs;
@ -1400,7 +1400,7 @@ class Adherent extends CommonObject
* @param int $datesubend Date end subscription * @param int $datesubend Date end subscription
* @return int rowid of record added, <0 if KO * @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; 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. * @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 * @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; 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 * @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 * @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; 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 * @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 * @return string Label
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode); 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 * @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 * @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 // phpcs:enable
global $langs; global $langs;
@ -2307,7 +2307,7 @@ class Adherent extends CommonObject
* @param null|array $moreparams Array to provide more information * @param null|array $moreparams Array to provide more information
* @return int 0 if KO, 1 if OK * @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; global $conf,$langs;
@ -2400,7 +2400,7 @@ class Adherent extends CommonObject
* 2=Return key only (uid=qqq) * 2=Return key only (uid=qqq)
* @return string DN * @return string DN
*/ */
function _load_ldap_dn($info,$mode=0) function _load_ldap_dn($info, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $conf; 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' * @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) * @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; global $conf, $langs, $mysoc, $user;

View File

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

View File

@ -52,7 +52,7 @@ class AdherentStats extends Stats
* @param int $socid Id third party * @param int $socid Id third party
* @param int $userid Id user for filter * @param int $userid Id user for filter
*/ */
function __construct($db, $socid=0, $userid=0) function __construct($db, $socid = 0, $userid = 0)
{ {
global $user, $conf; 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 * @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 * @return array Array of nb each month
*/ */
function getNbByMonth($year, $format=0) function getNbByMonth($year, $format = 0)
{ {
global $user; 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 * @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 * @return array Array of amount each month
*/ */
function getAmountByMonth($year, $format=0) function getAmountByMonth($year, $format = 0)
{ {
global $user; global $user;

View File

@ -361,7 +361,7 @@ class Members extends DolibarrApi
* *
* @url POST {id}/subscriptions * @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) { if(! DolibarrApiAccess::$user->rights->adherent->cotisation->creer) {
throw new RestException(401); throw new RestException(401);

View File

@ -207,7 +207,7 @@ $type=$this->fk_type;
* @param int $notrigger 0=Disable triggers * @param int $notrigger 0=Disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user, $notrigger=0) function update($user, $notrigger = 0)
{ {
$error = 0; $error = 0;
@ -263,7 +263,7 @@ $type=$this->fk_type;
* @param bool $notrigger false=launch triggers after, true=disable triggers * @param bool $notrigger false=launch triggers after, true=disable triggers
* @return int <0 if KO, 0 if not found, >0 if OK * @return int <0 if KO, 0 if not found, >0 if OK
*/ */
function delete($user, $notrigger=false) function delete($user, $notrigger = false)
{ {
$error = 0; $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 * @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 * @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; 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 * @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 * @return string Label
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return ''; return '';
} }

View File

@ -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 * @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 * @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 $conf,$langs,$db,$mysoc;
global $form; global $form;

View File

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

View File

@ -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 * @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 * @return void
*/ */
function fieldList($fieldlist, $obj='', $tabname='', $context='') function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
{ {
global $conf, $langs, $user, $db; global $conf, $langs, $user, $db;
global $form; global $form;

View File

@ -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 * @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 * @return void
*/ */
function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='') function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '')
{ {
global $conf,$langs,$db; global $conf,$langs,$db;
global $form; global $form;

View File

@ -46,7 +46,7 @@ class DolibarrApi
* @param string $cachedir Cache dir * @param string $cachedir Cache dir
* @param boolean $refreshCache Update cache * @param boolean $refreshCache Update cache
*/ */
function __construct($db, $cachedir='', $refreshCache=false) function __construct($db, $cachedir = '', $refreshCache = false)
{ {
global $conf, $dolibarr_main_url_root; global $conf, $dolibarr_main_url_root;
@ -222,7 +222,7 @@ class DolibarrApi
* @return bool * @return bool
* @throws RestException * @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 // Features/modules to check

View File

@ -55,7 +55,7 @@ class Login
* @url GET / * @url GET /
* @url POST / * @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; global $conf, $dolibarr_main_authentication, $dolibarr_auto_user;

View File

@ -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 * @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 * @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 $db, $conf, $langs;
global $dolibarr_main_authentication, $dolibarr_main_demo; 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 * @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 * @return string Label of status
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->status,$mode); 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 * @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 * @return string Label of status
*/ */
static function LibStatut($status,$mode=0) static function LibStatut($status, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;

View File

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

View File

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

View File

@ -725,7 +725,7 @@ class BlockedLog
* @param string $mode 0=unserialize, 1=json_decode * @param string $mode 0=unserialize, 1=json_decode
* @return string Value unserialized * @return string Value unserialized
*/ */
public function dolDecodeBlockedData($data, $mode=0) public function dolDecodeBlockedData($data, $mode = 0)
{ {
try try
{ {
@ -763,7 +763,7 @@ class BlockedLog
* @param int $forcesignature Force signature (for example '0000000000' when we disabled the module) * @param int $forcesignature Force signature (for example '0000000000' when we disabled the module)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function create($user, $forcesignature='') public function create($user, $forcesignature = '')
{ {
global $conf,$langs,$hookmanager; 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. * @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 * @return boolean True if OK, False if KO
*/ */
public function checkSignature($previoushash='') public function checkSignature($previoushash = '')
{ {
if (empty($previoushash)) if (empty($previoushash))
{ {
@ -921,7 +921,7 @@ class BlockedLog
* @param int $beforeid ID of a record * @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) * @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; global $conf;
@ -972,7 +972,7 @@ class BlockedLog
* @param string $search_code search code * @param string $search_code search code
* @return array|int Array of object log or <0 if error * @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; global $conf, $cachedlogs;
@ -1070,7 +1070,7 @@ class BlockedLog
* @param int $ignoresystem Ignore system events for the test * @param int $ignoresystem Ignore system events for the test
* @return bool * @return bool
*/ */
function alreadyUsed($ignoresystem=0) function alreadyUsed($ignoresystem = 0)
{ {
global $conf; global $conf;

View File

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

View File

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

View File

@ -566,7 +566,7 @@ class ActionComm extends CommonObject
* @param string $ref_ext Ref ext to get * @param string $ref_ext Ref ext to get
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch($id, $ref='',$ref_ext='') function fetch($id, $ref = '', $ref_ext = '')
{ {
global $langs; global $langs;
@ -761,7 +761,7 @@ class ActionComm extends CommonObject
* @param int $notrigger 1 = disable triggers, 0 = enable triggers * @param int $notrigger 1 = disable triggers, 0 = enable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function delete($notrigger=0) function delete($notrigger = 0)
{ {
global $user,$langs,$conf; global $user,$langs,$conf;
@ -838,7 +838,7 @@ class ActionComm extends CommonObject
* @param int $notrigger 1 = disable triggers, 0 = enable triggers * @param int $notrigger 1 = disable triggers, 0 = enable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user,$notrigger=0) function update($user, $notrigger = 0)
{ {
global $langs,$conf,$hookmanager; global $langs,$conf,$hookmanager;
@ -999,7 +999,7 @@ class ActionComm extends CommonObject
* @param string $limit Limit number of answers * @param string $limit Limit number of answers
* @return array or string Error string if KO, array with actions if OK * @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; global $conf, $langs;
@ -1051,7 +1051,7 @@ class ActionComm extends CommonObject
* @param int $load_state_board Charge indicateurs this->nb de tableau de bord * @param int $load_state_board Charge indicateurs this->nb de tableau de bord
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @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 // phpcs:enable
global $conf, $langs; global $conf, $langs;
@ -1164,7 +1164,7 @@ class ActionComm extends CommonObject
* @param int $hidenastatus 1=Show nothing if status is "Not applicable" * @param int $hidenastatus 1=Show nothing if status is "Not applicable"
* @return string String with status * @return string String with status
*/ */
function getLibStatut($mode,$hidenastatus=0) function getLibStatut($mode, $hidenastatus = 0)
{ {
return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep); return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep);
} }
@ -1179,7 +1179,7 @@ class ActionComm extends CommonObject
* @param int $datestart Date start of event * @param int $datestart Date start of event
* @return string Label * @return string Label
*/ */
function LibStatut($percent,$mode,$hidenastatus=0,$datestart='') function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '')
{ {
// phpcs:enable // phpcs:enable
global $langs; 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 * @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 * @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; 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, ...) * @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 * @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 // phpcs:enable
global $conf,$langs,$dolibarr_main_url_root,$mysoc; global $conf,$langs,$dolibarr_main_url_root,$mysoc;

View File

@ -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 * @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 * @return string Label of status
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->status,$mode); 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 * @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 * @return string Label of status
*/ */
static function LibStatut($status,$mode=0) static function LibStatut($status, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;

View File

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

View File

@ -1277,7 +1277,7 @@ $db->close();
* @param string $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button" * @param string $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button"
* @return void * @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 $user, $conf, $langs;
global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form

View File

@ -757,7 +757,7 @@ $db->close();
* @param bool $var true or false for alternat style on tr/td * @param bool $var true or false for alternat style on tr/td
* @return void * @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 $db;
global $user, $conf, $langs, $hookmanager, $action; global $user, $conf, $langs, $hookmanager, $action;

View File

@ -905,7 +905,7 @@ $db->close();
* @param bool $var true or false for alternat style on tr/td * @param bool $var true or false for alternat style on tr/td
* @return void * @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 $db;
global $user, $conf, $langs, $hookmanager, $action; global $user, $conf, $langs, $hookmanager, $action;

View File

@ -108,7 +108,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK * @return int <0 if KO, Id of created object if OK
*/ */
function create($user, $notrigger=0) function create($user, $notrigger = 0)
{ {
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
@ -260,7 +260,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $id Id object * @param int $id Id object
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch_by_mailing($id=0) function fetch_by_mailing($id = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;
@ -327,7 +327,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param string $type_element Type target * @param string $type_element Type target
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
global $langs; global $langs;
@ -390,7 +390,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user, $notrigger=0) function update($user, $notrigger = 0)
{ {
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
@ -466,7 +466,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function delete($user, $notrigger=0) function delete($user, $notrigger = 0)
{ {
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
@ -525,7 +525,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param array $arrayquery All element to Query * @param array $arrayquery All element to Query
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function savequery($user,$arrayquery) function savequery($user, $arrayquery)
{ {
global $langs,$conf; 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 * 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 * @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 = '('; $return_sql_criteria = '(';

View File

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

View File

@ -271,7 +271,7 @@ class Mailing extends CommonObject
* @param int $option2 Not used * @param int $option2 Not used
* @return int New id of clone * @return int New id of clone
*/ */
function createFromClone($fromid,$option1,$option2) function createFromClone($fromid, $option1, $option2)
{ {
global $user,$langs; 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 * @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 * @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 $db, $conf, $langs, $hookmanager;
global $dolibarr_main_authentication, $dolibarr_main_demo; 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 * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
* @return string Label * @return string Label
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->statut,$mode); 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 * @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 * @return string Label
*/ */
function LibStatut($statut,$mode=0) function LibStatut($statut, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;
@ -670,7 +670,7 @@ class Mailing extends CommonObject
* @param strin $desc Desc error * @param strin $desc Desc error
* @return string Label * @return string Label
*/ */
public static function libStatutDest($statut,$mode=0,$desc='') public static function libStatutDest($statut, $mode = 0, $desc = '')
{ {
global $langs; global $langs;
$langs->load('mails'); $langs->load('mails');

View File

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

View File

@ -239,7 +239,7 @@ class Propal extends CommonObject
* @param int $socid Id third party * @param int $socid Id third party
* @param int $propalid Id proposal * @param int $propalid Id proposal
*/ */
function __construct($db, $socid="", $propalid=0) function __construct($db, $socid = "", $propalid = 0)
{ {
global $conf,$langs; global $conf,$langs;
@ -267,7 +267,7 @@ class Propal extends CommonObject
* TODO Replace calls to this function by generation objet Ligne * TODO Replace calls to this function by generation objet Ligne
* inserted into table $this->products * inserted into table $this->products
*/ */
function add_product($idproduct, $qty, $remise_percent=0) function add_product($idproduct, $qty, $remise_percent = 0)
{ {
// phpcs:enable // phpcs:enable
global $conf, $mysoc; global $conf, $mysoc;
@ -434,7 +434,7 @@ class Propal extends CommonObject
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
* @see add_product * @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; global $mysoc, $conf, $langs;
@ -663,7 +663,7 @@ class Propal extends CommonObject
* @param int $notrigger disable line update trigger * @param int $notrigger disable line update trigger
* @return int 0 if OK, <0 if KO * @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; global $mysoc;
@ -869,7 +869,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >=0 if OK * @return int <0 if KO, >=0 if OK
*/ */
function create($user, $notrigger=0) function create($user, $notrigger = 0)
{ {
global $conf,$hookmanager; global $conf,$hookmanager;
$error=0; $error=0;
@ -1216,7 +1216,7 @@ class Propal extends CommonObject
* @param int $socid Id of thirdparty * @param int $socid Id of thirdparty
* @return int New id of clone * @return int New id of clone
*/ */
function createFromClone($socid=0) function createFromClone($socid = 0)
{ {
global $user,$conf,$hookmanager; global $user,$conf,$hookmanager;
@ -1340,7 +1340,7 @@ class Propal extends CommonObject
* @param string $ref Ref of proposal * @param string $ref Ref of proposal
* @return int >0 if OK, <0 if KO * @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"; $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 * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update(User $user, $notrigger=0) function update(User $user, $notrigger = 0)
{ {
global $conf; global $conf;
@ -1599,7 +1599,7 @@ class Propal extends CommonObject
* @param int $only_product Return only physical products * @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch_lines($only_product=0) function fetch_lines($only_product = 0)
{ {
// phpcs:enable // phpcs:enable
$this->lines=array(); $this->lines=array();
@ -1718,7 +1718,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0=execute triggers * @param int $notrigger 1=Does not execute triggers, 0=execute triggers
* @return int <0 if KO, 0=Nothing done, >=0 if OK * @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'; 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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function set_date($user, $date, $notrigger=0) function set_date($user, $date, $notrigger = 0)
{ {
// phpcs:enable // phpcs:enable
if (empty($date)) if (empty($date))
@ -1911,7 +1911,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
if (! empty($user->rights->propal->creer)) 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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @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 // phpcs:enable
if (! empty($user->rights->propal->creer)) 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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function set_availability($user, $id, $notrigger=0) function set_availability($user, $id, $notrigger = 0)
{ {
// phpcs:enable // phpcs:enable
if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) 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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) 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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @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 // phpcs:enable
if (! empty($user->rights->propal->creer)) 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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @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 // phpcs:enable
$remise=trim($remise)?trim($remise):0; $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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @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 // phpcs:enable
$remise=trim($remise)?trim($remise):0; $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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @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; $this->statut = $statut;
@ -2441,7 +2441,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @return int <0 if KO, >0 if OK * @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; global $langs,$conf;
@ -2544,7 +2544,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
function classifyBilled(User $user, $notrigger=0) function classifyBilled(User $user, $notrigger = 0)
{ {
$error=0; $error=0;
@ -2600,7 +2600,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function set_draft($user, $notrigger=0) function set_draft($user, $notrigger = 0)
{ {
// phpcs:enable // phpcs:enable
$error=0; $error=0;
@ -2665,7 +2665,7 @@ class Propal extends CommonObject
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK * @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 // phpcs:enable
global $user; global $user;
@ -2833,7 +2833,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int 1 if ok, otherwise if error * @return int 1 if ok, otherwise if error
*/ */
function delete($user, $notrigger=0) function delete($user, $notrigger = 0)
{ {
global $conf; global $conf;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; 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 * @return int >0 if OK, <0 if KO
* @deprecated use set_availability * @deprecated use set_availability
*/ */
function availability($availability_id, $notrigger=0) function availability($availability_id, $notrigger = 0)
{ {
global $user; global $user;
@ -3028,7 +3028,7 @@ class Propal extends CommonObject
* @return int >0 si ok, <0 si ko * @return int >0 si ok, <0 si ko
* @deprecated use set_demand_reason * @deprecated use set_demand_reason
*/ */
function demand_reason($demand_reason_id, $notrigger=0) function demand_reason($demand_reason_id, $notrigger = 0)
{ {
// phpcs:enable // phpcs:enable
global $user; 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 * @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 * @return string Label
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->statut, $mode); 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 * @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 * @return string Label
*/ */
function LibStatut($statut,$mode=1) function LibStatut($statut, $mode = 1)
{ {
// phpcs:enable // phpcs:enable
global $conf; global $conf;
@ -3213,7 +3213,7 @@ class Propal extends CommonObject
* @param int $mode "opened" for proposal to close, "signed" for proposal to invoice * @param int $mode "opened" for proposal to close, "signed" for proposal to invoice
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
function load_board($user,$mode) function load_board($user, $mode)
{ {
// phpcs:enable // phpcs:enable
global $conf, $langs; 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 * @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 * @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; global $langs, $conf, $user;
@ -3585,7 +3585,7 @@ class Propal extends CommonObject
* @param null|array $moreparams Array to provide more information * @param null|array $moreparams Array to provide more information
* @return int 0 if KO, 1 if OK * @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; global $conf,$langs;
@ -3854,7 +3854,7 @@ class PropaleLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function insert($notrigger=0) function insert($notrigger = 0)
{ {
global $conf,$user; global $conf,$user;
@ -3997,7 +3997,7 @@ class PropaleLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
function delete(User $user, $notrigger=0) function delete(User $user, $notrigger = 0)
{ {
global $conf; global $conf;
@ -4051,7 +4051,7 @@ class PropaleLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
function update($notrigger=0) function update($notrigger = 0)
{ {
global $conf,$user; global $conf,$user;

View File

@ -56,7 +56,7 @@ class PropaleStats extends Stats
* @param int $userid Id user for filter (creation user) * @param int $userid Id user for filter (creation user)
* @param string $mode Option ('customer', 'supplier') * @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; 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 * @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 * @return array Array with number by month
*/ */
function getNbByMonth($year, $format=0) function getNbByMonth($year, $format = 0)
{ {
global $user; global $user;

View File

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

View File

@ -313,7 +313,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <=0 if OK, 0=Nothing done, >0 if KO * @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; global $conf,$langs;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; 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) * @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 * @return int <0 if KO, >0 if OK
*/ */
function set_draft($user, $idwarehouse=-1) function set_draft($user, $idwarehouse = -1)
{ {
//phpcs:enable //phpcs:enable
global $conf,$langs; global $conf,$langs;
@ -617,7 +617,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function cloture($user, $notrigger=0) function cloture($user, $notrigger = 0)
{ {
global $conf; global $conf;
@ -677,7 +677,7 @@ class Commande extends CommonOrder
* @param int $idwarehouse Id warehouse to use for stock change. * @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function cancel($idwarehouse=-1) function cancel($idwarehouse = -1)
{ {
global $conf,$user,$langs; global $conf,$user,$langs;
@ -758,7 +758,7 @@ class Commande extends CommonOrder
* @param int $notrigger Disable all triggers * @param int $notrigger Disable all triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function create($user, $notrigger=0) function create($user, $notrigger = 0)
{ {
global $conf,$langs; global $conf,$langs;
$error=0; $error=0;
@ -1060,7 +1060,7 @@ class Commande extends CommonOrder
* @param int $socid Id of thirdparty * @param int $socid Id of thirdparty
* @return int New id of clone * @return int New id of clone
*/ */
function createFromClone($socid=0) function createFromClone($socid = 0)
{ {
global $user,$hookmanager; 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) * 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) * 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; global $mysoc, $conf, $langs, $user;
@ -1531,7 +1531,7 @@ class Commande extends CommonOrder
* TODO Remplacer les appels a cette fonction par generation objet Ligne * TODO Remplacer les appels a cette fonction par generation objet Ligne
* insere dans tableau $this->products * 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 // phpcs:enable
global $conf, $mysoc; global $conf, $mysoc;
@ -1616,7 +1616,7 @@ class Commande extends CommonOrder
* @param string $ref_int Internal reference of other object * @param string $ref_int Internal reference of other object
* @return int >0 if OK, <0 if KO, 0 if not found * @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 // Check parameters
@ -1845,7 +1845,7 @@ class Commande extends CommonOrder
* @param int $only_product Return only physical products * @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch_lines($only_product=0) function fetch_lines($only_product = 0)
{ {
// phpcs:enable // phpcs:enable
$this->lines=array(); $this->lines=array();
@ -2027,7 +2027,7 @@ class Commande extends CommonOrder
* @param int $filtre_statut Filter on shipment status * @param int $filtre_statut Filter on shipment status
* @return int <0 if KO, Nb of lines found if OK * @return int <0 if KO, Nb of lines found if OK
*/ */
function loadExpeditions($filtre_statut=-1) function loadExpeditions($filtre_statut = -1)
{ {
$this->expeditions = array(); $this->expeditions = array();
@ -2103,7 +2103,7 @@ class Commande extends CommonOrder
* *
* TODO FONCTION NON FINIE A FINIR * TODO FONCTION NON FINIE A FINIR
*/ */
function stock_array($filtre_statut=self::STATUS_CANCELED) function stock_array($filtre_statut = self::STATUS_CANCELED)
{ {
// phpcs:enable // phpcs:enable
$this->stocks = array(); $this->stocks = array();
@ -2143,7 +2143,7 @@ class Commande extends CommonOrder
* @param int $lineid Id of line to delete * @param int $lineid Id of line to delete
* @return int >0 if OK, 0 if nothing to do, <0 if KO * @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) 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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function set_remise($user, $remise, $notrigger=0) function set_remise($user, $remise, $notrigger = 0)
{ {
// phpcs:enable // phpcs:enable
$remise=trim($remise)?trim($remise):0; $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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
$remise=trim($remise)?trim($remise):0; $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 * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function set_date($user, $date, $notrigger=0) function set_date($user, $date, $notrigger = 0)
{ {
// phpcs:enable // phpcs:enable
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
@ -2423,7 +2423,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 si ko, >0 si ok * @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 // phpcs:enable
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
@ -2494,7 +2494,7 @@ class Commande extends CommonOrder
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK * @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 // phpcs:enable
global $user; global $user;
@ -2562,7 +2562,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int >0 if OK, <0 if KO * @return int >0 if OK, <0 if KO
*/ */
function availability($availability_id, $notrigger=0) function availability($availability_id, $notrigger = 0)
{ {
global $user; global $user;
@ -2633,7 +2633,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int >0 if ok, <0 if ko * @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 // phpcs:enable
global $user; global $user;
@ -2706,7 +2706,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
if ($user->rights->commande->creer) if ($user->rights->commande->creer)
@ -2769,7 +2769,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function classifyBilled(User $user, $notrigger=0) function classifyBilled(User $user, $notrigger = 0)
{ {
$error = 0; $error = 0;
@ -2904,7 +2904,7 @@ class Commande extends CommonOrder
* @param int $notrigger disable line update trigger * @param int $notrigger disable line update trigger
* @return int < 0 if KO, > 0 if OK * @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; global $conf, $mysoc, $langs, $user;
@ -3094,7 +3094,7 @@ class Commande extends CommonOrder
* @param int $notrigger 0=launch triggers after, 1=disable triggers * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update(User $user, $notrigger=0) function update(User $user, $notrigger = 0)
{ {
global $conf; global $conf;
@ -3189,7 +3189,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <=0 if KO, >0 if OK * @return int <=0 if KO, >0 if OK
*/ */
function delete($user, $notrigger=0) function delete($user, $notrigger = 0)
{ {
global $conf, $langs; global $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; 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 * @param int $donotshowbilled Do not show billed status after order status
* @return string Label of status * @return string Label of status
*/ */
function LibStatut($statut,$billed,$mode,$donotshowbilled=0) function LibStatut($statut, $billed, $mode, $donotshowbilled = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs, $conf; 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 * @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 * @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; global $conf, $langs, $user;
@ -3782,7 +3782,7 @@ class Commande extends CommonOrder
* @param null|array $moreparams Array to provide more information * @param null|array $moreparams Array to provide more information
* @return int 0 if KO, 1 if OK * @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; global $conf,$langs;
@ -4022,7 +4022,7 @@ class OrderLine extends CommonOrderLine
* @param int $notrigger 0=launch triggers after, 1=disable triggers * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
function delete(User $user, $notrigger=0) function delete(User $user, $notrigger = 0)
{ {
global $conf, $langs; global $conf, $langs;
@ -4083,7 +4083,7 @@ class OrderLine extends CommonOrderLine
* @param int $notrigger 1 = disable triggers * @param int $notrigger 1 = disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function insert($user=null, $notrigger=0) function insert($user = null, $notrigger = 0)
{ {
global $langs, $conf; global $langs, $conf;
@ -4228,7 +4228,7 @@ class OrderLine extends CommonOrderLine
* @param int $notrigger 1 = disable triggers * @param int $notrigger 1 = disable triggers
* @return int <0 si ko, >0 si ok * @return int <0 si ko, >0 si ok
*/ */
function update(User $user, $notrigger=0) function update(User $user, $notrigger = 0)
{ {
global $conf,$langs; global $conf,$langs;

View File

@ -55,7 +55,7 @@ class CommandeStats extends Stats
* @param string $mode Option ('customer', 'supplier') * @param string $mode Option ('customer', 'supplier')
* @param int $userid Id user for filter (creation user) * @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; 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 * @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 * @return array Array with number by month
*/ */
function getNbByMonth($year, $format=0) function getNbByMonth($year, $format = 0)
{ {
global $user; 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 * @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 * @return array Array with amount by month
*/ */
function getAmountByMonth($year, $format=0) function getAmountByMonth($year, $format = 0)
{ {
global $user; global $user;

View File

@ -352,7 +352,7 @@ class Account extends CommonObject
* @param string $type To search using type * @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 * @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 // phpcs:enable
$lines = array(); $lines = array();
@ -417,7 +417,7 @@ class Account extends CommonObject
* @param int $datev Date value * @param int $datev Date value
* @return int Rowid of added entry, <0 if KO * @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 // Deprecation warning
if (is_numeric($oper)) { if (is_numeric($oper)) {
@ -525,7 +525,7 @@ class Account extends CommonObject
* @param int $notrigger 1=Disable triggers * @param int $notrigger 1=Disable triggers
* @return int < 0 if KO, > 0 if OK * @return int < 0 if KO, > 0 if OK
*/ */
function create(User $user, $notrigger=0) function create(User $user, $notrigger = 0)
{ {
global $langs,$conf, $hookmanager; global $langs,$conf, $hookmanager;
@ -860,7 +860,7 @@ class Account extends CommonObject
* @param string $ref Ref of bank account to get * @param string $ref Ref of bank account to get
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch($id, $ref='') function fetch($id, $ref = '')
{ {
global $conf; 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 * @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 * @return string Label
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->clos,$mode); 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) * @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) * @return int Current sold (value date <= today)
*/ */
function solde($option=0) function solde($option = 0)
{ {
$solde=0; $solde=0;
@ -1329,7 +1329,7 @@ class Account extends CommonObject
* @param int $notooltip 1=Disable tooltip * @param int $notooltip 1=Disable tooltip
* @return string Chaine avec URL * @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; global $conf, $langs, $user;
@ -1549,7 +1549,7 @@ class Account extends CommonObject
* @return array * @return array
* @see useDetailedBBAN * @see useDetailedBBAN
*/ */
public function getFieldsToShow($includeibanbic=0) public function getFieldsToShow($includeibanbic = 0)
{ {
//Get the required properties depending on the country //Get the required properties depending on the country
$detailedBBAN = $this->useDetailedBBAN(); $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) * @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 * @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; global $conf;
@ -2011,7 +2011,7 @@ class AccountLine extends CommonObject
* @param int $conciliated 1=Set transaction to conciliated, 0=Keep transaction non conciliated * @param int $conciliated 1=Set transaction to conciliated, 0=Keep transaction non conciliated
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
global $conf,$langs; global $conf,$langs;
@ -2075,7 +2075,7 @@ class AccountLine extends CommonObject
* @param int $sign 1 or -1 * @param int $sign 1 or -1
* @return int >0 if OK, 0 if KO * @return int >0 if OK, 0 if KO
*/ */
function datev_change($rowid,$sign=1) function datev_change($rowid, $sign = 1)
{ {
// phpcs:enable // phpcs:enable
$sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; $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 * @param int $sign 1 or -1
* @return int >0 if OK, 0 if KO * @return int >0 if OK, 0 if KO
*/ */
function dateo_change($rowid,$sign=1) function dateo_change($rowid, $sign = 1)
{ {
// phpcs:enable // phpcs:enable
$sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; $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 * @param int $notooltip 1=Disable tooltip
* @return string Chaine avec URL * @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; 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 * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long
* @return string Libelle * @return string Libelle
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->status,$mode); 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 * @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 * @return string Libelle du statut
*/ */
function LibStatut($statut,$mode=0) function LibStatut($statut, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;

View File

@ -325,7 +325,7 @@ class BankAccounts extends DolibarrApi
* *
* @url POST {id}/lines * @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) { if (! DolibarrApiAccess::$user->rights->banque->modifier) {
throw new RestException(401); throw new RestException(401);

View File

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

View File

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

View File

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

View File

@ -50,7 +50,7 @@ class DeplacementStats extends Stats
* @param mixed $userid Id user for filter or array of user ids * @param mixed $userid Id user for filter or array of user ids
* @return void * @return void
*/ */
function __construct($db, $socid=0, $userid=0) function __construct($db, $socid = 0, $userid = 0)
{ {
global $conf; 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 * @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 * @return array Array of values
*/ */
function getNbByMonth($year, $format=0) function getNbByMonth($year, $format = 0)
{ {
$sql = "SELECT MONTH(dated) as dm, count(*)"; $sql = "SELECT MONTH(dated) as dm, count(*)";
$sql.= " FROM ".$this->from; $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 * @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 * @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 = "SELECT date_format(dated,'%m') as dm, sum(".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;

View File

@ -104,7 +104,7 @@ class Invoices extends DolibarrApi
* *
* @throws RestException * @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; global $db, $conf;
@ -600,7 +600,7 @@ class Invoices extends DolibarrApi
* @throws 500 * @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) { if(! DolibarrApiAccess::$user->rights->facture->creer) {
throw new RestException(401); throw new RestException(401);
@ -650,7 +650,7 @@ class Invoices extends DolibarrApi
* @throws 500 * @throws 500
* *
*/ */
function settodraft($id, $idwarehouse=-1) function settodraft($id, $idwarehouse = -1)
{ {
if(! DolibarrApiAccess::$user->rights->facture->creer) { if(! DolibarrApiAccess::$user->rights->facture->creer) {
throw new RestException(401); throw new RestException(401);
@ -702,7 +702,7 @@ class Invoices extends DolibarrApi
* *
* @return array * @return array
*/ */
function validate($id, $idwarehouse=0, $notrigger=0) function validate($id, $idwarehouse = 0, $notrigger = 0)
{ {
if(! DolibarrApiAccess::$user->rights->facture->creer) { if(! DolibarrApiAccess::$user->rights->facture->creer) {
throw new RestException(401); throw new RestException(401);
@ -753,7 +753,7 @@ class Invoices extends DolibarrApi
* @throws 404 * @throws 404
* @throws 500 * @throws 500
*/ */
function settopaid($id, $close_code='', $close_note='') function settopaid($id, $close_code = '', $close_note = '')
{ {
if(! DolibarrApiAccess::$user->rights->facture->creer) { if(! DolibarrApiAccess::$user->rights->facture->creer) {
throw new RestException(401); throw new RestException(401);
@ -994,7 +994,7 @@ class Invoices extends DolibarrApi
* @throws 401 * @throws 401
* @throws 404 * @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; global $conf;
@ -1114,7 +1114,7 @@ class Invoices extends DolibarrApi
* @throws 403 * @throws 403
* @throws 404 * @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; global $conf;

View File

@ -321,7 +321,7 @@ class FactureRec extends CommonInvoice
* @param int $ref_int Internal reference of other object * @param int $ref_int Internal reference of other object
* @return int >0 if OK, <0 if KO, 0 if not found * @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 = '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'; $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. * @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, >0 if OK * @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; $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 * @param int $date_end_fill 1=Flag to fill end date when generating invoice
* @return int <0 if KO, Id of line if OK * @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; global $mysoc;
@ -826,7 +826,7 @@ class FactureRec extends CommonInvoice
* @param int $date_end_fill 1=Flag to fill end date when generating invoice * @param int $date_end_fill 1=Flag to fill end date when generating invoice
* @return int <0 if KO, Id of line if OK * @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; global $mysoc;
@ -1002,7 +1002,7 @@ class FactureRec extends CommonInvoice
* @param int $forcevalidation 1=Force validation of invoice whatever is template auto_validate flag. * @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) * @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; 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 * @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 * @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; global $langs;
@ -1210,7 +1210,7 @@ class FactureRec extends CommonInvoice
* @param integer $alreadypaid Not used on recurring invoices * @param integer $alreadypaid Not used on recurring invoices
* @return string Label of status * @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); 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 * @param int $type Type invoice
* @return string Label of status * @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 // phpcs:enable
global $langs; global $langs;
@ -1328,7 +1328,7 @@ class FactureRec extends CommonInvoice
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
* @return void * @return void
*/ */
function initAsSpecimen($option='') function initAsSpecimen($option = '')
{ {
global $user,$langs,$conf; global $user,$langs,$conf;
@ -1480,7 +1480,7 @@ class FactureRec extends CommonInvoice
* @param string $unit unit of frequency (d, m, y) * @param string $unit unit of frequency (d, m, y)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function setFrequencyAndUnit($frequency,$unit) function setFrequencyAndUnit($frequency, $unit)
{ {
if (! $this->table_element) 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 * @param int $increment_nb_gen_done 0 do nothing more, >0 increment nb_gen_done
* @return int <0 if KO, >0 if OK * @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) if (! $this->table_element)
{ {
@ -1823,7 +1823,7 @@ class FactureLigneRec extends CommonInvoiceLine
* @param int $notrigger No trigger * @param int $notrigger No trigger
* @return int <0 if KO, Id of line if OK * @return int <0 if KO, Id of line if OK
*/ */
function update(User $user, $notrigger=0) function update(User $user, $notrigger = 0)
{ {
global $conf; global $conf;

View File

@ -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 * @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 * @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; global $langs,$conf,$mysoc,$hookmanager;
$error=0; $error=0;
@ -854,7 +854,7 @@ class Facture extends CommonInvoice
* @param int $invertdetail Reverse sign of amounts for lines * @param int $invertdetail Reverse sign of amounts for lines
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function createFromCurrent(User $user, $invertdetail=0) function createFromCurrent(User $user, $invertdetail = 0)
{ {
global $conf; global $conf;
@ -945,7 +945,7 @@ class Facture extends CommonInvoice
* @param int $socid Id of thirdparty * @param int $socid Id of thirdparty
* @return int New id of clone * @return int New id of clone
*/ */
function createFromClone($socid=0) function createFromClone($socid = 0)
{ {
global $user,$hookmanager, $conf; global $user,$hookmanager, $conf;
@ -1162,7 +1162,7 @@ class Facture extends CommonInvoice
* @param int $withpicto Add download picto into link * @param int $withpicto Add download picto into link
* @return string HTML link to file * @return string HTML link to file
*/ */
function getDirectExternalLink($withpicto=0) function getDirectExternalLink($withpicto = 0)
{ {
global $dolibarr_main_url_root; 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 * @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 * @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; 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 * @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 * @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; global $conf;
@ -1604,7 +1604,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 0=launch triggers after, 1=disable triggers * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update(User $user, $notrigger=0) function update(User $user, $notrigger = 0)
{ {
global $conf; global $conf;
@ -1819,7 +1819,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
global $user; global $user;
@ -1884,7 +1884,7 @@ class Facture extends CommonInvoice
* @param int $idwarehouse Id warehouse to use for stock change. * @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, 0=Refused, >0 if OK * @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; global $langs,$conf;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; 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) * @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 * @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 // phpcs:enable
$error=0; $error=0;
@ -2168,7 +2168,7 @@ class Facture extends CommonInvoice
* @param string $close_note Comment * @param string $close_note Comment
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
@ -2231,7 +2231,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @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 * @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; global $conf,$langs;
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; 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. * @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function set_draft($user,$idwarehouse=-1) function set_draft($user, $idwarehouse = -1)
{ {
// phpcs:enable // phpcs:enable
global $conf,$langs; global $conf,$langs;
@ -2649,7 +2649,7 @@ class Facture extends CommonInvoice
* @param double $pu_ht_devise Unit price in currency * @param double $pu_ht_devise Unit price in currency
* @return int <0 if KO, Id of line if OK * @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 // Deprecation warning
if ($label) { if ($label) {
@ -2879,7 +2879,7 @@ class Facture extends CommonInvoice
* @param int $notrigger disable line update trigger * @param int $notrigger disable line update trigger
* @return int < 0 if KO, > 0 if OK * @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; global $conf,$user;
// Deprecation warning // Deprecation warning
@ -3197,7 +3197,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok * @return int <0 if ko, >0 if ok
*/ */
function set_remise($user, $remise, $notrigger=0) function set_remise($user, $remise, $notrigger = 0)
{ {
// phpcs:enable // phpcs:enable
// Clean parameters // Clean parameters
@ -3263,7 +3263,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
if (empty($remise)) $remise=0; 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 * @param string $mode 'next' for next value or 'last' for last value
* @return string free ref or last ref * @return string free ref or last ref
*/ */
function getNextNumRef($soc,$mode='next') function getNextNumRef($soc, $mode = 'next')
{ {
global $conf, $langs; global $conf, $langs;
$langs->load("bills"); $langs->load("bills");
@ -3472,7 +3472,7 @@ class Facture extends CommonInvoice
* @param string $sortorder Sort order * @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK * @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 // phpcs:enable
global $conf,$user; global $conf,$user;
@ -3543,7 +3543,7 @@ class Facture extends CommonInvoice
* @param int $socid Id thirdparty * @param int $socid Id thirdparty
* @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) * @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 // phpcs:enable
global $conf; global $conf;
@ -3593,7 +3593,7 @@ class Facture extends CommonInvoice
* @param int $socid Id thirdparty * @param int $socid Id thirdparty
* @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) * @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 // phpcs:enable
global $conf; global $conf;
@ -3668,7 +3668,7 @@ class Facture extends CommonInvoice
* @param float $amount Amount we request direct debit for * @param float $amount Amount we request direct debit for
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function demande_prelevement($fuser, $amount=0) function demande_prelevement($fuser, $amount = 0)
{ {
// phpcs:enable // phpcs:enable
@ -3894,7 +3894,7 @@ class Facture extends CommonInvoice
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
* @return void * @return void
*/ */
function initAsSpecimen($option='') function initAsSpecimen($option = '')
{ {
global $langs; global $langs;
@ -4110,7 +4110,7 @@ class Facture extends CommonInvoice
* @param null|array $moreparams Array to provide more information * @param null|array $moreparams Array to provide more information
* @return int <0 if KO, >0 if OK * @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; global $conf,$langs;
@ -4215,7 +4215,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function setFinal(User $user, $notrigger=0) function setFinal(User $user, $notrigger = 0)
{ {
$error=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 * @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 * @return int <0 if KO, >0 if OK
*/ */
function insert($notrigger=0, $noerrorifdiscountalreadylinked=0) function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0)
{ {
global $langs,$user,$conf; global $langs,$user,$conf;
@ -4729,7 +4729,7 @@ class FactureLigne extends CommonInvoiceLine
* @param int $notrigger Disable triggers * @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user='',$notrigger=0) function update($user = '', $notrigger = 0)
{ {
global $user,$conf; global $user,$conf;
@ -4945,7 +4945,7 @@ class FactureLigne extends CommonInvoiceLine
* @param bool $include_credit_note Include credit note or not * @param bool $include_credit_note Include credit note or not
* @return int >= 0 * @return int >= 0
*/ */
function get_prev_progress($invoiceid, $include_credit_note=true) function get_prev_progress($invoiceid, $include_credit_note = true)
{ {
// phpcs:enable // phpcs:enable
if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") { if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {

View File

@ -53,7 +53,7 @@ class FactureStats extends Stats
* @param string $mode Option ('customer', 'supplier') * @param string $mode Option ('customer', 'supplier')
* @param int $userid Id user for filter (creation user) * @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; 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 * @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 * @return array Array of values
*/ */
function getNbByMonth($year, $format=0) function getNbByMonth($year, $format = 0)
{ {
global $user; 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 * @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 * @return array Array with amount by month
*/ */
function getAmountByMonth($year, $format=0) function getAmountByMonth($year, $format = 0)
{ {
global $user; global $user;

View File

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

View File

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

View File

@ -84,7 +84,7 @@ class RemiseCheque extends CommonObject
* @param string $ref Ref record * @param string $ref Ref record
* @return int <0 if KO, > 0 if OK * @return int <0 if KO, > 0 if OK
*/ */
function fetch($id,$ref='') function fetch($id, $ref = '')
{ {
global $conf; global $conf;
@ -299,7 +299,7 @@ class RemiseCheque extends CommonObject
* @param User $user Utilisateur qui effectue l'operation * @param User $user Utilisateur qui effectue l'operation
* @return int * @return int
*/ */
function delete($user='') function delete($user = '')
{ {
global $conf; global $conf;
@ -416,7 +416,7 @@ class RemiseCheque extends CommonObject
* @param string $mode 'next' for next value or 'last' for last value * @param string $mode 'next' for next value or 'last' for last value
* @return string free ref or last ref * @return string free ref or last ref
*/ */
function getNextNumRef($mode='next') function getNextNumRef($mode = 'next')
{ {
global $conf, $db, $langs, $mysoc; global $conf, $db, $langs, $mysoc;
$langs->load("bills"); $langs->load("bills");
@ -988,7 +988,7 @@ class RemiseCheque extends CommonObject
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
* @return void * @return void
*/ */
function initAsSpecimen($option='') function initAsSpecimen($option = '')
{ {
global $user,$langs,$conf; 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 * @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 * @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; 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 * @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 * @return string Libelle
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->statut,$mode); 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 * @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 * @return string Libelle du statut
*/ */
function LibStatut($status,$mode=0) function LibStatut($status, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage

View File

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

View File

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

View File

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

View File

@ -82,7 +82,7 @@ class RejetPrelevement
* @param int $facturation Facturation * @param int $facturation Facturation
* @return void * @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; global $langs,$conf;
@ -282,7 +282,7 @@ class RejetPrelevement
* @return array Array List of invoices related to the withdrawal line * @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 ? * @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; global $conf;

View File

@ -108,7 +108,7 @@ class PaymentSalary extends CommonObject
* @param int $notrigger 0=no, 1=yes (no update trigger) * @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user=null, $notrigger=0) function update($user = null, $notrigger = 0)
{ {
global $conf, $langs; global $conf, $langs;
@ -189,7 +189,7 @@ class PaymentSalary extends CommonObject
* @param User $user User that load * @param User $user User that load
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch($id, $user=null) function fetch($id, $user = null)
{ {
global $langs; global $langs;
$sql = "SELECT"; $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 * @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 * @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 $db, $conf, $langs, $hookmanager;
global $dolibarr_main_authentication, $dolibarr_main_demo; 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 * @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 * @return string Libelle
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->statut,$mode); 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 * @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 * @return string Libelle du statut
*/ */
function LibStatut($status,$mode=0) function LibStatut($status, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage

View File

@ -49,7 +49,7 @@ class SalariesStats extends Stats
* @param mixed $userid Id user for filter or array of user ids * @param mixed $userid Id user for filter or array of user ids
* @return void * @return void
*/ */
function __construct($db, $socid=0, $userid=0) function __construct($db, $socid = 0, $userid = 0)
{ {
global $conf; 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 * @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 * @return array Array of values
*/ */
function getNbByMonth($year, $format=0) function getNbByMonth($year, $format = 0)
{ {
$sql = "SELECT MONTH(datep) as dm, count(*)"; $sql = "SELECT MONTH(datep) as dm, count(*)";
$sql.= " FROM ".$this->from; $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 * @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 * @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 = "SELECT date_format(datep,'%m') as dm, sum(".$this->field.")";
$sql.= " FROM ".$this->from; $sql.= " FROM ".$this->from;

View File

@ -404,7 +404,7 @@ class Cchargesociales
* @param string $morecss Add more css on link * @param string $morecss Add more css on link
* @return string String with URL * @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 $langs, $conf, $db;
global $dolibarr_main_authentication, $dolibarr_main_demo; 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 * @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 * @return string Label of status
*/ */
function getLibStatut($mode=0) function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->status,$mode); 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 * @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 * @return string Label of status
*/ */
function LibStatut($status,$mode=0) function LibStatut($status, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;

View File

@ -93,7 +93,7 @@ class ChargeSociales extends CommonObject
* @param string $ref Ref * @param string $ref Ref
* @return int <0 KO >0 OK * @return int <0 KO >0 OK
*/ */
function fetch($id, $ref='') function fetch($id, $ref = '')
{ {
$sql = "SELECT cs.rowid, cs.date_ech"; $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"; $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) * @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 * @return string Label
*/ */
function getLibStatut($mode=0,$alreadypaid=-1) function getLibStatut($mode = 0, $alreadypaid = -1)
{ {
return $this->LibStatut($this->paye,$mode,$alreadypaid); 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) * @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 * @return string Label
*/ */
function LibStatut($statut,$mode=0,$alreadypaid=-1) function LibStatut($statut, $mode = 0, $alreadypaid = -1)
{ {
// phpcs:enable // phpcs:enable
global $langs; 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 * @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 * @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; global $langs, $conf, $user, $form;

View File

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

View File

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

View File

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

View File

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

View File

@ -261,7 +261,7 @@ class Contrat extends CommonObject
* @param string $comment A comment typed by user * @param string $comment A comment typed by user
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
$result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); $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 * @param string $comment A comment typed by user
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
$result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); $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 * @return int <0 if KO, >0 if OK
* @see closeAll * @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(); if (empty($date_start)) $date_start = dol_now();
@ -363,7 +363,7 @@ class Contrat extends CommonObject
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
* @see activateAll * @see activateAll
*/ */
function closeAll(User $user, $notrigger=0, $comment='') function closeAll(User $user, $notrigger = 0, $comment = '')
{ {
$this->db->begin(); $this->db->begin();
@ -419,7 +419,7 @@ class Contrat extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK * @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'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
global $langs, $conf; global $langs, $conf;
@ -547,7 +547,7 @@ class Contrat extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0=execute triggers * @param int $notrigger 1=Does not execute triggers, 0=execute triggers
* @return int <0 if KO, >0 if OK * @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'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
global $langs, $conf; global $langs, $conf;
@ -614,7 +614,7 @@ class Contrat extends CommonObject
* @param string $ref_supplier Supplier ref * @param string $ref_supplier Supplier ref
* @return int <0 if KO, 0 if not found, Id of contract if OK * @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 = "SELECT rowid, statut, ref, fk_soc, mise_en_service as datemise,";
$sql.= " ref_supplier, ref_customer,"; $sql.= " ref_supplier, ref_customer,";
@ -1242,7 +1242,7 @@ class Contrat extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user, $notrigger=0) function update($user, $notrigger = 0)
{ {
global $conf, $langs; global $conf, $langs;
$error=0; $error=0;
@ -1360,7 +1360,7 @@ class Contrat extends CommonObject
* @param string $rang Position * @param string $rang Position
* @return int <0 if KO, >0 if OK * @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; global $user, $langs, $conf, $mysoc;
$error=0; $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 * @param string $fk_unit Code of the unit to use. Null to use the default one
* @return int < 0 si erreur, > 0 si ok * @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; 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 * @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 * @return string Label
*/ */
function LibStatut($statut,$mode) function LibStatut($statut, $mode)
{ {
// phpcs:enable // phpcs:enable
global $langs; 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 * @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 * @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; global $conf, $langs, $user;
@ -2022,7 +2022,7 @@ class Contrat extends CommonObject
* @param int $statut Status of lines to get * @param int $statut Status of lines to get
* @return array Array of line's rowid * @return array Array of line's rowid
*/ */
function array_detail($statut=-1) function array_detail($statut = -1)
{ {
// phpcs:enable // phpcs:enable
$tab=array(); $tab=array();
@ -2059,7 +2059,7 @@ class Contrat extends CommonObject
* @param string $option 'all' or 'others' * @param string $option 'all' or 'others'
* @return array Array of contracts id * @return array Array of contracts id
*/ */
function getListOfContracts($option='all') function getListOfContracts($option = 'all')
{ {
$tab=array(); $tab=array();
@ -2100,7 +2100,7 @@ class Contrat extends CommonObject
* @param string $mode "inactive" pour services a activer, "expired" pour services expires * @param string $mode "inactive" pour services a activer, "expired" pour services expires
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
function load_board($user,$mode) function load_board($user, $mode)
{ {
// phpcs:enable // phpcs:enable
global $conf, $langs; global $conf, $langs;
@ -2336,7 +2336,7 @@ class Contrat extends CommonObject
* @param null|array $moreparams Array to provide more information * @param null|array $moreparams Array to provide more information
* @return int 0 if KO, 1 if OK * @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; global $conf,$langs;
@ -2382,7 +2382,7 @@ class Contrat extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int New id of clone * @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; global $db, $user, $langs, $conf, $hookmanager, $extrafields;
@ -2658,7 +2658,7 @@ class ContratLigne extends CommonObjectLine
* @param string $moreatt More attribute * @param string $moreatt More attribute
* @return string Libelle * @return string Libelle
*/ */
static function LibStatut($statut,$mode,$expired=-1,$moreatt='') static function LibStatut($statut, $mode, $expired = -1, $moreatt = '')
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;
@ -2720,7 +2720,7 @@ class ContratLigne extends CommonObjectLine
* @param int $maxlength Max length * @param int $maxlength Max length
* @return string Chaine avec URL * @return string Chaine avec URL
*/ */
function getNomUrl($withpicto=0,$maxlength=0) function getNomUrl($withpicto = 0, $maxlength = 0)
{ {
global $langs; global $langs;
@ -2747,7 +2747,7 @@ class ContratLigne extends CommonObjectLine
* @param string $ref Ref of contract * @param string $ref Ref of contract
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch($id, $ref='') function fetch($id, $ref = '')
{ {
// Check parameters // Check parameters
@ -2879,7 +2879,7 @@ class ContratLigne extends CommonObjectLine
* @param int $notrigger 0=no, 1=yes (no update trigger) * @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user, $notrigger=0) function update($user, $notrigger = 0)
{ {
global $conf, $langs, $mysoc; global $conf, $langs, $mysoc;
@ -3257,7 +3257,7 @@ class ContratLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @return int <0 if KO, >0 if OK * @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 // phpcs:enable
global $langs, $conf; global $langs, $conf;

View File

@ -337,7 +337,7 @@ if ((! isset($mode) || $mode != 'noajax') && is_object($db)) $db->close();
* @param int $depth Depth * @param int $depth Depth
* @return void * @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 $conf, $db, $langs, $form;
global $dolibarr_main_data_root; global $dolibarr_main_data_root;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -187,7 +187,7 @@ class box_last_modified_ticket extends ModeleBoxes
* @param int $nooutput No print, only return string * @param int $nooutput No print, only return string
* @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); parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
} }

View File

@ -187,7 +187,7 @@ class box_last_ticket extends ModeleBoxes
* @param int $nooutput No print, only return string * @param int $nooutput No print, only return string
* @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); parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More