diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml
index 879d791b8e9..2f1f0735a26 100644
--- a/dev/setup/codesniffer/ruleset.xml
+++ b/dev/setup/codesniffer/ruleset.xml
@@ -65,7 +65,7 @@
0
-
+
diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php
index 123b7f6157d..cb70e9541dc 100644
--- a/dev/translation/autotranslator.class.php
+++ b/dev/translation/autotranslator.class.php
@@ -50,7 +50,7 @@ class autoTranslator
* @param string $_apikey Api key
* @return void
*/
- function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey)
+ function __construct($_destlang, $_refLang, $_langDir, $_limittofile, $_apikey)
{
// Set enviorment variables
@@ -156,7 +156,7 @@ class autoTranslator
* @param string $my_destlang Target language code
* @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');
@@ -183,7 +183,7 @@ class autoTranslator
* @param string $my_destlang Target language code
* @return void
*/
- private function createTranslationFile($path,$my_destlang)
+ private function createTranslationFile($path, $my_destlang)
{
$fp = fopen($path, 'w+');
fwrite($fp, "/*\n");
@@ -205,7 +205,7 @@ class autoTranslator
* @param string $my_destlang Language code (ie: fr_FR)
* @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";
diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php
index e5f1d211f3b..a5b39744e06 100644
--- a/htdocs/accountancy/admin/accountmodel.php
+++ b/htdocs/accountancy/admin/accountmodel.php
@@ -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
* @return void
*/
-function fieldListAccountModel($fieldlist, $obj='', $tabname='', $context='')
+function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf,$langs,$db;
global $form;
diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php
index 1f10403f798..80880c7bbb3 100644
--- a/htdocs/accountancy/admin/categories_list.php
+++ b/htdocs/accountancy/admin/categories_list.php
@@ -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
* @return void
*/
-function fieldListAccountingCategories($fieldlist, $obj='', $tabname='', $context='')
+function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf,$langs,$db;
global $form, $mysoc;
diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php
index 49745676eb3..4611a0ba906 100644
--- a/htdocs/accountancy/admin/journals_list.php
+++ b/htdocs/accountancy/admin/journals_list.php
@@ -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
* @return void
*/
-function fieldListJournal($fieldlist, $obj='', $tabname='', $context='')
+function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf,$langs,$db;
global $form, $mysoc;
diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php
index 5b3282a3b29..70752f6d268 100644
--- a/htdocs/accountancy/class/accountancycategory.class.php
+++ b/htdocs/accountancy/class/accountancycategory.class.php
@@ -142,7 +142,7 @@ class AccountancyCategory // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -239,7 +239,7 @@ class AccountancyCategory // extends CommonObject
* @param string $label Label
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $code='', $label='')
+ function fetch($id, $code = '', $label = '')
{
$sql = "SELECT";
$sql.= " t.rowid,";
@@ -299,7 +299,7 @@ class AccountancyCategory // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -379,7 +379,7 @@ class AccountancyCategory // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -726,7 +726,7 @@ class AccountancyCategory // extends CommonObject
* @param int $year Specifig year - Can be empty
* @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;
@@ -796,7 +796,7 @@ class AccountancyCategory // extends CommonObject
* @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups
* @return array|int Array of groups or -1 if error
*/
- public function getCats($categorytype=-1)
+ public function getCats($categorytype = -1)
{
global $conf, $mysoc;
@@ -853,7 +853,7 @@ class AccountancyCategory // extends CommonObject
* @param string $predefinedgroupwhere Sql criteria filter to select accounting accounts
* @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;
$sql = '';
diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php
index 886e19577fb..38f4e49f2a6 100644
--- a/htdocs/accountancy/class/accountingaccount.class.php
+++ b/htdocs/accountancy/class/accountingaccount.class.php
@@ -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
* @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;
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
* @return string Label of status
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Label of status
*/
- function LibStatut($statut,$mode=0)
+ function LibStatut($statut, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php
index 9bd21a4a5c4..94cfbf3bd66 100644
--- a/htdocs/accountancy/class/accountingjournal.class.php
+++ b/htdocs/accountancy/class/accountingjournal.class.php
@@ -213,7 +213,7 @@ class AccountingJournal extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @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;
@@ -270,7 +270,7 @@ class AccountingJournal extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court
* @return string Label of type
*/
- function getLibType($mode=0)
+ function getLibType($mode = 0)
{
return $this->LibType($this->nature,$mode);
}
@@ -283,7 +283,7 @@ class AccountingJournal extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court
* @return string Label of type
*/
- function LibType($nature,$mode=0)
+ function LibType($nature, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php
index 297fe0e3e9c..047628a7b96 100644
--- a/htdocs/accountancy/class/bookkeeping.class.php
+++ b/htdocs/accountancy/class/bookkeeping.class.php
@@ -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
* @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 $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -470,7 +470,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @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;
@@ -641,7 +641,7 @@ class BookKeeping extends CommonObject
*
* @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;
@@ -1090,7 +1090,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @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;
@@ -1225,7 +1225,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @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;
@@ -1260,7 +1260,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @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);
@@ -1338,7 +1338,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, >0 if OK
*/
- function deleteByYearAndJournal($delyear='', $journal='', $mode='')
+ function deleteByYearAndJournal($delyear = '', $journal = '', $mode = '')
{
global $conf;
@@ -1500,7 +1500,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, >0 if OK
*/
- public function fetchPerMvt($piecenum, $mode='')
+ public function fetchPerMvt($piecenum, $mode = '')
{
global $conf;
@@ -1536,7 +1536,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return string Next numero to use
*/
- public function getNextNumMvt($mode='')
+ public function getNextNumMvt($mode = '')
{
global $conf;
@@ -1565,7 +1565,7 @@ class BookKeeping extends CommonObject
* @param string $mode Mode
* @return int <0 if KO, >0 if OK
*/
- function fetchAllPerMvt($piecenum, $mode='')
+ function fetchAllPerMvt($piecenum, $mode = '')
{
global $conf;
@@ -1687,7 +1687,7 @@ class BookKeeping extends CommonObject
* @param string $piece_num Piece num
* @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;
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 3a698c6b042..ab8fbe8ca06 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -246,7 +246,7 @@ class Adherent extends CommonObject
* @param string $moreinheader Add more html headers
* @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
global $conf,$langs;
@@ -358,7 +358,7 @@ class Adherent extends CommonObject
* @param string $morphy Nature of the adherent (physical or moral)
* @return string Label
*/
- function getmorphylib($morphy='')
+ function getmorphylib($morphy = '')
{
global $langs;
if (! $morphy) { $morphy=$this->morphy; }
@@ -374,7 +374,7 @@ class Adherent extends CommonObject
* @param int $notrigger 1 ne declenche pas les triggers, 0 sinon
* @return int <0 if KO, >0 if OK
*/
- function create($user,$notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf,$langs;
@@ -500,7 +500,7 @@ class Adherent extends CommonObject
* @param string $action Current action for hookmanager
* @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;
@@ -817,7 +817,7 @@ class Adherent extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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;
@@ -927,7 +927,7 @@ class Adherent extends CommonObject
* @param int $nosyncuser Do not synchronize linked user
* @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;
@@ -1147,7 +1147,7 @@ class Adherent extends CommonObject
* @param string $lastname Lastname
* @return void
*/
- function fetch_name($firstname,$lastname)
+ function fetch_name($firstname, $lastname)
{
// phpcs:enable
global $conf;
@@ -1183,7 +1183,7 @@ class Adherent extends CommonObject
* @param bool $fetch_subscriptions To load member subscriptions
* @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;
@@ -1400,7 +1400,7 @@ class Adherent extends CommonObject
* @param int $datesubend Date end subscription
* @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;
@@ -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.
* @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;
@@ -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
* @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;
@@ -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
* @return string Label
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @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
global $langs;
@@ -2307,7 +2307,7 @@ class Adherent extends CommonObject
* @param null|array $moreparams Array to provide more information
* @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;
@@ -2400,7 +2400,7 @@ class Adherent extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
- function _load_ldap_dn($info,$mode=0)
+ function _load_ldap_dn($info, $mode = 0)
{
// phpcs:enable
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'
* @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;
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index 984cf49d44d..263012df782 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -103,7 +103,7 @@ class AdherentType extends CommonObject
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
- function create($user,$notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf;
@@ -170,7 +170,7 @@ class AdherentType extends CommonObject
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
- function update($user,$notrigger=0)
+ function update($user, $notrigger = 0)
{
global $conf, $hookmanager;
@@ -356,7 +356,7 @@ class AdherentType extends CommonObject
* 2=Return array of members id only
* @return mixed Array of members or -1 on error
*/
- function listMembersForMemberType($excludefilter='', $mode=0)
+ function listMembersForMemberType($excludefilter = '', $mode = 0)
{
global $conf, $user;
@@ -411,7 +411,7 @@ class AdherentType extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @return string String with URL
*/
- function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0)
+ function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0)
{
global $langs;
@@ -449,7 +449,7 @@ class AdherentType extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
- function _load_ldap_dn($info,$mode=0)
+ function _load_ldap_dn($info, $mode = 0)
{
// phpcs:enable
global $conf;
diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php
index 310a40c52b3..f5ef24fb465 100644
--- a/htdocs/adherents/class/adherentstats.class.php
+++ b/htdocs/adherents/class/adherentstats.class.php
@@ -52,7 +52,7 @@ class AdherentStats extends Stats
* @param int $socid Id third party
* @param int $userid Id user for filter
*/
- function __construct($db, $socid=0, $userid=0)
+ function __construct($db, $socid = 0, $userid = 0)
{
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
* @return array Array of nb each month
*/
- function getNbByMonth($year, $format=0)
+ function getNbByMonth($year, $format = 0)
{
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
* @return array Array of amount each month
*/
- function getAmountByMonth($year, $format=0)
+ function getAmountByMonth($year, $format = 0)
{
global $user;
diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php
index 2da35df7e2c..a728ffe78d3 100644
--- a/htdocs/adherents/class/api_members.class.php
+++ b/htdocs/adherents/class/api_members.class.php
@@ -361,7 +361,7 @@ class Members extends DolibarrApi
*
* @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) {
throw new RestException(401);
diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php
index 96876eb82b6..319dbb1f75b 100644
--- a/htdocs/adherents/class/subscription.class.php
+++ b/htdocs/adherents/class/subscription.class.php
@@ -207,7 +207,7 @@ $type=$this->fk_type;
* @param int $notrigger 0=Disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user, $notrigger=0)
+ function update($user, $notrigger = 0)
{
$error = 0;
@@ -263,7 +263,7 @@ $type=$this->fk_type;
* @param bool $notrigger false=launch triggers after, true=disable triggers
* @return int <0 if KO, 0 if not found, >0 if OK
*/
- function delete($user, $notrigger=false)
+ function delete($user, $notrigger = false)
{
$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
* @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;
@@ -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
* @return string Label
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
return '';
}
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index fc3b8f15f39..df61d33092a 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -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
* @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 $form;
diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index 553ce2e54e0..e676423e6b0 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -54,7 +54,7 @@ class Dolistore
*
* @param boolean $debug Enable debug of request on screen
*/
- function __construct($debug=false)
+ function __construct($debug = false)
{
global $conf, $langs;
diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php
index da31a794374..a6b2e89cc1a 100644
--- a/htdocs/admin/mails_templates.php
+++ b/htdocs/admin/mails_templates.php
@@ -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
* @return void
*/
-function fieldList($fieldlist, $obj='', $tabname='', $context='')
+function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf, $langs, $user, $db;
global $form;
diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php
index e36b8d59df3..e4cc568ea03 100644
--- a/htdocs/admin/website.php
+++ b/htdocs/admin/website.php
@@ -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
* @return void
*/
-function fieldListWebsites($fieldlist, $obj='', $tabname='', $context='')
+function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '')
{
global $conf,$langs,$db;
global $form;
diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php
index 6d6ef4578cd..10341ce170c 100644
--- a/htdocs/api/class/api.class.php
+++ b/htdocs/api/class/api.class.php
@@ -46,7 +46,7 @@ class DolibarrApi
* @param string $cachedir Cache dir
* @param boolean $refreshCache Update cache
*/
- function __construct($db, $cachedir='', $refreshCache=false)
+ function __construct($db, $cachedir = '', $refreshCache = false)
{
global $conf, $dolibarr_main_url_root;
@@ -222,7 +222,7 @@ class DolibarrApi
* @return bool
* @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
diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php
index 86d1cfff87c..01b0fdd56da 100644
--- a/htdocs/api/class/api_login.class.php
+++ b/htdocs/api/class/api_login.class.php
@@ -55,7 +55,7 @@ class Login
* @url GET /
* @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;
diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php
index 335a9f6e9d1..93f2e88f725 100644
--- a/htdocs/asset/class/asset.class.php
+++ b/htdocs/asset/class/asset.class.php
@@ -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
* @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 $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
* @return string Label of status
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Label of status
*/
- static function LibStatut($status,$mode=0)
+ static function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php
index 51d76d75155..54421b8910f 100644
--- a/htdocs/asset/class/asset_type.class.php
+++ b/htdocs/asset/class/asset_type.class.php
@@ -89,7 +89,7 @@ class AssetType extends CommonObject
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
- function create($user,$notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf;
@@ -166,7 +166,7 @@ class AssetType extends CommonObject
* @param int $notrigger 1=do not execute triggers, 0 otherwise
* @return int >0 if OK, < 0 if KO
*/
- function update($user,$notrigger=0)
+ function update($user, $notrigger = 0)
{
global $conf, $hookmanager;
@@ -350,7 +350,7 @@ class AssetType extends CommonObject
* 2=Return array of asset id only
* @return mixed Array of asset or -1 on error
*/
- function listAssetForAssetType($excludefilter='', $mode=0)
+ function listAssetForAssetType($excludefilter = '', $mode = 0)
{
global $conf, $user;
@@ -405,7 +405,7 @@ class AssetType extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @return string String with URL
*/
- function getNomUrl($withpicto=0, $maxlen=0, $notooltip=0)
+ function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0)
{
global $langs;
diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php
index 0d0fc183b6c..c200bd4d9e5 100644
--- a/htdocs/blockedlog/class/authority.class.php
+++ b/htdocs/blockedlog/class/authority.class.php
@@ -142,7 +142,7 @@ class BlockedLogAuthority
* @param string $signature Signature of object to load
* @return int >0 if OK, <0 if KO, 0 if not found
*/
- public function fetch($id, $signature='')
+ public function fetch($id, $signature = '')
{
global $langs;
diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index bc65c72260d..25c95e2346c 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -725,7 +725,7 @@ class BlockedLog
* @param string $mode 0=unserialize, 1=json_decode
* @return string Value unserialized
*/
- public function dolDecodeBlockedData($data, $mode=0)
+ public function dolDecodeBlockedData($data, $mode = 0)
{
try
{
@@ -763,7 +763,7 @@ class BlockedLog
* @param int $forcesignature Force signature (for example '0000000000' when we disabled the module)
* @return int <0 if KO, >0 if OK
*/
- public function create($user, $forcesignature='')
+ public function create($user, $forcesignature = '')
{
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.
* @return boolean True if OK, False if KO
*/
- public function checkSignature($previoushash='')
+ public function checkSignature($previoushash = '')
{
if (empty($previoushash))
{
@@ -921,7 +921,7 @@ class BlockedLog
* @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)
*/
- public function getPreviousHash($withlock=0, $beforeid=0)
+ public function getPreviousHash($withlock = 0, $beforeid = 0)
{
global $conf;
@@ -972,7 +972,7 @@ class BlockedLog
* @param string $search_code search code
* @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;
@@ -1070,7 +1070,7 @@ class BlockedLog
* @param int $ignoresystem Ignore system events for the test
* @return bool
*/
- function alreadyUsed($ignoresystem=0)
+ function alreadyUsed($ignoresystem = 0)
{
global $conf;
diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php
index ea6ac7a47bd..dca01ea667e 100644
--- a/htdocs/cashdesk/class/Facturation.class.php
+++ b/htdocs/cashdesk/class/Facturation.class.php
@@ -283,7 +283,7 @@ class Facturation
* @param int $aId Id
* @return id
*/
- public function id($aId=null)
+ public function id($aId = null)
{
if ( !$aId )
@@ -308,7 +308,7 @@ class Facturation
* @param string $aRef Ref
* @return string Ref
*/
- public function ref($aRef=null)
+ public function ref($aRef = null)
{
if (is_null($aRef))
@@ -331,7 +331,7 @@ class Facturation
* @param int $aQte Qty
* @return int Qty
*/
- public function qte($aQte=null)
+ public function qte($aQte = null)
{
if (is_null($aQte))
{
@@ -354,7 +354,7 @@ class Facturation
* @param string $aStock Stock
* @return string Stock
*/
- public function stock($aStock=null)
+ public function stock($aStock = null)
{
if (is_null($aStock))
@@ -377,7 +377,7 @@ class Facturation
* @param string $aRemisePercent Discount
* @return string Discount
*/
- public function remisePercent($aRemisePercent=null)
+ public function remisePercent($aRemisePercent = null)
{
if (is_null($aRemisePercent))
@@ -400,7 +400,7 @@ class Facturation
* @param int $aMontantRemise Amount
* @return string Amount
*/
- public function montantRemise($aMontantRemise=null)
+ public function montantRemise($aMontantRemise = null)
{
if (is_null($aMontantRemise)) {
@@ -421,7 +421,7 @@ class Facturation
* @param int $aPrix Price
* @return string Stock
*/
- public function prix($aPrix=null)
+ public function prix($aPrix = null)
{
if (is_null($aPrix)) {
@@ -442,7 +442,7 @@ class Facturation
* @param int $aTva Vat
* @return int Vat
*/
- public function tva($aTva=null)
+ public function tva($aTva = null)
{
if (is_null($aTva)) {
@@ -462,7 +462,7 @@ class Facturation
* @param string $aNumFacture Invoice ref
* @return string Invoice ref
*/
- public function numInvoice($aNumFacture=null)
+ public function numInvoice($aNumFacture = null)
{
if (is_null($aNumFacture)) {
@@ -482,7 +482,7 @@ class Facturation
* @param int $aModeReglement Payment mode
* @return int Payment mode
*/
- public function getSetPaymentMode($aModeReglement=null)
+ public function getSetPaymentMode($aModeReglement = null)
{
if (is_null($aModeReglement)) {
@@ -503,7 +503,7 @@ class Facturation
* @param int $aMontantEncaisse Amount
* @return int Amount
*/
- public function montantEncaisse($aMontantEncaisse=null)
+ public function montantEncaisse($aMontantEncaisse = null)
{
if (is_null($aMontantEncaisse)) {
@@ -524,7 +524,7 @@ class Facturation
* @param int $aMontantRendu Amount
* @return int Amount
*/
- public function montantRendu($aMontantRendu=null)
+ public function montantRendu($aMontantRendu = null)
{
if (is_null($aMontantRendu)) {
@@ -545,7 +545,7 @@ class Facturation
* @param date $aPaiementLe Date
* @return date Date
*/
- public function paiementLe($aPaiementLe=null)
+ public function paiementLe($aPaiementLe = null)
{
if (is_null($aPaiementLe)) {
@@ -565,7 +565,7 @@ class Facturation
* @param int $aTotalHt Total amount
* @return int Total amount
*/
- public function prixTotalHt($aTotalHt=null)
+ public function prixTotalHt($aTotalHt = null)
{
if (is_null($aTotalHt)) {
@@ -585,7 +585,7 @@ class Facturation
* @param int $aMontantTva Amount vat
* @return int Amount vat
*/
- public function montantTva($aMontantTva=null)
+ public function montantTva($aMontantTva = null)
{
if (is_null($aMontantTva)) {
@@ -605,7 +605,7 @@ class Facturation
* @param int $aTotalTtc Amount ttc
* @return int Amount ttc
*/
- public function prixTotalTtc($aTotalTtc=null)
+ public function prixTotalTtc($aTotalTtc = null)
{
if (is_null($aTotalTtc))
{
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index e4d95d490ed..138c5f154fa 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -234,7 +234,7 @@ class Categorie extends CommonObject
* @param string $type Type of category ('product', '...') or (0, 1, ...)
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $label='', $type=null)
+ function fetch($id, $label = '', $type = null)
{
global $conf;
@@ -501,7 +501,7 @@ class Categorie extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 KO >0 OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf,$langs;
@@ -691,7 +691,7 @@ class Categorie extends CommonObject
*
* @return int 1 if OK, -1 if KO
*/
- function del_type($obj,$type)
+ function del_type($obj, $type)
{
// phpcs:enable
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
* @see containsObject
*/
- function getObjectsInCateg($type, $onlyids=0)
+ function getObjectsInCateg($type, $onlyids = 0)
{
$objs = array();
@@ -821,7 +821,7 @@ class Categorie extends CommonObject
* @param int $page Page number
* @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;
@@ -990,7 +990,7 @@ class Categorie extends CommonObject
*
* @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
global $conf, $langs;
@@ -1076,7 +1076,7 @@ class Categorie extends CommonObject
* @param int $protection Deep counter to avoid infinite loop
* @return void
*/
- function build_path_from_id_categ($id_categ,$protection=1000)
+ function build_path_from_id_categ($id_categ, $protection = 1000)
{
// phpcs:enable
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
* @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
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, ...)
* @return array
*/
- function get_main_categories($type=null)
+ function get_main_categories($type = null)
{
// phpcs:enable
return $this->get_all_categories($type, true);
@@ -1248,7 +1248,7 @@ class Categorie extends CommonObject
* @param int $nocolor 0
* @return array
*/
- function print_all_ways($sep = " >> ", $url='', $nocolor=0)
+ function print_all_ways($sep = " >> ", $url = '', $nocolor = 0)
{
// phpcs:enable
$ways = array();
@@ -1376,7 +1376,7 @@ class Categorie extends CommonObject
* labels, 'id'= Get array of category IDs
* @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();
@@ -1522,7 +1522,7 @@ class Categorie extends CommonObject
* @param int $maxlength Max length of text
* @return string Chaine avec URL
*/
- function getNomUrl($withpicto=0,$option='',$maxlength=0)
+ function getNomUrl($withpicto = 0, $option = '', $maxlength = 0)
{
global $langs;
@@ -1608,7 +1608,7 @@ class Categorie extends CommonObject
* @param int $nbmax Nombre maximum de photos (0=pas de max)
* @return array Tableau de photos
*/
- function liste_photos($dir,$nbmax=0)
+ function liste_photos($dir, $nbmax = 0)
{
// phpcs:enable
include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index 05d5fa43c86..949639341da 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -566,7 +566,7 @@ class ActionComm extends CommonObject
* @param string $ref_ext Ref ext to get
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $ref='',$ref_ext='')
+ function fetch($id, $ref = '', $ref_ext = '')
{
global $langs;
@@ -761,7 +761,7 @@ class ActionComm extends CommonObject
* @param int $notrigger 1 = disable triggers, 0 = enable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($notrigger=0)
+ function delete($notrigger = 0)
{
global $user,$langs,$conf;
@@ -838,7 +838,7 @@ class ActionComm extends CommonObject
* @param int $notrigger 1 = disable triggers, 0 = enable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user,$notrigger=0)
+ function update($user, $notrigger = 0)
{
global $langs,$conf,$hookmanager;
@@ -999,7 +999,7 @@ class ActionComm extends CommonObject
* @param string $limit Limit number of answers
* @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;
@@ -1051,7 +1051,7 @@ class ActionComm extends CommonObject
* @param int $load_state_board Charge indicateurs this->nb de tableau de bord
* @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
global $conf, $langs;
@@ -1164,7 +1164,7 @@ class ActionComm extends CommonObject
* @param int $hidenastatus 1=Show nothing if status is "Not applicable"
* @return string String with status
*/
- function getLibStatut($mode,$hidenastatus=0)
+ function getLibStatut($mode, $hidenastatus = 0)
{
return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep);
}
@@ -1179,7 +1179,7 @@ class ActionComm extends CommonObject
* @param int $datestart Date start of event
* @return string Label
*/
- function LibStatut($percent,$mode,$hidenastatus=0,$datestart='')
+ function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '')
{
// phpcs:enable
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
* @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;
@@ -1391,7 +1391,7 @@ class ActionComm extends CommonObject
* @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
*/
- function build_exportfile($format,$type,$cachedelay,$filename,$filters)
+ function build_exportfile($format, $type, $cachedelay, $filename, $filters)
{
// phpcs:enable
global $conf,$langs,$dolibarr_main_url_root,$mysoc;
diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php
index 6631d0e375d..4d5536e50fc 100644
--- a/htdocs/comm/action/class/actioncommreminder.class.php
+++ b/htdocs/comm/action/class/actioncommreminder.class.php
@@ -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
* @return string Label of status
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Label of status
*/
- static function LibStatut($status,$mode=0)
+ static function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php
index d6c25f6d4c1..8efb6ab0515 100644
--- a/htdocs/comm/action/class/cactioncomm.class.php
+++ b/htdocs/comm/action/class/cactioncomm.class.php
@@ -130,7 +130,7 @@ class CActionComm
* @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.
*/
- 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
global $langs,$conf;
@@ -223,7 +223,7 @@ class CActionComm
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Picto only
* @return string Label of action type
*/
- function getNomUrl($withpicto=0)
+ function getNomUrl($withpicto = 0)
{
global $langs;
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index a73731699f2..3d062298f53 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -1277,7 +1277,7 @@ $db->close();
* @param string $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button"
* @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 $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form
diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php
index 67a4534ca14..0c2f3f95c4f 100644
--- a/htdocs/comm/action/pertype.php
+++ b/htdocs/comm/action/pertype.php
@@ -757,7 +757,7 @@ $db->close();
* @param bool $var true or false for alternat style on tr/td
* @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 $user, $conf, $langs, $hookmanager, $action;
diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php
index 9e2a7278a27..6271a9a3880 100644
--- a/htdocs/comm/action/peruser.php
+++ b/htdocs/comm/action/peruser.php
@@ -905,7 +905,7 @@ $db->close();
* @param bool $var true or false for alternat style on tr/td
* @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 $user, $conf, $langs, $hookmanager, $action;
diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php
index 83833304d44..2f88cb2dd9c 100644
--- a/htdocs/comm/mailing/class/advtargetemailing.class.php
+++ b/htdocs/comm/mailing/class/advtargetemailing.class.php
@@ -108,7 +108,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -260,7 +260,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $id Id object
* @return int <0 if KO, >0 if OK
*/
- function fetch_by_mailing($id=0)
+ function fetch_by_mailing($id = 0)
{
// phpcs:enable
global $langs;
@@ -327,7 +327,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param string $type_element Type target
* @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
global $langs;
@@ -390,7 +390,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user, $notrigger=0)
+ function update($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -466,7 +466,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -525,7 +525,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param array $arrayquery All element to Query
* @return int <0 if KO, >0 if OK
*/
- function savequery($user,$arrayquery)
+ function savequery($user, $arrayquery)
{
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
* @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 = '(';
diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
index 19b1ce3e9b4..369c0536a33 100644
--- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
+++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
@@ -92,7 +92,7 @@ class FormAdvTargetEmailing extends Form
* @param array $selected_array or Code or Label of preselected country
* @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;
@@ -194,7 +194,7 @@ class FormAdvTargetEmailing extends Form
* @param array $selected_array selected array
* @return string combo list code
*/
- function multiselectselectLanguage($htmlname='', $selected_array=array())
+ function multiselectselectLanguage($htmlname = '', $selected_array = array())
{
global $conf,$langs;
@@ -290,7 +290,7 @@ class FormAdvTargetEmailing extends Form
* @param array $selected_array Array
* @return string HTML combo
*/
- function multiselectCivility($htmlname='civilite_id',$selected_array = array())
+ function multiselectCivility($htmlname = 'civilite_id', $selected_array = array())
{
global $conf,$langs,$user;
$langs->load("dict");
@@ -356,7 +356,7 @@ class FormAdvTargetEmailing extends Form
* @param array $selected_array value selected
* @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);
}
@@ -368,7 +368,7 @@ class FormAdvTargetEmailing extends Form
* @param array $selected_array value selected
* @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);
}
@@ -381,7 +381,7 @@ class FormAdvTargetEmailing extends Form
* @param int $type Type
* @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;
$langs->load("dict");
@@ -427,7 +427,7 @@ class FormAdvTargetEmailing extends Form
* @param string $type_element Type element. Example: 'mailing'
* @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;
diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php
index b807ea23334..7e1073a0f2a 100644
--- a/htdocs/comm/mailing/class/mailing.class.php
+++ b/htdocs/comm/mailing/class/mailing.class.php
@@ -271,7 +271,7 @@ class Mailing extends CommonObject
* @param int $option2 Not used
* @return int New id of clone
*/
- function createFromClone($fromid,$option1,$option2)
+ function createFromClone($fromid, $option1, $option2)
{
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
* @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 $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
* @return string Label
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Label
*/
- function LibStatut($statut,$mode=0)
+ function LibStatut($statut, $mode = 0)
{
// phpcs:enable
global $langs;
@@ -670,7 +670,7 @@ class Mailing extends CommonObject
* @param strin $desc Desc error
* @return string Label
*/
- public static function libStatutDest($statut,$mode=0,$desc='')
+ public static function libStatutDest($statut, $mode = 0, $desc = '')
{
global $langs;
$langs->load('mails');
diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php
index a03624f3122..6ce38f8c432 100644
--- a/htdocs/comm/propal/class/api_proposals.class.php
+++ b/htdocs/comm/propal/class/api_proposals.class.php
@@ -559,7 +559,7 @@ class Proposals extends DolibarrApi
*
* @return array
*/
- function validate($id, $notrigger=0)
+ function validate($id, $notrigger = 0)
{
if(! DolibarrApiAccess::$user->rights->propal->creer) {
throw new RestException(401);
@@ -607,7 +607,7 @@ class Proposals extends DolibarrApi
*
* @return array
*/
- function close($id, $status, $note_private='', $notrigger=0)
+ function close($id, $status, $note_private = '', $notrigger = 0)
{
if(! DolibarrApiAccess::$user->rights->propal->creer) {
throw new RestException(401);
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 55dd950abf2..d1d3fb086bd 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -239,7 +239,7 @@ class Propal extends CommonObject
* @param int $socid Id third party
* @param int $propalid Id proposal
*/
- function __construct($db, $socid="", $propalid=0)
+ function __construct($db, $socid = "", $propalid = 0)
{
global $conf,$langs;
@@ -267,7 +267,7 @@ class Propal extends CommonObject
* TODO Replace calls to this function by generation objet Ligne
* inserted into table $this->products
*/
- function add_product($idproduct, $qty, $remise_percent=0)
+ function add_product($idproduct, $qty, $remise_percent = 0)
{
// phpcs:enable
global $conf, $mysoc;
@@ -434,7 +434,7 @@ class Propal extends CommonObject
* @return int >0 if OK, <0 if KO
* @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;
@@ -663,7 +663,7 @@ class Propal extends CommonObject
* @param int $notrigger disable line update trigger
* @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;
@@ -869,7 +869,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >=0 if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf,$hookmanager;
$error=0;
@@ -1216,7 +1216,7 @@ class Propal extends CommonObject
* @param int $socid Id of thirdparty
* @return int New id of clone
*/
- function createFromClone($socid=0)
+ function createFromClone($socid = 0)
{
global $user,$conf,$hookmanager;
@@ -1340,7 +1340,7 @@ class Propal extends CommonObject
* @param string $ref Ref of proposal
* @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";
@@ -1504,7 +1504,7 @@ class Propal extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update(User $user, $notrigger=0)
+ function update(User $user, $notrigger = 0)
{
global $conf;
@@ -1599,7 +1599,7 @@ class Propal extends CommonObject
* @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK
*/
- function fetch_lines($only_product=0)
+ function fetch_lines($only_product = 0)
{
// phpcs:enable
$this->lines=array();
@@ -1718,7 +1718,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0=execute triggers
* @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';
@@ -1842,7 +1842,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
- function set_date($user, $date, $notrigger=0)
+ function set_date($user, $date, $notrigger = 0)
{
// phpcs:enable
if (empty($date))
@@ -1911,7 +1911,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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
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
* @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
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
* @return int <0 if KO, >0 if OK
*/
- function set_availability($user, $id, $notrigger=0)
+ function set_availability($user, $id, $notrigger = 0)
{
// phpcs:enable
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
* @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
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
* @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
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
* @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
$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
* @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
$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
* @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;
@@ -2441,7 +2441,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @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;
@@ -2544,7 +2544,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 si ko, >0 si ok
*/
- function classifyBilled(User $user, $notrigger=0)
+ function classifyBilled(User $user, $notrigger = 0)
{
$error=0;
@@ -2600,7 +2600,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
- function set_draft($user, $notrigger=0)
+ function set_draft($user, $notrigger = 0)
{
// phpcs:enable
$error=0;
@@ -2665,7 +2665,7 @@ class Propal extends CommonObject
* @param string $sortorder Sort order
* @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
global $user;
@@ -2833,7 +2833,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int 1 if ok, otherwise if error
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf;
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
* @deprecated use set_availability
*/
- function availability($availability_id, $notrigger=0)
+ function availability($availability_id, $notrigger = 0)
{
global $user;
@@ -3028,7 +3028,7 @@ class Propal extends CommonObject
* @return int >0 si ok, <0 si ko
* @deprecated use set_demand_reason
*/
- function demand_reason($demand_reason_id, $notrigger=0)
+ function demand_reason($demand_reason_id, $notrigger = 0)
{
// phpcs:enable
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
* @return string Label
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Label
*/
- function LibStatut($statut,$mode=1)
+ function LibStatut($statut, $mode = 1)
{
// phpcs:enable
global $conf;
@@ -3213,7 +3213,7 @@ class Propal extends CommonObject
* @param int $mode "opened" for proposal to close, "signed" for proposal to invoice
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
- function load_board($user,$mode)
+ function load_board($user, $mode)
{
// phpcs:enable
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
* @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;
@@ -3585,7 +3585,7 @@ class Propal extends CommonObject
* @param null|array $moreparams Array to provide more information
* @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;
@@ -3854,7 +3854,7 @@ class PropaleLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
- function insert($notrigger=0)
+ function insert($notrigger = 0)
{
global $conf,$user;
@@ -3997,7 +3997,7 @@ class PropaleLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
- function delete(User $user, $notrigger=0)
+ function delete(User $user, $notrigger = 0)
{
global $conf;
@@ -4051,7 +4051,7 @@ class PropaleLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
- function update($notrigger=0)
+ function update($notrigger = 0)
{
global $conf,$user;
diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php
index bdd4a9dfba2..4286bb17448 100644
--- a/htdocs/comm/propal/class/propalestats.class.php
+++ b/htdocs/comm/propal/class/propalestats.class.php
@@ -56,7 +56,7 @@ class PropaleStats extends Stats
* @param int $userid Id user for filter (creation user)
* @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;
@@ -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
* @return array Array with number by month
*/
- function getNbByMonth($year, $format=0)
+ function getNbByMonth($year, $format = 0)
{
global $user;
diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php
index 1135a5c2502..c531948f4cd 100644
--- a/htdocs/commande/class/api_orders.class.php
+++ b/htdocs/commande/class/api_orders.class.php
@@ -496,7 +496,7 @@ class Orders extends DolibarrApi
*
* @return array
*/
- function validate($id, $idwarehouse=0, $notrigger=0)
+ function validate($id, $idwarehouse = 0, $notrigger = 0)
{
if(! DolibarrApiAccess::$user->rights->commande->creer) {
throw new RestException(401);
@@ -629,7 +629,7 @@ class Orders extends DolibarrApi
*
* @return int
*/
- function close($id, $notrigger=0)
+ function close($id, $notrigger = 0)
{
if(! DolibarrApiAccess::$user->rights->commande->creer) {
throw new RestException(401);
@@ -675,7 +675,7 @@ class Orders extends DolibarrApi
*
* @return array
*/
- function settodraft($id, $idwarehouse=-1)
+ function settodraft($id, $idwarehouse = -1)
{
if(! DolibarrApiAccess::$user->rights->commande->creer) {
throw new RestException(401);
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 8934e293973..894f9c5c687 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -313,7 +313,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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;
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)
* @return int <0 if KO, >0 if OK
*/
- function set_draft($user, $idwarehouse=-1)
+ function set_draft($user, $idwarehouse = -1)
{
//phpcs:enable
global $conf,$langs;
@@ -617,7 +617,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @return int <0 if KO, >0 if OK
*/
- function cloture($user, $notrigger=0)
+ function cloture($user, $notrigger = 0)
{
global $conf;
@@ -677,7 +677,7 @@ class Commande extends CommonOrder
* @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, >0 if OK
*/
- function cancel($idwarehouse=-1)
+ function cancel($idwarehouse = -1)
{
global $conf,$user,$langs;
@@ -758,7 +758,7 @@ class Commande extends CommonOrder
* @param int $notrigger Disable all triggers
* @return int <0 if KO, >0 if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf,$langs;
$error=0;
@@ -1060,7 +1060,7 @@ class Commande extends CommonOrder
* @param int $socid Id of thirdparty
* @return int New id of clone
*/
- function createFromClone($socid=0)
+ function createFromClone($socid = 0)
{
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)
* 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;
@@ -1531,7 +1531,7 @@ class Commande extends CommonOrder
* TODO Remplacer les appels a cette fonction par generation objet Ligne
* 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
global $conf, $mysoc;
@@ -1616,7 +1616,7 @@ class Commande extends CommonOrder
* @param string $ref_int Internal reference of other object
* @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
@@ -1845,7 +1845,7 @@ class Commande extends CommonOrder
* @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK
*/
- function fetch_lines($only_product=0)
+ function fetch_lines($only_product = 0)
{
// phpcs:enable
$this->lines=array();
@@ -2027,7 +2027,7 @@ class Commande extends CommonOrder
* @param int $filtre_statut Filter on shipment status
* @return int <0 if KO, Nb of lines found if OK
*/
- function loadExpeditions($filtre_statut=-1)
+ function loadExpeditions($filtre_statut = -1)
{
$this->expeditions = array();
@@ -2103,7 +2103,7 @@ class Commande extends CommonOrder
*
* TODO FONCTION NON FINIE A FINIR
*/
- function stock_array($filtre_statut=self::STATUS_CANCELED)
+ function stock_array($filtre_statut = self::STATUS_CANCELED)
{
// phpcs:enable
$this->stocks = array();
@@ -2143,7 +2143,7 @@ class Commande extends CommonOrder
* @param int $lineid Id of line to delete
* @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)
{
@@ -2221,7 +2221,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
- function set_remise($user, $remise, $notrigger=0)
+ function set_remise($user, $remise, $notrigger = 0)
{
// phpcs:enable
$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
* @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
$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
* @return int <0 if KO, >0 if OK
*/
- function set_date($user, $date, $notrigger=0)
+ function set_date($user, $date, $notrigger = 0)
{
// phpcs:enable
if ($user->rights->commande->creer)
@@ -2423,7 +2423,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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
if ($user->rights->commande->creer)
@@ -2494,7 +2494,7 @@ class Commande extends CommonOrder
* @param string $sortorder Sort order
* @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
global $user;
@@ -2562,7 +2562,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int >0 if OK, <0 if KO
*/
- function availability($availability_id, $notrigger=0)
+ function availability($availability_id, $notrigger = 0)
{
global $user;
@@ -2633,7 +2633,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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
global $user;
@@ -2706,7 +2706,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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
if ($user->rights->commande->creer)
@@ -2769,7 +2769,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
- function classifyBilled(User $user, $notrigger=0)
+ function classifyBilled(User $user, $notrigger = 0)
{
$error = 0;
@@ -2904,7 +2904,7 @@ class Commande extends CommonOrder
* @param int $notrigger disable line update trigger
* @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;
@@ -3094,7 +3094,7 @@ class Commande extends CommonOrder
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update(User $user, $notrigger=0)
+ function update(User $user, $notrigger = 0)
{
global $conf;
@@ -3189,7 +3189,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <=0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
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
* @return string Label of status
*/
- function LibStatut($statut,$billed,$mode,$donotshowbilled=0)
+ function LibStatut($statut, $billed, $mode, $donotshowbilled = 0)
{
// phpcs:enable
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
* @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;
@@ -3782,7 +3782,7 @@ class Commande extends CommonOrder
* @param null|array $moreparams Array to provide more information
* @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;
@@ -4022,7 +4022,7 @@ class OrderLine extends CommonOrderLine
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 si ko, >0 si ok
*/
- function delete(User $user, $notrigger=0)
+ function delete(User $user, $notrigger = 0)
{
global $conf, $langs;
@@ -4083,7 +4083,7 @@ class OrderLine extends CommonOrderLine
* @param int $notrigger 1 = disable triggers
* @return int <0 if KO, >0 if OK
*/
- function insert($user=null, $notrigger=0)
+ function insert($user = null, $notrigger = 0)
{
global $langs, $conf;
@@ -4228,7 +4228,7 @@ class OrderLine extends CommonOrderLine
* @param int $notrigger 1 = disable triggers
* @return int <0 si ko, >0 si ok
*/
- function update(User $user, $notrigger=0)
+ function update(User $user, $notrigger = 0)
{
global $conf,$langs;
diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php
index 3c6ec07c6cb..edd072854d3 100644
--- a/htdocs/commande/class/commandestats.class.php
+++ b/htdocs/commande/class/commandestats.class.php
@@ -55,7 +55,7 @@ class CommandeStats extends Stats
* @param string $mode Option ('customer', 'supplier')
* @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;
@@ -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
* @return array Array with number by month
*/
- function getNbByMonth($year, $format=0)
+ function getNbByMonth($year, $format = 0)
{
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
* @return array Array with amount by month
*/
- function getAmountByMonth($year, $format=0)
+ function getAmountByMonth($year, $format = 0)
{
global $user;
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 80a0c6f819b..cb00e201bc6 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -352,7 +352,7 @@ class Account extends CommonObject
* @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
*/
- function get_url($fk_bank='', $url_id='', $type='')
+ function get_url($fk_bank = '', $url_id = '', $type = '')
{
// phpcs:enable
$lines = array();
@@ -417,7 +417,7 @@ class Account extends CommonObject
* @param int $datev Date value
* @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
if (is_numeric($oper)) {
@@ -525,7 +525,7 @@ class Account extends CommonObject
* @param int $notrigger 1=Disable triggers
* @return int < 0 if KO, > 0 if OK
*/
- function create(User $user, $notrigger=0)
+ function create(User $user, $notrigger = 0)
{
global $langs,$conf, $hookmanager;
@@ -860,7 +860,7 @@ class Account extends CommonObject
* @param string $ref Ref of bank account to get
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $ref='')
+ function fetch($id, $ref = '')
{
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
* @return string Label
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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)
* @return int Current sold (value date <= today)
*/
- function solde($option=0)
+ function solde($option = 0)
{
$solde=0;
@@ -1329,7 +1329,7 @@ class Account extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @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;
@@ -1549,7 +1549,7 @@ class Account extends CommonObject
* @return array
* @see useDetailedBBAN
*/
- public function getFieldsToShow($includeibanbic=0)
+ public function getFieldsToShow($includeibanbic = 0)
{
//Get the required properties depending on the country
$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)
* @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;
@@ -2011,7 +2011,7 @@ class AccountLine extends CommonObject
* @param int $conciliated 1=Set transaction to conciliated, 0=Keep transaction non conciliated
* @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
global $conf,$langs;
@@ -2075,7 +2075,7 @@ class AccountLine extends CommonObject
* @param int $sign 1 or -1
* @return int >0 if OK, 0 if KO
*/
- function datev_change($rowid,$sign=1)
+ function datev_change($rowid, $sign = 1)
{
// phpcs:enable
$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
* @return int >0 if OK, 0 if KO
*/
- function dateo_change($rowid,$sign=1)
+ function dateo_change($rowid, $sign = 1)
{
// phpcs:enable
$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
* @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;
@@ -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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle du statut
*/
- function LibStatut($statut,$mode=0)
+ function LibStatut($statut, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php
index ffe01f41e7a..feaaccaa50f 100644
--- a/htdocs/compta/bank/class/api_bankaccounts.class.php
+++ b/htdocs/compta/bank/class/api_bankaccounts.class.php
@@ -325,7 +325,7 @@ class BankAccounts extends DolibarrApi
*
* @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) {
throw new RestException(401);
diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php
index 47edacb2410..cb8f21ecc5a 100644
--- a/htdocs/compta/bank/class/paymentvarious.class.php
+++ b/htdocs/compta/bank/class/paymentvarious.class.php
@@ -111,7 +111,7 @@ class PaymentVarious extends CommonObject
* @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
@@ -181,7 +181,7 @@ class PaymentVarious extends CommonObject
* @param User $user User that load
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $user=null)
+ function fetch($id, $user = null)
{
global $langs;
$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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle
*/
- function LibStatut($statut,$mode=0)
+ function LibStatut($statut, $mode = 0)
{
// phpcs:enable
global $langs;
@@ -567,7 +567,7 @@ class PaymentVarious extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @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 $langs;
diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
index d0a10ec94da..946658208df 100644
--- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php
+++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php
@@ -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
* @return string Label of status
*/
- public function getLibStatut($mode=0)
+ public function getLibStatut($mode = 0)
{
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
* @return string Label of status
*/
- public function LibStatut($status, $mode=0)
+ public function LibStatut($status, $mode = 0)
{
// phpcs:enable
if (empty($this->labelstatus))
@@ -364,7 +364,7 @@ class CashControl extends CommonObject
* @param int $notooltip No tooltip
* @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;
include_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php
index 2c21c2694ae..60108eed794 100644
--- a/htdocs/compta/deplacement/class/deplacement.class.php
+++ b/htdocs/compta/deplacement/class/deplacement.class.php
@@ -245,7 +245,7 @@ class Deplacement extends CommonObject
* @param string $ref Ref of record
* @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.= " 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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle
*/
- function LibStatut($statut,$mode=0)
+ function LibStatut($statut, $mode = 0)
{
// phpcs:enable
global $langs;
@@ -374,7 +374,7 @@ class Deplacement extends CommonObject
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
* @return string Chaine avec URL
*/
- function getNomUrl($withpicto=0)
+ function getNomUrl($withpicto = 0)
{
global $langs;
@@ -400,7 +400,7 @@ class Deplacement extends CommonObject
* @param int $active Active or not
* @return array
*/
- function listOfTypes($active=1)
+ function listOfTypes($active = 1)
{
global $langs;
diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php
index ae93eb094d9..542fe49e503 100644
--- a/htdocs/compta/deplacement/class/deplacementstats.class.php
+++ b/htdocs/compta/deplacement/class/deplacementstats.class.php
@@ -50,7 +50,7 @@ class DeplacementStats extends Stats
* @param mixed $userid Id user for filter or array of user ids
* @return void
*/
- function __construct($db, $socid=0, $userid=0)
+ function __construct($db, $socid = 0, $userid = 0)
{
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
* @return array Array of values
*/
- function getNbByMonth($year, $format=0)
+ function getNbByMonth($year, $format = 0)
{
$sql = "SELECT MONTH(dated) as dm, count(*)";
$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
* @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.= " FROM ".$this->from;
diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php
index 04c2bedeb41..e145ed477aa 100644
--- a/htdocs/compta/facture/class/api_invoices.class.php
+++ b/htdocs/compta/facture/class/api_invoices.class.php
@@ -104,7 +104,7 @@ class Invoices extends DolibarrApi
*
* @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;
@@ -600,7 +600,7 @@ class Invoices extends DolibarrApi
* @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) {
throw new RestException(401);
@@ -650,7 +650,7 @@ class Invoices extends DolibarrApi
* @throws 500
*
*/
- function settodraft($id, $idwarehouse=-1)
+ function settodraft($id, $idwarehouse = -1)
{
if(! DolibarrApiAccess::$user->rights->facture->creer) {
throw new RestException(401);
@@ -702,7 +702,7 @@ class Invoices extends DolibarrApi
*
* @return array
*/
- function validate($id, $idwarehouse=0, $notrigger=0)
+ function validate($id, $idwarehouse = 0, $notrigger = 0)
{
if(! DolibarrApiAccess::$user->rights->facture->creer) {
throw new RestException(401);
@@ -753,7 +753,7 @@ class Invoices extends DolibarrApi
* @throws 404
* @throws 500
*/
- function settopaid($id, $close_code='', $close_note='')
+ function settopaid($id, $close_code = '', $close_note = '')
{
if(! DolibarrApiAccess::$user->rights->facture->creer) {
throw new RestException(401);
@@ -994,7 +994,7 @@ class Invoices extends DolibarrApi
* @throws 401
* @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;
@@ -1114,7 +1114,7 @@ class Invoices extends DolibarrApi
* @throws 403
* @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;
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 5090132632e..39df40cc260 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -321,7 +321,7 @@ class FactureRec extends CommonInvoice
* @param int $ref_int Internal reference of other object
* @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.= ', 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.
* @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;
@@ -644,7 +644,7 @@ class FactureRec extends CommonInvoice
* @param int $date_end_fill 1=Flag to fill end date when generating invoice
* @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;
@@ -826,7 +826,7 @@ class FactureRec extends CommonInvoice
* @param int $date_end_fill 1=Flag to fill end date when generating invoice
* @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;
@@ -1002,7 +1002,7 @@ class FactureRec extends CommonInvoice
* @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)
*/
- function createRecurringInvoices($restrictioninvoiceid=0, $forcevalidation=0)
+ function createRecurringInvoices($restrictioninvoiceid = 0, $forcevalidation = 0)
{
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
* @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;
@@ -1210,7 +1210,7 @@ class FactureRec extends CommonInvoice
* @param integer $alreadypaid Not used on recurring invoices
* @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);
@@ -1227,7 +1227,7 @@ class FactureRec extends CommonInvoice
* @param int $type Type invoice
* @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
global $langs;
@@ -1328,7 +1328,7 @@ class FactureRec extends CommonInvoice
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
* @return void
*/
- function initAsSpecimen($option='')
+ function initAsSpecimen($option = '')
{
global $user,$langs,$conf;
@@ -1480,7 +1480,7 @@ class FactureRec extends CommonInvoice
* @param string $unit unit of frequency (d, m, y)
* @return int <0 if KO, >0 if OK
*/
- function setFrequencyAndUnit($frequency,$unit)
+ function setFrequencyAndUnit($frequency, $unit)
{
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
* @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)
{
@@ -1823,7 +1823,7 @@ class FactureLigneRec extends CommonInvoiceLine
* @param int $notrigger No trigger
* @return int <0 if KO, Id of line if OK
*/
- function update(User $user, $notrigger=0)
+ function update(User $user, $notrigger = 0)
{
global $conf;
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 3e4335774c9..bc689118426 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -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
* @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;
$error=0;
@@ -854,7 +854,7 @@ class Facture extends CommonInvoice
* @param int $invertdetail Reverse sign of amounts for lines
* @return int <0 if KO, >0 if OK
*/
- function createFromCurrent(User $user, $invertdetail=0)
+ function createFromCurrent(User $user, $invertdetail = 0)
{
global $conf;
@@ -945,7 +945,7 @@ class Facture extends CommonInvoice
* @param int $socid Id of thirdparty
* @return int New id of clone
*/
- function createFromClone($socid=0)
+ function createFromClone($socid = 0)
{
global $user,$hookmanager, $conf;
@@ -1162,7 +1162,7 @@ class Facture extends CommonInvoice
* @param int $withpicto Add download picto into link
* @return string HTML link to file
*/
- function getDirectExternalLink($withpicto=0)
+ function getDirectExternalLink($withpicto = 0)
{
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
* @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;
@@ -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
* @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;
@@ -1604,7 +1604,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update(User $user, $notrigger=0)
+ function update(User $user, $notrigger = 0)
{
global $conf;
@@ -1819,7 +1819,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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
global $user;
@@ -1884,7 +1884,7 @@ class Facture extends CommonInvoice
* @param int $idwarehouse Id warehouse to use for stock change.
* @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;
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)
* @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
$error=0;
@@ -2168,7 +2168,7 @@ class Facture extends CommonInvoice
* @param string $close_note Comment
* @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
@@ -2231,7 +2231,7 @@ class Facture extends CommonInvoice
* @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
*/
- function validate($user, $force_number='', $idwarehouse=0, $notrigger=0)
+ function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0)
{
global $conf,$langs;
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.
* @return int <0 if KO, >0 if OK
*/
- function set_draft($user,$idwarehouse=-1)
+ function set_draft($user, $idwarehouse = -1)
{
// phpcs:enable
global $conf,$langs;
@@ -2649,7 +2649,7 @@ class Facture extends CommonInvoice
* @param double $pu_ht_devise Unit price in currency
* @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
if ($label) {
@@ -2879,7 +2879,7 @@ class Facture extends CommonInvoice
* @param int $notrigger disable line update trigger
* @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;
// Deprecation warning
@@ -3197,7 +3197,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
- function set_remise($user, $remise, $notrigger=0)
+ function set_remise($user, $remise, $notrigger = 0)
{
// phpcs:enable
// Clean parameters
@@ -3263,7 +3263,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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
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
* @return string free ref or last ref
*/
- function getNextNumRef($soc,$mode='next')
+ function getNextNumRef($soc, $mode = 'next')
{
global $conf, $langs;
$langs->load("bills");
@@ -3472,7 +3472,7 @@ class Facture extends CommonInvoice
* @param string $sortorder Sort order
* @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
global $conf,$user;
@@ -3543,7 +3543,7 @@ class Facture extends CommonInvoice
* @param int $socid Id thirdparty
* @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
global $conf;
@@ -3593,7 +3593,7 @@ class Facture extends CommonInvoice
* @param int $socid Id thirdparty
* @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
global $conf;
@@ -3668,7 +3668,7 @@ class Facture extends CommonInvoice
* @param float $amount Amount we request direct debit for
* @return int <0 if KO, >0 if OK
*/
- function demande_prelevement($fuser, $amount=0)
+ function demande_prelevement($fuser, $amount = 0)
{
// phpcs:enable
@@ -3894,7 +3894,7 @@ class Facture extends CommonInvoice
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
* @return void
*/
- function initAsSpecimen($option='')
+ function initAsSpecimen($option = '')
{
global $langs;
@@ -4110,7 +4110,7 @@ class Facture extends CommonInvoice
* @param null|array $moreparams Array to provide more information
* @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;
@@ -4215,7 +4215,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
- function setFinal(User $user, $notrigger=0)
+ function setFinal(User $user, $notrigger = 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
* @return int <0 if KO, >0 if OK
*/
- function insert($notrigger=0, $noerrorifdiscountalreadylinked=0)
+ function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0)
{
global $langs,$user,$conf;
@@ -4729,7 +4729,7 @@ class FactureLigne extends CommonInvoiceLine
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user='',$notrigger=0)
+ function update($user = '', $notrigger = 0)
{
global $user,$conf;
@@ -4945,7 +4945,7 @@ class FactureLigne extends CommonInvoiceLine
* @param bool $include_credit_note Include credit note or not
* @return int >= 0
*/
- function get_prev_progress($invoiceid, $include_credit_note=true)
+ function get_prev_progress($invoiceid, $include_credit_note = true)
{
// phpcs:enable
if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {
diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php
index 4cf9477613e..ea065d81636 100644
--- a/htdocs/compta/facture/class/facturestats.class.php
+++ b/htdocs/compta/facture/class/facturestats.class.php
@@ -53,7 +53,7 @@ class FactureStats extends Stats
* @param string $mode Option ('customer', 'supplier')
* @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;
@@ -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
* @return array Array of values
*/
- function getNbByMonth($year, $format=0)
+ function getNbByMonth($year, $format = 0)
{
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
* @return array Array with amount by month
*/
- function getAmountByMonth($year, $format=0)
+ function getAmountByMonth($year, $format = 0)
{
global $user;
diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php
index 55a3e40b55f..3d4f0881de2 100644
--- a/htdocs/compta/facture/class/paymentterm.class.php
+++ b/htdocs/compta/facture/class/paymentterm.class.php
@@ -82,7 +82,7 @@ class PaymentTerm // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -268,7 +268,7 @@ class PaymentTerm // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
@@ -345,7 +345,7 @@ class PaymentTerm // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php
index 49c95c26c2e..d80b9cc4783 100644
--- a/htdocs/compta/localtax/class/localtax.class.php
+++ b/htdocs/compta/localtax/class/localtax.class.php
@@ -163,7 +163,7 @@ class Localtax extends CommonObject
* @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK
*/
- function update(User $user, $notrigger=0)
+ function update(User $user, $notrigger = 0)
{
global $conf, $langs;
@@ -628,7 +628,7 @@ class Localtax extends CommonObject
* @param string $option Sur quoi pointe le lien
* @return string Chaine avec URL
*/
- function getNomUrl($withpicto=0, $option='')
+ function getNomUrl($withpicto = 0, $option = '')
{
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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle du statut
*/
- function LibStatut($status, $mode=0)
+ function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
index 28973d3c4e2..34dd599f35a 100644
--- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php
+++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
@@ -84,7 +84,7 @@ class RemiseCheque extends CommonObject
* @param string $ref Ref record
* @return int <0 if KO, > 0 if OK
*/
- function fetch($id,$ref='')
+ function fetch($id, $ref = '')
{
global $conf;
@@ -299,7 +299,7 @@ class RemiseCheque extends CommonObject
* @param User $user Utilisateur qui effectue l'operation
* @return int
*/
- function delete($user='')
+ function delete($user = '')
{
global $conf;
@@ -416,7 +416,7 @@ class RemiseCheque extends CommonObject
* @param string $mode 'next' for next value or 'last' for last value
* @return string free ref or last ref
*/
- function getNextNumRef($mode='next')
+ function getNextNumRef($mode = 'next')
{
global $conf, $db, $langs, $mysoc;
$langs->load("bills");
@@ -988,7 +988,7 @@ class RemiseCheque extends CommonObject
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
* @return void
*/
- function initAsSpecimen($option='')
+ function initAsSpecimen($option = '')
{
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
* @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;
@@ -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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle du statut
*/
- function LibStatut($status,$mode=0)
+ function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php
index c4cb529d895..4e729e9c37b 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -157,7 +157,7 @@ class Paiement extends CommonObject
* @param int $fk_bank Id of bank line associated to payment
* @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.= ' 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
* @return int id of created payment, < 0 if error
*/
- function create($user, $closepaidinvoices=0)
+ function create($user, $closepaidinvoices = 0)
{
global $conf, $langs;
@@ -488,7 +488,7 @@ class Paiement extends CommonObject
* @param int $notrigger No trigger
* @return int <0 si ko, >0 si ok
*/
- function delete($notrigger=0)
+ function delete($notrigger = 0)
{
global $conf, $user, $langs;
@@ -598,7 +598,7 @@ class Paiement extends CommonObject
* @param int $notrigger No trigger
* @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;
@@ -897,7 +897,7 @@ class Paiement extends CommonObject
* @param User $user User making validation
* @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;
@@ -921,7 +921,7 @@ class Paiement extends CommonObject
* @param User $user User making reject
* @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;
@@ -989,7 +989,7 @@ class Paiement extends CommonObject
* @param string $filter Critere de filtre
* @return array Tableau des id de factures
*/
- function getBillsArray($filter='')
+ function getBillsArray($filter = '')
{
$sql = 'SELECT fk_facture';
$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
* @return string free ref or last ref
*/
- function getNextNumRef($soc,$mode='next')
+ function getNextNumRef($soc, $mode = 'next')
{
global $conf, $db, $langs;
$langs->load("bills");
@@ -1138,7 +1138,7 @@ class Paiement extends CommonObject
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
* @return void
*/
- function initAsSpecimen($option='')
+ function initAsSpecimen($option = '')
{
global $user,$langs,$conf;
@@ -1164,7 +1164,7 @@ class Paiement extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @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;
@@ -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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle du statut
*/
- function LibStatut($status,$mode=0)
+ function LibStatut($status, $mode = 0)
{
// phpcs:enable
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
* @return int <0 if KO, >0 if OK
*/
- function fetch_thirdparty($force_thirdparty_id=0)
+ function fetch_thirdparty($force_thirdparty_id = 0)
{
// phpcs:enable
include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 3f7dd23059d..f39ed254df3 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -81,7 +81,7 @@ class BonPrelevement extends CommonObject
* @param DoliDB $db Database handler
* @param string $filename Filename of withdraw receipt
*/
- function __construct($db, $filename='')
+ function __construct($db, $filename = '')
{
global $conf,$langs;
@@ -276,7 +276,7 @@ class BonPrelevement extends CommonObject
* @param string $ref Ref of direct debit
* @return int >0 if OK, <0 if KO
*/
- function fetch($rowid, $ref='')
+ function fetch($rowid, $ref = '')
{
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
* @return array Id of invoices
*/
- private function getListInvoices($amounts=0)
+ private function getListInvoices($amounts = 0)
{
global $conf;
@@ -731,7 +731,7 @@ class BonPrelevement extends CommonObject
* @param int $agence dolibarr mysoc agence
* @return int 0 if OK, <0 if KO
*/
- function delete($user=null)
+ function delete($user = null)
{
$this->db->begin();
@@ -1178,7 +1178,7 @@ class BonPrelevement extends CommonObject
* @param string $option link target
* @return string URL of target
*/
- function getNomUrl($withpicto=0,$option='')
+ function getNomUrl($withpicto = 0, $option = '')
{
global $langs;
@@ -1299,7 +1299,7 @@ class BonPrelevement extends CommonObject
* @param string $executiondate Date to execute transfer
* @return int 0 if OK, <0 if KO
*/
- function generate($format='ALL',$executiondate='')
+ function generate($format = 'ALL', $executiondate = '')
{
global $conf,$langs,$mysoc;
@@ -1493,7 +1493,7 @@ class BonPrelevement extends CommonObject
* @param string $rib_dom rib domiciliation
* @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
fputs($this->file, "06");
@@ -1726,7 +1726,7 @@ class BonPrelevement extends CommonObject
* @param string $format FRST or RCUR or ALL
* @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
// SEPA INITIALISATION
@@ -1905,7 +1905,7 @@ class BonPrelevement extends CommonObject
* @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
* @return string Label
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Label
*/
- function LibStatut($statut,$mode=0)
+ function LibStatut($statut, $mode = 0)
{
// phpcs:enable
if (empty($this->labelstatut))
diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php
index 7e100022c7a..d47eb32504a 100644
--- a/htdocs/compta/prelevement/class/ligneprelevement.class.php
+++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php
@@ -123,7 +123,7 @@ class LignePrelevement
* @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
* @return string Label
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Label
*/
- function LibStatut($statut,$mode=0)
+ function LibStatut($statut, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php
index 4797121a24c..46b4242944b 100644
--- a/htdocs/compta/prelevement/class/rejetprelevement.class.php
+++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php
@@ -82,7 +82,7 @@ class RejetPrelevement
* @param int $facturation Facturation
* @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;
@@ -282,7 +282,7 @@ class RejetPrelevement
* @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 ?
*/
- private function getListInvoices($amounts=0)
+ private function getListInvoices($amounts = 0)
{
global $conf;
diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php
index 76a8284daff..8f55b5804cc 100644
--- a/htdocs/compta/salaries/class/paymentsalary.class.php
+++ b/htdocs/compta/salaries/class/paymentsalary.class.php
@@ -108,7 +108,7 @@ class PaymentSalary extends CommonObject
* @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
@@ -189,7 +189,7 @@ class PaymentSalary extends CommonObject
* @param User $user User that load
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $user=null)
+ function fetch($id, $user = null)
{
global $langs;
$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
* @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 $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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle du statut
*/
- function LibStatut($status,$mode=0)
+ function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php
index 82a8d094148..0c91ee29309 100644
--- a/htdocs/compta/salaries/class/salariesstats.class.php
+++ b/htdocs/compta/salaries/class/salariesstats.class.php
@@ -49,7 +49,7 @@ class SalariesStats extends Stats
* @param mixed $userid Id user for filter or array of user ids
* @return void
*/
- function __construct($db, $socid=0, $userid=0)
+ function __construct($db, $socid = 0, $userid = 0)
{
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
* @return array Array of values
*/
- function getNbByMonth($year, $format=0)
+ function getNbByMonth($year, $format = 0)
{
$sql = "SELECT MONTH(datep) as dm, count(*)";
$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
* @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.= " FROM ".$this->from;
diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php
index 9e13ffcd8a5..f7c829294f8 100644
--- a/htdocs/compta/sociales/class/cchargesociales.class.php
+++ b/htdocs/compta/sociales/class/cchargesociales.class.php
@@ -404,7 +404,7 @@ class Cchargesociales
* @param string $morecss Add more css on link
* @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 $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
* @return string Label of status
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Label of status
*/
- function LibStatut($status,$mode=0)
+ function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php
index cca5a4d7dd2..1828e750914 100644
--- a/htdocs/compta/sociales/class/chargesociales.class.php
+++ b/htdocs/compta/sociales/class/chargesociales.class.php
@@ -93,7 +93,7 @@ class ChargeSociales extends CommonObject
* @param string $ref Ref
* @return int <0 KO >0 OK
*/
- function fetch($id, $ref='')
+ function fetch($id, $ref = '')
{
$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";
@@ -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)
* @return string Label
*/
- function getLibStatut($mode=0,$alreadypaid=-1)
+ function getLibStatut($mode = 0, $alreadypaid = -1)
{
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)
* @return string Label
*/
- function LibStatut($statut,$mode=0,$alreadypaid=-1)
+ function LibStatut($statut, $mode = 0, $alreadypaid = -1)
{
// phpcs:enable
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
* @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;
diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
index 74ddce68230..bd678904df6 100644
--- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
+++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
@@ -104,7 +104,7 @@ class PaymentSocialContribution extends CommonObject
* @param int $closepaidcontrib 1=Also close payed contributions to paid, 0=Do nothing more
* @return int <0 if KO, id of payment if OK
*/
- function create($user, $closepaidcontrib=0)
+ function create($user, $closepaidcontrib = 0)
{
global $conf, $langs;
@@ -292,7 +292,7 @@ class PaymentSocialContribution extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -379,7 +379,7 @@ class PaymentSocialContribution extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -540,7 +540,7 @@ class PaymentSocialContribution extends CommonObject
* @param string $emetteur_banque Name of bank
* @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;
@@ -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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle du statut
*/
- function LibStatut($status,$mode=0)
+ function LibStatut($status, $mode = 0)
{
// phpcs:enable
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
* @return string Chaine avec URL
*/
- function getNomUrl($withpicto=0,$maxlen=0)
+ function getNomUrl($withpicto = 0, $maxlen = 0)
{
global $langs;
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index 33d48de8bfc..5da7b0e144c 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -173,7 +173,7 @@ class Tva extends CommonObject
* @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK
*/
- function update($user, $notrigger=0)
+ function update($user, $notrigger = 0)
{
global $conf, $langs;
@@ -241,7 +241,7 @@ class Tva extends CommonObject
* @param User $user User that load
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $user=null)
+ function fetch($id, $user = null)
{
global $langs;
$sql = "SELECT";
@@ -687,7 +687,7 @@ class Tva extends CommonObject
* @param string $morecss More CSS
* @return string Chaine with URL
*/
- function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='')
+ function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '')
{
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
* @return string Libelle
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
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
* @return string Libelle du statut
*/
- function LibStatut($status,$mode=0)
+ function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index a5297750386..d5b5afa4433 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -313,7 +313,7 @@ class Contact extends CommonObject
* @param int $nosyncuser No sync linked user (external users and contacts are linked)
* @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;
@@ -501,7 +501,7 @@ class Contact extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
- function _load_ldap_dn($info,$mode=0)
+ function _load_ldap_dn($info, $mode = 0)
{
// phpcs:enable
global $conf;
@@ -597,7 +597,7 @@ class Contact extends CommonObject
* @param int $notrigger 0=no, 1=yes
* @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
$error=0;
@@ -686,7 +686,7 @@ class Contact extends CommonObject
* @param string $email Email
* @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;
@@ -931,7 +931,7 @@ class Contact extends CommonObject
* @param int $notrigger Disable all trigger
* @return int <0 if KO, >0 if OK
*/
- function delete($notrigger=0)
+ function delete($notrigger = 0)
{
global $conf, $langs, $user;
@@ -1124,7 +1124,7 @@ class Contact extends CommonObject
* @param int $notooltip 1=Disable tooltip
* @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;
@@ -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
* @return string Libelle
*/
- function LibStatut($statut,$mode)
+ function LibStatut($statut, $mode)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php
index 585d5399771..8631becc515 100644
--- a/htdocs/contrat/class/api_contracts.class.php
+++ b/htdocs/contrat/class/api_contracts.class.php
@@ -555,7 +555,7 @@ class Contracts extends DolibarrApi
* "notrigger": 0
* }
*/
- function validate($id, $notrigger=0)
+ function validate($id, $notrigger = 0)
{
if (! DolibarrApiAccess::$user->rights->contrat->creer) {
throw new RestException(401);
@@ -601,7 +601,7 @@ class Contracts extends DolibarrApi
* "notrigger": 0
* }
*/
- function close($id, $notrigger=0)
+ function close($id, $notrigger = 0)
{
if (! DolibarrApiAccess::$user->rights->contrat->creer) {
throw new RestException(401);
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 5929ec034d1..5dce6cb4bd4 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -261,7 +261,7 @@ class Contrat extends CommonObject
* @param string $comment A comment typed by user
* @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
$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
* @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
$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
* @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();
@@ -363,7 +363,7 @@ class Contrat extends CommonObject
* @return int <0 if KO, >0 if OK
* @see activateAll
*/
- function closeAll(User $user, $notrigger=0, $comment='')
+ function closeAll(User $user, $notrigger = 0, $comment = '')
{
$this->db->begin();
@@ -419,7 +419,7 @@ class Contrat extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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';
global $langs, $conf;
@@ -547,7 +547,7 @@ class Contrat extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0=execute triggers
* @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';
global $langs, $conf;
@@ -614,7 +614,7 @@ class Contrat extends CommonObject
* @param string $ref_supplier Supplier ref
* @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.= " ref_supplier, ref_customer,";
@@ -1242,7 +1242,7 @@ class Contrat extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user, $notrigger=0)
+ function update($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -1360,7 +1360,7 @@ class Contrat extends CommonObject
* @param string $rang Position
* @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;
$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
* @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;
@@ -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
* @return string Label
*/
- function LibStatut($statut,$mode)
+ function LibStatut($statut, $mode)
{
// phpcs:enable
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
* @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;
@@ -2022,7 +2022,7 @@ class Contrat extends CommonObject
* @param int $statut Status of lines to get
* @return array Array of line's rowid
*/
- function array_detail($statut=-1)
+ function array_detail($statut = -1)
{
// phpcs:enable
$tab=array();
@@ -2059,7 +2059,7 @@ class Contrat extends CommonObject
* @param string $option 'all' or 'others'
* @return array Array of contracts id
*/
- function getListOfContracts($option='all')
+ function getListOfContracts($option = 'all')
{
$tab=array();
@@ -2100,7 +2100,7 @@ class Contrat extends CommonObject
* @param string $mode "inactive" pour services a activer, "expired" pour services expires
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
- function load_board($user,$mode)
+ function load_board($user, $mode)
{
// phpcs:enable
global $conf, $langs;
@@ -2336,7 +2336,7 @@ class Contrat extends CommonObject
* @param null|array $moreparams Array to provide more information
* @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;
@@ -2382,7 +2382,7 @@ class Contrat extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @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;
@@ -2658,7 +2658,7 @@ class ContratLigne extends CommonObjectLine
* @param string $moreatt More attribute
* @return string Libelle
*/
- static function LibStatut($statut,$mode,$expired=-1,$moreatt='')
+ static function LibStatut($statut, $mode, $expired = -1, $moreatt = '')
{
// phpcs:enable
global $langs;
@@ -2720,7 +2720,7 @@ class ContratLigne extends CommonObjectLine
* @param int $maxlength Max length
* @return string Chaine avec URL
*/
- function getNomUrl($withpicto=0,$maxlength=0)
+ function getNomUrl($withpicto = 0, $maxlength = 0)
{
global $langs;
@@ -2747,7 +2747,7 @@ class ContratLigne extends CommonObjectLine
* @param string $ref Ref of contract
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $ref='')
+ function fetch($id, $ref = '')
{
// Check parameters
@@ -2879,7 +2879,7 @@ class ContratLigne extends CommonObjectLine
* @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK
*/
- function update($user, $notrigger=0)
+ function update($user, $notrigger = 0)
{
global $conf, $langs, $mysoc;
@@ -3257,7 +3257,7 @@ class ContratLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @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
global $langs, $conf;
diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php
index d90a3f5f316..1e4dde7e0a4 100644
--- a/htdocs/core/ajax/ajaxdirtree.php
+++ b/htdocs/core/ajax/ajaxdirtree.php
@@ -337,7 +337,7 @@ if ((! isset($mode) || $mode != 'noajax') && is_object($db)) $db->close();
* @param int $depth Depth
* @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 $dolibarr_main_data_root;
diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php
index aea85fd111e..55804430113 100644
--- a/htdocs/core/boxes/box_actions.php
+++ b/htdocs/core/boxes/box_actions.php
@@ -54,7 +54,7 @@ class box_actions extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $user;
@@ -69,7 +69,7 @@ class box_actions extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
@@ -189,7 +189,7 @@ class box_actions extends ModeleBoxes
* @param int $nooutput No print, only return string
* @return string
*/
- function showBox($head = null, $contents = null, $nooutput=0)
+ function showBox($head = null, $contents = null, $nooutput = 0)
{
global $langs, $conf;
$out = parent::showBox($this->info_box_head, $this->info_box_contents);
diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php
index 413dc43d8b2..e18114a5bc7 100644
--- a/htdocs/core/boxes/box_activity.php
+++ b/htdocs/core/boxes/box_activity.php
@@ -53,7 +53,7 @@ class box_activity extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $conf, $user;
@@ -74,7 +74,7 @@ class box_activity extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -457,7 +457,7 @@ class box_activity extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_bookmarks.php b/htdocs/core/boxes/box_bookmarks.php
index c3a29877104..ec091956701 100644
--- a/htdocs/core/boxes/box_bookmarks.php
+++ b/htdocs/core/boxes/box_bookmarks.php
@@ -50,7 +50,7 @@ class box_bookmarks extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -65,7 +65,7 @@ class box_bookmarks extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
$langs->load("boxes");
@@ -157,7 +157,7 @@ class box_bookmarks extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php
index 9b1e4e34261..c4e34a72e9b 100644
--- a/htdocs/core/boxes/box_clients.php
+++ b/htdocs/core/boxes/box_clients.php
@@ -54,7 +54,7 @@ class box_clients extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $conf, $user;
@@ -72,7 +72,7 @@ class box_clients extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
$langs->load("boxes");
@@ -173,7 +173,7 @@ class box_clients extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php
index 3f86909f04a..795bf36bd0b 100644
--- a/htdocs/core/boxes/box_commandes.php
+++ b/htdocs/core/boxes/box_commandes.php
@@ -54,7 +54,7 @@ class box_commandes extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -69,7 +69,7 @@ class box_commandes extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
@@ -198,7 +198,7 @@ class box_commandes extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php
index 5a5c2f59986..0f0d0f83fed 100644
--- a/htdocs/core/boxes/box_comptes.php
+++ b/htdocs/core/boxes/box_comptes.php
@@ -56,7 +56,7 @@ class box_comptes extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $conf, $user;
@@ -75,7 +75,7 @@ class box_comptes extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
@@ -184,7 +184,7 @@ class box_comptes extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php
index 2d9d7e9461b..2654607e2eb 100644
--- a/htdocs/core/boxes/box_contacts.php
+++ b/htdocs/core/boxes/box_contacts.php
@@ -56,7 +56,7 @@ class box_contacts extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -71,7 +71,7 @@ class box_contacts extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
$langs->load("boxes");
@@ -185,7 +185,7 @@ class box_contacts extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_contracts.php b/htdocs/core/boxes/box_contracts.php
index 7239fa78919..bd499855cc4 100644
--- a/htdocs/core/boxes/box_contracts.php
+++ b/htdocs/core/boxes/box_contracts.php
@@ -53,7 +53,7 @@ class box_contracts extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -68,7 +68,7 @@ class box_contracts extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
@@ -189,7 +189,7 @@ class box_contracts extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php
index fa7d35f6db0..d7165198201 100644
--- a/htdocs/core/boxes/box_external_rss.php
+++ b/htdocs/core/boxes/box_external_rss.php
@@ -56,7 +56,7 @@ class box_external_rss extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
$this->db=$db;
$this->paramdef=$param;
@@ -69,7 +69,7 @@ class box_external_rss extends ModeleBoxes
* @param int $cachedelay Delay we accept for cache file
* @return void
*/
- function loadBox($max=5, $cachedelay=3600)
+ function loadBox($max = 5, $cachedelay = 3600)
{
global $user, $langs, $conf;
$langs->load("boxes");
@@ -195,7 +195,7 @@ class box_external_rss extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php
index ae4a32fad7c..b45c530a085 100644
--- a/htdocs/core/boxes/box_factures.php
+++ b/htdocs/core/boxes/box_factures.php
@@ -52,7 +52,7 @@ class box_factures extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -67,7 +67,7 @@ class box_factures extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -209,7 +209,7 @@ class box_factures extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php
index 617f041d7d2..cc8cd3bd1da 100644
--- a/htdocs/core/boxes/box_factures_fourn.php
+++ b/htdocs/core/boxes/box_factures_fourn.php
@@ -53,7 +53,7 @@ class box_factures_fourn extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -68,7 +68,7 @@ class box_factures_fourn extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -214,7 +214,7 @@ class box_factures_fourn extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php
index bd8fde32aab..181994fc1e3 100644
--- a/htdocs/core/boxes/box_factures_fourn_imp.php
+++ b/htdocs/core/boxes/box_factures_fourn_imp.php
@@ -52,7 +52,7 @@ class box_factures_fourn_imp extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -67,7 +67,7 @@ class box_factures_fourn_imp extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -201,7 +201,7 @@ class box_factures_fourn_imp extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php
index 11331f7f3e7..6193924ebc7 100644
--- a/htdocs/core/boxes/box_factures_imp.php
+++ b/htdocs/core/boxes/box_factures_imp.php
@@ -55,7 +55,7 @@ class box_factures_imp extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -70,7 +70,7 @@ class box_factures_imp extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -207,7 +207,7 @@ class box_factures_imp extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php
index 76d1414f53f..b4016bb3758 100644
--- a/htdocs/core/boxes/box_ficheinter.php
+++ b/htdocs/core/boxes/box_ficheinter.php
@@ -53,7 +53,7 @@ class box_ficheinter extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -68,7 +68,7 @@ class box_ficheinter extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=10)
+ function loadBox($max = 10)
{
global $user, $langs, $db, $conf;
@@ -166,7 +166,7 @@ class box_ficheinter extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php
index c66c7f674c2..aa04d312f54 100644
--- a/htdocs/core/boxes/box_fournisseurs.php
+++ b/htdocs/core/boxes/box_fournisseurs.php
@@ -53,7 +53,7 @@ class box_fournisseurs extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -68,7 +68,7 @@ class box_fournisseurs extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
$langs->load("boxes");
@@ -160,7 +160,7 @@ class box_fournisseurs extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php
index 138326d6c01..0cca908f5d8 100644
--- a/htdocs/core/boxes/box_goodcustomers.php
+++ b/htdocs/core/boxes/box_goodcustomers.php
@@ -55,7 +55,7 @@ class box_goodcustomers extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $conf, $user;
@@ -74,7 +74,7 @@ class box_goodcustomers extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
$langs->load("boxes");
@@ -169,7 +169,7 @@ class box_goodcustomers extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php
index fd0b4e593c0..b288912915d 100644
--- a/htdocs/core/boxes/box_graph_invoices_permonth.php
+++ b/htdocs/core/boxes/box_graph_invoices_permonth.php
@@ -48,7 +48,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -63,7 +63,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -275,7 +275,7 @@ class box_graph_invoices_permonth extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php
index f13b19259c9..be4b8722cf2 100644
--- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php
+++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php
@@ -48,7 +48,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -63,7 +63,7 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
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
* @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);
}
diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php
index fefa90c5fea..390499bd359 100644
--- a/htdocs/core/boxes/box_graph_orders_permonth.php
+++ b/htdocs/core/boxes/box_graph_orders_permonth.php
@@ -48,7 +48,7 @@ class box_graph_orders_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -63,7 +63,7 @@ class box_graph_orders_permonth extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -273,7 +273,7 @@ class box_graph_orders_permonth extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php
index e388d226fd2..098cbb4d038 100644
--- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php
+++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php
@@ -48,7 +48,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -63,7 +63,7 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
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
* @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);
}
diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php
index 9dc4c162e0f..bc4a3130151 100644
--- a/htdocs/core/boxes/box_graph_product_distribution.php
+++ b/htdocs/core/boxes/box_graph_product_distribution.php
@@ -51,7 +51,7 @@ class box_graph_product_distribution extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user, $conf;
@@ -70,7 +70,7 @@ class box_graph_product_distribution extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -412,7 +412,7 @@ class box_graph_product_distribution extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php
index f28b0ec2c99..4abd3a8725a 100644
--- a/htdocs/core/boxes/box_graph_propales_permonth.php
+++ b/htdocs/core/boxes/box_graph_propales_permonth.php
@@ -48,7 +48,7 @@ class box_graph_propales_permonth extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -63,7 +63,7 @@ class box_graph_propales_permonth extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -276,7 +276,7 @@ class box_graph_propales_permonth extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php
index 9ce7dd91605..34281d13c82 100644
--- a/htdocs/core/boxes/box_last_modified_ticket.php
+++ b/htdocs/core/boxes/box_last_modified_ticket.php
@@ -187,7 +187,7 @@ class box_last_modified_ticket extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php
index a824a707168..a1a52c3070d 100644
--- a/htdocs/core/boxes/box_last_ticket.php
+++ b/htdocs/core/boxes/box_last_ticket.php
@@ -187,7 +187,7 @@ class box_last_ticket extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_lastlogin.php b/htdocs/core/boxes/box_lastlogin.php
index c8149c6384b..d1ae1e7abf4 100644
--- a/htdocs/core/boxes/box_lastlogin.php
+++ b/htdocs/core/boxes/box_lastlogin.php
@@ -53,7 +53,7 @@ class box_lastlogin extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $conf;
@@ -66,7 +66,7 @@ class box_lastlogin extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -109,7 +109,7 @@ class box_lastlogin extends ModeleBoxes
* @param int $nooutput No print, only return string
* @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);
}
diff --git a/htdocs/core/boxes/box_members.php b/htdocs/core/boxes/box_members.php
index b0f999f54f1..8ffa90de5a4 100644
--- a/htdocs/core/boxes/box_members.php
+++ b/htdocs/core/boxes/box_members.php
@@ -55,7 +55,7 @@ class box_members extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $conf, $user;
@@ -74,7 +74,7 @@ class box_members extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
$langs->load("boxes");
@@ -178,7 +178,7 @@ class box_members extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php
index 3dd66eb1da2..bb64e46ecc4 100644
--- a/htdocs/core/boxes/box_produits.php
+++ b/htdocs/core/boxes/box_produits.php
@@ -55,7 +55,7 @@ class box_produits extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $conf, $user;
@@ -73,7 +73,7 @@ class box_produits extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf, $hookmanager;
@@ -226,7 +226,7 @@ class box_produits extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_produits_alerte_stock.php b/htdocs/core/boxes/box_produits_alerte_stock.php
index 896ceb93df6..b14cc2e659f 100644
--- a/htdocs/core/boxes/box_produits_alerte_stock.php
+++ b/htdocs/core/boxes/box_produits_alerte_stock.php
@@ -57,7 +57,7 @@ class box_produits_alerte_stock extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $conf,$user;
@@ -75,7 +75,7 @@ class box_produits_alerte_stock extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
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
* @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);
}
diff --git a/htdocs/core/boxes/box_project.php b/htdocs/core/boxes/box_project.php
index a48543a00f6..3784294298a 100644
--- a/htdocs/core/boxes/box_project.php
+++ b/htdocs/core/boxes/box_project.php
@@ -51,7 +51,7 @@ class box_project extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $user, $langs;
@@ -70,7 +70,7 @@ class box_project extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -195,7 +195,7 @@ class box_project extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php
index 2b3426f21b8..aa3a9f8fb00 100644
--- a/htdocs/core/boxes/box_propales.php
+++ b/htdocs/core/boxes/box_propales.php
@@ -54,7 +54,7 @@ class box_propales extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -69,7 +69,7 @@ class box_propales extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
@@ -188,7 +188,7 @@ class box_propales extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php
index a4382f86048..2c58bdbe1c3 100644
--- a/htdocs/core/boxes/box_prospect.php
+++ b/htdocs/core/boxes/box_prospect.php
@@ -56,7 +56,7 @@ class box_prospect extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $conf, $user;
@@ -74,7 +74,7 @@ class box_prospect extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
@@ -176,7 +176,7 @@ class box_prospect extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php
index 708b781f092..264b95d5c65 100644
--- a/htdocs/core/boxes/box_services_contracts.php
+++ b/htdocs/core/boxes/box_services_contracts.php
@@ -54,7 +54,7 @@ class box_services_contracts extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -69,7 +69,7 @@ class box_services_contracts extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
@@ -241,7 +241,7 @@ class box_services_contracts extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php
index ed62e127816..0bae23fef95 100644
--- a/htdocs/core/boxes/box_services_expired.php
+++ b/htdocs/core/boxes/box_services_expired.php
@@ -52,7 +52,7 @@ class box_services_expired extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -67,7 +67,7 @@ class box_services_expired extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
@@ -185,7 +185,7 @@ class box_services_expired extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php
index 4621950843e..142fd2820be 100644
--- a/htdocs/core/boxes/box_supplier_orders.php
+++ b/htdocs/core/boxes/box_supplier_orders.php
@@ -52,7 +52,7 @@ class box_supplier_orders extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param)
+ function __construct($db, $param)
{
global $user;
@@ -184,7 +184,7 @@ class box_supplier_orders extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php
index cf1e799e486..bfcf5d2c301 100644
--- a/htdocs/core/boxes/box_task.php
+++ b/htdocs/core/boxes/box_task.php
@@ -54,7 +54,7 @@ class box_task extends ModeleBoxes
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
global $user, $langs;
@@ -73,7 +73,7 @@ class box_task extends ModeleBoxes
* @param int $max Maximum number of records to load
* @return void
*/
- function loadBox($max=5)
+ function loadBox($max = 5)
{
global $conf, $user, $langs, $db;
@@ -152,7 +152,7 @@ class box_task extends ModeleBoxes
* @param int $nooutput No print, only 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);
}
diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php
index 9ae35403ec7..971c04848c7 100644
--- a/htdocs/core/boxes/modules_boxes.php
+++ b/htdocs/core/boxes/modules_boxes.php
@@ -115,7 +115,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
* @param DoliDB $db Database handler
* @param string $param More parameters
*/
- function __construct($db,$param='')
+ function __construct($db, $param = '')
{
$this->db=$db;
}
@@ -204,7 +204,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
* @param int $nooutput No print, only return string
* @return string
*/
- function showBox($head = null, $contents = null, $nooutput=0)
+ function showBox($head = null, $contents = null, $nooutput = 0)
{
global $langs, $user, $conf;
@@ -385,7 +385,7 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
* @param array $forcedirwidget null=All default directories. This parameter is used by modulebuilder module only.
* @return array Array list of widget
*/
- static function getWidgetsList($forcedirwidget=null)
+ static function getWidgetsList($forcedirwidget = null)
{
global $conf, $langs, $db;
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index 52d98790dcc..499bd8deb29 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -119,7 +119,7 @@ class CMailFile
* @param string $sendcontext 'standard', 'emailing', ... (used to define with sending mode and parameters to use)
* @param string $replyto Reply-to email (will be set to same value than From by default if not provided)
*/
- function __construct($subject, $to, $from, $msg, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=0, $errors_to='', $css='', $trackid='', $moreinheader='', $sendcontext='standard', $replyto='')
+ function __construct($subject, $to, $from, $msg, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $addr_cc = "", $addr_bcc = "", $deliveryreceipt = 0, $msgishtml = 0, $errors_to = '', $css = '', $trackid = '', $moreinheader = '', $sendcontext = 'standard', $replyto = '')
{
global $conf, $dolibarr_main_data_root;
@@ -1178,7 +1178,7 @@ class CMailFile
* @param array $mimefilename_list Tableau
* @return string Chaine fichiers encodes
*/
- function write_files($filename_list,$mimetype_list,$mimefilename_list)
+ function write_files($filename_list, $mimetype_list, $mimefilename_list)
{
// phpcs:enable
$out = '';
@@ -1259,7 +1259,7 @@ class CMailFile
* @param int $port Example: 25, 465
* @return int Socket id if ok, 0 if KO
*/
- function check_server_port($host,$port)
+ function check_server_port($host, $port)
{
// phpcs:enable
global $conf;
@@ -1457,7 +1457,7 @@ class CMailFile
* If format 3: '' or '"John Doe" ' or '"=?UTF-8?B?Sm9obiBEb2U=?=" '
* If format 4: 'John Doe' or 'john@doe.com' if no label exists
*/
- static function getValidAddress($address,$format,$encode=0,$maxnumberofemail=0)
+ static function getValidAddress($address, $format, $encode = 0, $maxnumberofemail = 0)
{
global $conf;
diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php
index 86ffed48551..893c08b9257 100644
--- a/htdocs/core/class/CSMSFile.class.php
+++ b/htdocs/core/class/CSMSFile.class.php
@@ -59,7 +59,7 @@ class CSMSFile
* @param int $priority Priority
* @param int $class Class
*/
- function __construct($to,$from,$msg,$deliveryreceipt=0,$deferred=0,$priority=3,$class=1)
+ function __construct($to, $from, $msg, $deliveryreceipt = 0, $deferred = 0, $priority = 3, $class = 1)
{
global $conf;
diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php
index 4694a5e4652..f822b178536 100644
--- a/htdocs/core/class/canvas.class.php
+++ b/htdocs/core/class/canvas.class.php
@@ -60,7 +60,7 @@ class Canvas
* @param DoliDB $db Database handler
* @param string $actiontype Action type ('create', 'view', 'edit', 'list')
*/
- function __construct($db, $actiontype='view')
+ function __construct($db, $actiontype = 'view')
{
$this->db = $db;
@@ -142,7 +142,7 @@ class Canvas
* @param string $ref Object ref (if id not provided)
* @return void
*/
- function assign_values(&$action='view', $id=0, $ref='')
+ function assign_values(&$action = 'view', $id = 0, $ref = '')
{
// phpcs:enable
if (method_exists($this->control,'assign_values')) $this->control->assign_values($action, $id, $ref);
@@ -204,7 +204,7 @@ class Canvas
* @return mixed Return return code of doActions of canvas
* @see http://wiki.dolibarr.org/index.php/Canvas_development
*/
- function doActions(&$action='view', $id=0)
+ function doActions(&$action = 'view', $id = 0)
{
if (method_exists($this->control,'doActions'))
{
diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php
index f07916a7511..e93af622a27 100644
--- a/htdocs/core/class/ccountry.class.php
+++ b/htdocs/core/class/ccountry.class.php
@@ -86,7 +86,7 @@ class Ccountry // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -165,7 +165,7 @@ class Ccountry // extends CommonObject
* @param string $code Code
* @return int >0 if OK, 0 if not found, <0 if KO
*/
- function fetch($id,$code='')
+ function fetch($id, $code = '')
{
global $langs;
$sql = "SELECT";
@@ -214,7 +214,7 @@ class Ccountry // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -285,7 +285,7 @@ class Ccountry // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php
index 332f7e115ef..ddcce49cef4 100644
--- a/htdocs/core/class/comment.class.php
+++ b/htdocs/core/class/comment.class.php
@@ -82,7 +82,7 @@ class Comment extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf, $langs;
@@ -155,7 +155,7 @@ class Comment extends CommonObject
* @param int $ref ref object
* @return int <0 if KO, 0 if not found, >0 if OK
*/
- function fetch($id, $ref='')
+ function fetch($id, $ref = '')
{
global $langs;
@@ -213,7 +213,7 @@ class Comment extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <=0 if KO, >0 if OK
*/
- function update(User $user, $notrigger=0)
+ function update(User $user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -278,7 +278,7 @@ class Comment extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index 726e95214cb..d4007235295 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -69,7 +69,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code
*/
- function get_substitutionarray_user($user,$outputlangs)
+ function get_substitutionarray_user($user, $outputlangs)
{
// phpcs:enable
global $conf;
@@ -107,7 +107,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code
*/
- function get_substitutionarray_mysoc($mysoc,$outputlangs)
+ function get_substitutionarray_mysoc($mysoc, $outputlangs)
{
// phpcs:enable
global $conf;
@@ -167,7 +167,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code
*/
- function get_substitutionarray_thirdparty($object,$outputlangs)
+ function get_substitutionarray_thirdparty($object, $outputlangs)
{
// phpcs:enable
global $conf;
@@ -361,7 +361,7 @@ abstract class CommonDocGenerator
* @param string $array_key Name of the key for return array
* @return array Array of substitution
*/
- function get_substitutionarray_object($object,$outputlangs,$array_key='object')
+ function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
{
// phpcs:enable
global $conf;
@@ -604,7 +604,7 @@ abstract class CommonDocGenerator
* @param array $array_key Name of the key for return array
* @return array Array of substitution
*/
- function get_substitutionarray_shipment($object,$outputlangs,$array_key='object')
+ function get_substitutionarray_shipment($object, $outputlangs, $array_key = 'object')
{
// phpcs:enable
global $conf;
@@ -716,7 +716,7 @@ abstract class CommonDocGenerator
* @param boolean $recursive Want to fetch child array or child object
* @return array Array of substitution key->code
*/
- function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true)
+ function get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive = true)
{
// phpcs:enable
$array_other = array();
@@ -747,7 +747,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Lang object to use for output
* @return array Substitution array
*/
- function fill_substitutionarray_with_extrafields($object,$array_to_fill,$extrafields,$array_key,$outputlangs)
+ function fill_substitutionarray_with_extrafields($object, $array_to_fill, $extrafields, $array_key, $outputlangs)
{
// phpcs:enable
global $conf;
@@ -834,7 +834,7 @@ abstract class CommonDocGenerator
* @param int $hidebottom Hide bottom
* @return void
*/
- function printRect($pdf, $x, $y, $l, $h, $hidetop=0, $hidebottom=0)
+ function printRect($pdf, $x, $y, $l, $h, $hidetop = 0, $hidebottom = 0)
{
if (empty($hidetop) || $hidetop==-1) $pdf->line($x, $y, $x+$l, $y);
$pdf->line($x+$l, $y, $x+$l, $y+$h);
@@ -870,7 +870,7 @@ abstract class CommonDocGenerator
* @param int $hideref Do not show ref
* @return null
*/
- function prepareArrayColumnField($object,$outputlangs,$hidedetails=0,$hidedesc=0,$hideref=0)
+ function prepareArrayColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
global $conf;
diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php
index cd346dd95e2..5615ecf3b20 100644
--- a/htdocs/core/class/commoninvoice.class.php
+++ b/htdocs/core/class/commoninvoice.class.php
@@ -97,7 +97,7 @@ abstract class CommonInvoice extends CommonObject
* @param int $multicurrency Return multicurrency_amount instead of amount
* @return double Remain of amount to pay
*/
- function getRemainToPay($multicurrency=0)
+ function getRemainToPay($multicurrency = 0)
{
$alreadypaid=0;
$alreadypaid+=$this->getSommePaiement($multicurrency);
@@ -112,7 +112,7 @@ abstract class CommonInvoice extends CommonObject
* @param int $multicurrency Return multicurrency_amount instead of amount
* @return int Amount of payment already done, <0 if KO
*/
- function getSommePaiement($multicurrency=0)
+ function getSommePaiement($multicurrency = 0)
{
$table='paiement_facture';
$field='fk_facture';
@@ -149,7 +149,7 @@ abstract class CommonInvoice extends CommonObject
* @param int $multicurrency Return multicurrency_amount instead of amount
* @return int <0 if KO, Sum of deposits amount otherwise
*/
- function getSumDepositsUsed($multicurrency=0)
+ function getSumDepositsUsed($multicurrency = 0)
{
if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier')
{
@@ -178,7 +178,7 @@ abstract class CommonInvoice extends CommonObject
* @param int $multicurrency Return multicurrency_amount instead of amount
* @return int <0 if KO, Sum of credit notes and deposits amount otherwise
*/
- function getSumCreditNotesUsed($multicurrency=0)
+ function getSumCreditNotesUsed($multicurrency = 0)
{
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
@@ -233,7 +233,7 @@ abstract class CommonInvoice extends CommonObject
* @param string $option filtre sur statut ('', 'validated', ...)
* @return int <0 si KO, 0 si aucune facture ne remplace, id facture sinon
*/
- function getIdReplacingInvoice($option='')
+ function getIdReplacingInvoice($option = '')
{
$sql = 'SELECT rowid';
$sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element;
@@ -274,7 +274,7 @@ abstract class CommonInvoice extends CommonObject
* @param string $filtertype 1 to filter on type of payment == 'PRE'
* @return array Array with list of payments
*/
- function getListOfPayments($filtertype='')
+ function getListOfPayments($filtertype = '')
{
$retarray=array();
@@ -447,7 +447,7 @@ abstract class CommonInvoice extends CommonObject
* @param integer $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 of status
*/
- function getLibStatut($mode=0, $alreadypaid=-1)
+ function getLibStatut($mode = 0, $alreadypaid = -1)
{
return $this->LibStatut($this->paye, $this->statut, $mode, $alreadypaid, $this->type);
}
@@ -463,7 +463,7 @@ abstract class CommonInvoice extends CommonObject
* @param int $type Type invoice
* @return string Label of status
*/
- function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0)
+ function LibStatut($paye, $status, $mode = 0, $alreadypaid = -1, $type = 0)
{
// phpcs:enable
global $langs;
@@ -593,7 +593,7 @@ abstract class CommonInvoice extends CommonObject
* @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition.
* @return date Date limite de reglement si ok, <0 si ko
*/
- function calculate_date_lim_reglement($cond_reglement=0)
+ function calculate_date_lim_reglement($cond_reglement = 0)
{
// phpcs:enable
if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code;
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 945d257b8eb..d262bf87ac4 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -417,7 +417,7 @@ abstract class CommonObject
* @param string $ref_ext Ref ext of object to check
* @return int <0 if KO, 0 if OK but not found, >0 if OK and exists
*/
- static function isExistingObject($element, $id, $ref='', $ref_ext='')
+ static function isExistingObject($element, $id, $ref = '', $ref_ext = '')
{
global $db,$conf;
@@ -505,7 +505,7 @@ abstract class CommonObject
* @param int $maxlen Maximum length
* @return string String with full name
*/
- function getFullName($langs,$option=0,$nameorder=-1,$maxlen=0)
+ function getFullName($langs, $option = 0, $nameorder = -1, $maxlen = 0)
{
//print "lastname=".$this->lastname." name=".$this->name." nom=".$this->nom."
\n";
$lastname=$this->lastname;
@@ -532,7 +532,7 @@ abstract class CommonObject
* @param int $withregion 1=Add region into address string
* @return string Full address string
*/
- function getFullAddress($withcountry=0, $sep="\n", $withregion=0)
+ function getFullAddress($withcountry = 0, $sep = "\n", $withregion = 0)
{
if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country)))
{
@@ -682,7 +682,7 @@ abstract class CommonObject
* @param int $relativelink 0=Return full external link, 1=Return link relative to root of file
* @return string Link or empty string if there is no download link
*/
- function getLastMainDocLink($modulepart, $initsharekey=0, $relativelink=0)
+ function getLastMainDocLink($modulepart, $initsharekey = 0, $relativelink = 0)
{
global $user, $dolibarr_main_url_root;
@@ -779,7 +779,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers
* @return int <0 if KO, >0 if OK
*/
- function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger=0)
+ function add_contact($fk_socpeople, $type_contact, $source = 'external', $notrigger = 0)
{
// phpcs:enable
global $user,$langs;
@@ -901,7 +901,7 @@ abstract class CommonObject
* @param string $source Nature of contact ('internal' or 'external')
* @return int >0 if OK, <0 if KO
*/
- function copy_linked_contact($objFrom, $source='internal')
+ function copy_linked_contact($objFrom, $source = 'internal')
{
// phpcs:enable
$contacts = $objFrom->liste_contact(-1, $source);
@@ -926,7 +926,7 @@ abstract class CommonObject
* @param int $fk_socpeople Id of soc_people to update (not modified if 0)
* @return int <0 if KO, >= 0 if OK
*/
- function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0)
+ function update_contact($rowid, $statut, $type_contact_id = 0, $fk_socpeople = 0)
{
// phpcs:enable
// Insert into database
@@ -955,7 +955,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers
* @return int >0 if OK, <0 if KO
*/
- function delete_contact($rowid, $notrigger=0)
+ function delete_contact($rowid, $notrigger = 0)
{
// phpcs:enable
global $user;
@@ -994,7 +994,7 @@ abstract class CommonObject
* @param string $code Type of contact (code or id)
* @return int >0 if OK, <0 if KO
*/
- function delete_linked_contact($source='',$code='')
+ function delete_linked_contact($source = '', $code = '')
{
// phpcs:enable
$temp = array();
@@ -1033,7 +1033,7 @@ abstract class CommonObject
* @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...)
* @return array|int Array of contacts, -1 if error
*/
- function liste_contact($statut=-1,$source='external',$list=0,$code='')
+ function liste_contact($statut = -1, $source = 'external', $list = 0, $code = '')
{
// phpcs:enable
global $langs;
@@ -1143,7 +1143,7 @@ abstract class CommonObject
* @param string $code Type of contact (Example: 'CUSTOMER', 'SERVICE')
* @return array Array list of type of contacts (id->label if option=0, code->label if option=1)
*/
- function liste_type_contact($source='internal', $order='position', $option=0, $activeonly=0, $code='')
+ function liste_type_contact($source = 'internal', $order = 'position', $option = 0, $activeonly = 0, $code = '')
{
// phpcs:enable
global $langs;
@@ -1197,7 +1197,7 @@ abstract class CommonObject
* @param int $status limited to a certain status
* @return array List of id for such contacts
*/
- function getIdContact($source,$code,$status=0)
+ function getIdContact($source, $code, $status = 0)
{
global $conf;
@@ -1257,7 +1257,7 @@ abstract class CommonObject
* @param int $contactid Id du contact. Use this->contactid if empty.
* @return int <0 if KO, >0 if OK
*/
- function fetch_contact($contactid=null)
+ function fetch_contact($contactid = null)
{
// phpcs:enable
if (empty($contactid)) $contactid=$this->contactid;
@@ -1278,7 +1278,7 @@ abstract class CommonObject
* @param int $force_thirdparty_id Force thirdparty id
* @return int <0 if KO, >0 if OK
*/
- function fetch_thirdparty($force_thirdparty_id=0)
+ function fetch_thirdparty($force_thirdparty_id = 0)
{
// phpcs:enable
global $conf;
@@ -1542,7 +1542,7 @@ abstract class CommonObject
* @return int <0 if KO, >0 if OK
* @see updateExtraField()
*/
- function setValueFrom($field, $value, $table='', $id=null, $format='', $id_field='', $fuser=null, $trigkey='', $fk_user_field='fk_user_modif')
+ function setValueFrom($field, $value, $table = '', $id = null, $format = '', $id_field = '', $fuser = null, $trigkey = '', $fk_user_field = 'fk_user_modif')
{
global $user,$langs,$conf;
@@ -1621,7 +1621,7 @@ abstract class CommonObject
* @param int $nodbprefix Do not include DB prefix to forge table name
* @return int <0 if KO, >0 if OK
*/
- function load_previous_next_ref($filter, $fieldid, $nodbprefix=0)
+ function load_previous_next_ref($filter, $fieldid, $nodbprefix = 0)
{
// phpcs:enable
global $conf, $user;
@@ -1745,7 +1745,7 @@ abstract class CommonObject
* @return array Array of id of contacts (if source=external or internal)
* Array of id of third parties with at least one contact on object (if source=thirdparty)
*/
- function getListContactId($source='external')
+ function getListContactId($source = 'external')
{
$contactAlreadySelected = array();
$tab = $this->liste_contact(-1,$source);
@@ -1892,7 +1892,7 @@ abstract class CommonObject
* @param int $mode mode 1 : amounts in company currency will be recalculated, mode 2 : amounts in foreign currency
* @return int >0 if OK, <0 if KO
*/
- function setMulticurrencyRate($rate, $mode=1)
+ function setMulticurrencyRate($rate, $mode = 1)
{
dol_syslog(get_class($this).'::setMulticurrencyRate('.$id.')');
if ($this->statut >= 0 || $this->element == 'societe')
@@ -2068,7 +2068,7 @@ abstract class CommonObject
*
* @return int 1 if OK, 0 if KO
*/
- function setShippingMethod($shipping_method_id, $notrigger=false, $userused=null)
+ function setShippingMethod($shipping_method_id, $notrigger = false, $userused = null)
{
global $user;
@@ -2192,7 +2192,7 @@ abstract class CommonObject
* @param User $userused Object user
* @return int 1 if OK, 0 if KO
*/
- function setBankAccount($fk_account, $notrigger=false, $userused=null)
+ function setBankAccount($fk_account, $notrigger = false, $userused = null)
{
global $user;
@@ -2257,7 +2257,7 @@ abstract class CommonObject
* @param boolean $fk_parent_line Table with fk_parent_line field or not
* @return int <0 if KO, >0 if OK
*/
- function line_order($renum=false, $rowidorder='ASC', $fk_parent_line=true)
+ function line_order($renum = false, $rowidorder = 'ASC', $fk_parent_line = true)
{
// phpcs:enable
if (! $this->table_element_line)
@@ -2376,7 +2376,7 @@ abstract class CommonObject
* @param boolean $fk_parent_line Table with fk_parent_line field or not
* @return void
*/
- function line_up($rowid, $fk_parent_line=true)
+ function line_up($rowid, $fk_parent_line = true)
{
// phpcs:enable
$this->line_order(false, 'ASC', $fk_parent_line);
@@ -2396,7 +2396,7 @@ abstract class CommonObject
* @param boolean $fk_parent_line Table with fk_parent_line field or not
* @return void
*/
- function line_down($rowid, $fk_parent_line=true)
+ function line_down($rowid, $fk_parent_line = true)
{
// phpcs:enable
$this->line_order(false, 'ASC', $fk_parent_line);
@@ -2418,7 +2418,7 @@ abstract class CommonObject
* @param int $rang Position
* @return void
*/
- function updateRangOfLine($rowid,$rang)
+ function updateRangOfLine($rowid, $rang)
{
$fieldposition = 'rang';
if (in_array($this->table_element_line, array('ecm_files', 'emailcollector_emailcollectoraction'))) $fieldposition = 'position';
@@ -2457,7 +2457,7 @@ abstract class CommonObject
* @param int $rang Position
* @return void
*/
- function updateLineUp($rowid,$rang)
+ function updateLineUp($rowid, $rang)
{
if ($rang > 1)
{
@@ -2491,7 +2491,7 @@ abstract class CommonObject
* @param int $max Max
* @return void
*/
- function updateLineDown($rowid,$rang,$max)
+ function updateLineDown($rowid, $rang, $max)
{
if ($rang < $max)
{
@@ -2563,7 +2563,7 @@ abstract class CommonObject
* @param int $fk_parent_line Parent line id
* @return int Max value of rang in table of lines
*/
- function line_max($fk_parent_line=0)
+ function line_max($fk_parent_line = 0)
{
// phpcs:enable
// Search the last rang with fk_parent_line
@@ -2645,7 +2645,7 @@ abstract class CommonObject
* @param string $suffix '', '_public' or '_private'
* @return int <0 if KO, >0 if OK
*/
- function update_note($note, $suffix='')
+ function update_note($note, $suffix = '')
{
// phpcs:enable
global $user;
@@ -2716,7 +2716,7 @@ abstract class CommonObject
* @param Societe $seller If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object.
* @return int <0 if KO, >0 if OK
*/
- function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller=null)
+ function update_price($exclspec = 0, $roundingadjust = 'none', $nodatabaseupdate = 0, $seller = null)
{
// phpcs:enable
global $conf, $hookmanager, $action;
@@ -2953,7 +2953,7 @@ abstract class CommonObject
* @return int <=0 if KO, >0 if OK
* @see fetchObjectLinked(), updateObjectLinked(), deleteObjectLinked()
*/
- function add_object_linked($origin=null, $origin_id=null)
+ function add_object_linked($origin = null, $origin_id = null)
{
// phpcs:enable
$origin = (! empty($origin) ? $origin : $this->origin);
@@ -3014,7 +3014,7 @@ abstract class CommonObject
* @return int <0 if KO, >0 if OK
* @see add_object_linked(), updateObjectLinked(), deleteObjectLinked()
*/
- function fetchObjectLinked($sourceid=null,$sourcetype='',$targetid=null,$targettype='',$clause='OR',$alsosametype=1,$orderby='sourcetype',$loadalsoobjects=1)
+ function fetchObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '', $clause = 'OR', $alsosametype = 1, $orderby = 'sourcetype', $loadalsoobjects = 1)
{
global $conf;
@@ -3218,7 +3218,7 @@ abstract class CommonObject
* @return int >0 if OK, <0 if KO
* @see add_object_linked(), fetObjectLinked(), deleteObjectLinked()
*/
- function updateObjectLinked($sourceid=null, $sourcetype='', $targetid=null, $targettype='')
+ function updateObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '')
{
$updatesource=false;
$updatetarget=false;
@@ -3265,7 +3265,7 @@ abstract class CommonObject
* @return int >0 if OK, <0 if KO
* @see add_object_linked, updateObjectLinked, fetchObjectLinked
*/
- function deleteObjectLinked($sourceid=null, $sourcetype='', $targetid=null, $targettype='', $rowid='')
+ function deleteObjectLinked($sourceid = null, $sourcetype = '', $targetid = null, $targettype = '', $rowid = '')
{
$deletesource=false;
$deletetarget=false;
@@ -3326,7 +3326,7 @@ abstract class CommonObject
* @param string $trigkey Trigger key to use for trigger
* @return int <0 if KO, >0 if OK
*/
- function setStatut($status, $elementId=null, $elementType='', $trigkey='')
+ function setStatut($status, $elementId = null, $elementType = '', $trigkey = '')
{
global $user,$langs,$conf;
@@ -3414,7 +3414,7 @@ abstract class CommonObject
* @param string $ref Record ref
* @return int <0 if KO, 0 if nothing done, >0 if OK
*/
- function getCanvas($id=0,$ref='')
+ function getCanvas($id = 0, $ref = '')
{
global $conf;
@@ -3474,7 +3474,7 @@ abstract class CommonObject
* @param int $id Force id of object
* @return int <0 if KO, 0 if not used, >0 if already used
*/
- function isObjectUsed($id=0)
+ function isObjectUsed($id = 0)
{
global $langs;
@@ -3543,7 +3543,7 @@ abstract class CommonObject
* @param int $predefined -1=All, 0=Count free product/service only, 1=Count predefined product/service only, 2=Count predefined product, 3=Count predefined service
* @return int <0 if KO, 0 if no predefined products, nb of lines with predefined products if found
*/
- function hasProductsOrServices($predefined=-1)
+ function hasProductsOrServices($predefined = -1)
{
$nb=0;
@@ -3881,7 +3881,7 @@ abstract class CommonObject
* @param int $dateSelector 1=Show also date range input fields
* @return void
*/
- function printObjectLines($action, $seller, $buyer, $selected=0, $dateSelector=0)
+ function printObjectLines($action, $seller, $buyer, $selected = 0, $dateSelector = 0)
{
global $conf, $hookmanager, $langs, $user;
// TODO We should not use global var for this !
@@ -4035,7 +4035,7 @@ abstract class CommonObject
* @param int $extrafieldsline Object of extrafield line attribute
* @return void
*/
- function printObjectLine($action,$line,$var,$num,$i,$dateSelector,$seller,$buyer,$selected=0,$extrafieldsline=0)
+ function printObjectLine($action, $line, $var, $num, $i, $dateSelector, $seller, $buyer, $selected = 0, $extrafieldsline = 0)
{
global $conf,$langs,$user,$object,$hookmanager;
global $form,$bc,$bcdd;
@@ -4153,7 +4153,7 @@ abstract class CommonObject
* @param string $restrictlist ''=All lines, 'services'=Restrict to services only
* @return void
*/
- function printOriginLinesList($restrictlist='')
+ function printOriginLinesList($restrictlist = '')
{
global $langs, $hookmanager, $conf;
@@ -4207,7 +4207,7 @@ abstract class CommonObject
* @param string $restrictlist ''=All lines, 'services'=Restrict to services only (strike line if not)
* @return void
*/
- function printOriginLine($line, $var, $restrictlist='')
+ function printOriginLine($line, $var, $restrictlist = '')
{
global $langs, $conf;
@@ -4353,7 +4353,7 @@ abstract class CommonObject
* @param int $mandatory Mandatory or not
* @return int <=0 if KO, >0 if OK
*/
- function add_element_resource($resource_id, $resource_type, $busy=0, $mandatory=0)
+ function add_element_resource($resource_id, $resource_type, $busy = 0, $mandatory = 0)
{
// phpcs:enable
$this->db->begin();
@@ -4397,7 +4397,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers
* @return int >0 if OK, <0 if KO
*/
- function delete_resource($rowid, $element, $notrigger=0)
+ function delete_resource($rowid, $element, $notrigger = 0)
{
// phpcs:enable
global $user;
@@ -4460,7 +4460,7 @@ abstract class CommonObject
* @return int >0 if OK, <0 if KO
* @see addFileIntoDatabaseIndex()
*/
- protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
+ protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams = null)
{
global $conf, $langs, $user;
@@ -4742,7 +4742,7 @@ abstract class CommonObject
* @param string $alternatevalue Alternate value to use
* @return string|string[] Default value (can be an array if the GETPOST return an array)
**/
- function getDefaultCreateValueFor($fieldname, $alternatevalue=null)
+ function getDefaultCreateValueFor($fieldname, $alternatevalue = null)
{
global $conf, $_POST;
@@ -4818,7 +4818,7 @@ abstract class CommonObject
* @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label(). Deprecated. Function must be called without parameters.
* @return int <0 if error, 0 if no values of extrafield to find nor found, 1 if an attribute is found and value loaded
*/
- function fetch_optionals($rowid=null, $optionsArray=null)
+ function fetch_optionals($rowid = null, $optionsArray = null)
{
// phpcs:enable
if (empty($rowid)) $rowid=$this->id;
@@ -4962,7 +4962,7 @@ abstract class CommonObject
* @return int -1=error, O=did nothing, 1=OK
* @see updateExtraField(), setValueFrom()
*/
- function insertExtraFields($trigger='', $userused=null)
+ function insertExtraFields($trigger = '', $userused = null)
{
global $conf,$langs,$user;
@@ -5208,7 +5208,7 @@ abstract class CommonObject
* @return int -1=error, O=did nothing, 1=OK
* @see setValueFrom(), insertExtraFields()
*/
- function updateExtraField($key, $trigger=null, $userused=null)
+ function updateExtraField($key, $trigger = null, $userused = null)
{
global $conf,$langs,$user;
@@ -5342,7 +5342,7 @@ abstract class CommonObject
* @param string|int $morecss Value for css to define style/length of field. May also be a numeric.
* @return string
*/
- function showInputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $morecss=0)
+ function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0)
{
global $conf,$langs,$form;
@@ -5953,7 +5953,7 @@ abstract class CommonObject
* @param mixed $showsize Value for css to define size. May also be a numeric.
* @return string
*/
- function showOutputField($val, $key, $value, $moreparam='', $keysuffix='', $keyprefix='', $showsize=0)
+ function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $showsize = 0)
{
global $conf,$langs,$form;
@@ -6324,7 +6324,7 @@ abstract class CommonObject
* @param string $onetrtd All fields in same tr td
* @return string
*/
- function showOptionals($extrafields, $mode='view', $params=null, $keysuffix='', $keyprefix='', $onetrtd=0)
+ function showOptionals($extrafields, $mode = 'view', $params = null, $keysuffix = '', $keyprefix = '', $onetrtd = 0)
{
global $db, $conf, $langs, $action, $form;
@@ -6531,7 +6531,7 @@ abstract class CommonObject
* @param int $ignoreerrors Ignore errors. Return true even if errors. We need this when replacement can fails like for categories (categorie of old thirdparty may already exists on new one)
* @return bool True if success, False if error
*/
- public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors=0)
+ public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables, $ignoreerrors = 0)
{
foreach ($tables as $table)
{
@@ -6647,7 +6647,7 @@ abstract class CommonObject
* @param int $usesharelink Use the public shared link of image (if not available, the 'nophoto' image will be shown instead)
* @return string Html code to show photo. Number of photos shown is saved in this->nbphoto
*/
- function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfilename=0, $showaction=0, $maxHeight=120, $maxWidth=160, $nolink=0, $notitle=0, $usesharelink=0)
+ function show_photos($modulepart, $sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0, $notitle = 0, $usesharelink = 0)
{
// phpcs:enable
global $conf,$user,$langs;
@@ -7349,7 +7349,7 @@ abstract class CommonObject
* @param int $forcechilddeletion 0=no, 1=Force deletion of children
* @return int <=0 if KO, >0 if OK
*/
- public function deleteCommon(User $user, $notrigger=false, $forcechilddeletion=0)
+ public function deleteCommon(User $user, $notrigger = false, $forcechilddeletion = 0)
{
$error=0;
diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php
index 91d4245ff88..891ea5e4bc6 100644
--- a/htdocs/core/class/commonobjectline.class.php
+++ b/htdocs/core/class/commonobjectline.class.php
@@ -57,7 +57,7 @@ abstract class CommonObjectLine extends CommonObject
* @param string $type Label type (long or short)
* @return string|int <0 if ko, label if ok
*/
- public function getLabelOfUnit($type='long')
+ public function getLabelOfUnit($type = 'long')
{
global $langs;
diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php
index d5bf6f3317e..2cbf6a9ecb7 100644
--- a/htdocs/core/class/commonstickergenerator.class.php
+++ b/htdocs/core/class/commonstickergenerator.class.php
@@ -107,7 +107,7 @@ abstract class CommonStickerGenerator
* @param string $outputdir Output directory for pdf file
* @return int 1=OK, 0=KO
*/
- abstract function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='');
+ abstract function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '');
// phpcs:enable
/**
@@ -118,7 +118,7 @@ abstract class CommonStickerGenerator
* @param array $param Associative array containing label content and optional parameters
* @return void
*/
- abstract function addSticker(&$pdf,$outputlangs,$param);
+ abstract function addSticker(&$pdf, $outputlangs, $param);
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
@@ -129,7 +129,7 @@ abstract class CommonStickerGenerator
* @param int $pt point
* @return void
*/
- function Set_Char_Size(&$pdf,$pt)
+ function Set_Char_Size(&$pdf, $pt)
{
// phpcs:enable
if ($pt > 3) {
@@ -152,7 +152,7 @@ abstract class CommonStickerGenerator
* @param int $nbPointilles Nb pointilles
* @return void
*/
- function _Pointille(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$nbPointilles=15)
+ function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15)
{
// phpcs:enable
$pdf->SetLineWidth($epaisseur);
@@ -195,7 +195,7 @@ abstract class CommonStickerGenerator
* @param int $taille Size
* @return void
*/
- function _Croix(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=4)
+ function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4)
{
// phpcs:enable
$pdf->SetDrawColor(192,192,192);
diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php
index 5129ac54ece..b6cff34b0f3 100644
--- a/htdocs/core/class/coreobject.class.php
+++ b/htdocs/core/class/coreobject.class.php
@@ -123,7 +123,7 @@ class CoreObject extends CommonObject
* @param bool $try_to_load Force the fetch if an id is given
* @return int
*/
- public function addChild($tabName, $id=0, $key='id', $try_to_load = false)
+ public function addChild($tabName, $id = 0, $key = 'id', $try_to_load = false)
{
if(!empty($id))
{
@@ -154,7 +154,7 @@ class CoreObject extends CommonObject
* @param string $key Attribute name of the object id
* @return bool
*/
- public function removeChild($tabName, $id, $key='id')
+ public function removeChild($tabName, $id, $key = 'id')
{
foreach ($this->{$tabName} as &$object)
{
@@ -370,7 +370,7 @@ class CoreObject extends CommonObject
* @param string $format Output date format
* @return string
*/
- public function getDate($field, $format='')
+ public function getDate($field, $format = '')
{
if(empty($this->{$field})) return '';
else
diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php
index 4320446d7b5..6ad6523f199 100644
--- a/htdocs/core/class/cstate.class.php
+++ b/htdocs/core/class/cstate.class.php
@@ -92,7 +92,7 @@ class Cstate // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -168,7 +168,7 @@ class Cstate // extends CommonObject
* @param string $code Code
* @return int <0 if KO, >0 if OK
*/
- function fetch($id,$code='')
+ function fetch($id, $code = '')
{
global $langs;
$sql = "SELECT";
@@ -212,7 +212,7 @@ class Cstate // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -281,7 +281,7 @@ class Cstate // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php
index db8ed461727..ffaccbfe964 100644
--- a/htdocs/core/class/ctypent.class.php
+++ b/htdocs/core/class/ctypent.class.php
@@ -76,7 +76,7 @@ class Ctypent // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, Id of created object if OK
*/
- function create($user, $notrigger=0)
+ function create($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -166,7 +166,7 @@ class Ctypent // extends CommonObject
* @param string $label Label
* @return int <0 if KO, >0 if OK
*/
- function fetch($id,$code='',$label='')
+ function fetch($id, $code = '', $label = '')
{
global $langs;
$sql = "SELECT";
@@ -214,7 +214,7 @@ class Ctypent // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
$error=0;
@@ -285,7 +285,7 @@ class Ctypent // extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($user, $notrigger=0)
+ function delete($user, $notrigger = 0)
{
global $conf, $langs;
$error=0;
diff --git a/htdocs/core/class/ctyperesource.class.php b/htdocs/core/class/ctyperesource.class.php
index 95c642772e2..4ceb7ed37c8 100644
--- a/htdocs/core/class/ctyperesource.class.php
+++ b/htdocs/core/class/ctyperesource.class.php
@@ -159,7 +159,7 @@ class Ctyperesource
*
* @return int <0 if KO, 0 if not found, >0 if OK
*/
- public function fetch($id,$code='',$label='')
+ public function fetch($id, $code = '', $label = '')
{
dol_syslog(__METHOD__, LOG_DEBUG);
@@ -223,7 +223,7 @@ class Ctyperesource
*
* @return int <0 if KO, >0 if OK
*/
- public function fetchAll($sortorder='', $sortfield='', $limit=0, $offset=0, array $filter = array(), $filtermode='AND')
+ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND')
{
dol_syslog(__METHOD__, LOG_DEBUG);
diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php
index 48c426a830f..b47a324838a 100644
--- a/htdocs/core/class/discount.class.php
+++ b/htdocs/core/class/discount.class.php
@@ -109,7 +109,7 @@ class DiscountAbsolute
* @param int $fk_invoice_supplier_source fk_invoice_supplier_source
* @return int <0 if KO, =0 if not found, >0 if OK
*/
- function fetch($rowid, $fk_facture_source=0, $fk_invoice_supplier_source=0)
+ function fetch($rowid, $fk_facture_source = 0, $fk_invoice_supplier_source = 0)
{
global $conf;
@@ -396,7 +396,7 @@ class DiscountAbsolute
* @param int $rowidinvoice Invoice id (To use discount as a credit note to reduc payment of invoice)
* @return int <0 if KO, >0 if OK
*/
- function link_to_invoice($rowidline,$rowidinvoice)
+ function link_to_invoice($rowidline, $rowidinvoice)
{
// phpcs:enable
// Check parameters
@@ -484,7 +484,7 @@ class DiscountAbsolute
* @param int $discount_type 0 => customer discount, 1 => supplier discount
* @return int <0 if KO, amount otherwise
*/
- function getAvailableDiscounts($company='', $user='',$filter='', $maxvalue=0, $discount_type=0)
+ function getAvailableDiscounts($company = '', $user = '', $filter = '', $maxvalue = 0, $discount_type = 0)
{
global $conf;
@@ -527,7 +527,7 @@ class DiscountAbsolute
* @param int $multicurrency Return multicurrency_amount instead of amount
* @return int <0 if KO, Sum of credit notes and deposits amount otherwise
*/
- function getSumDepositsUsed($invoice, $multicurrency=0)
+ function getSumDepositsUsed($invoice, $multicurrency = 0)
{
dol_syslog(get_class($this)."::getSumDepositsUsed", LOG_DEBUG);
@@ -573,7 +573,7 @@ class DiscountAbsolute
* @param int $multicurrency Return multicurrency_amount instead of amount
* @return int <0 if KO, Sum of credit notes and excess received amount otherwise
*/
- function getSumCreditNotesUsed($invoice, $multicurrency=0)
+ function getSumCreditNotesUsed($invoice, $multicurrency = 0)
{
dol_syslog(get_class($this)."::getSumCreditNotesUsed", LOG_DEBUG);
@@ -619,7 +619,7 @@ class DiscountAbsolute
* @param string $option Where to link to ('invoice' or 'discount')
* @return string String with URL
*/
- function getNomUrl($withpicto,$option='invoice')
+ function getNomUrl($withpicto, $option = 'invoice')
{
global $langs;
diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index 548721be05f..5d375e420f4 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -64,7 +64,7 @@ class DolEditor
* @param string $cols Size of cols for textarea tool (textarea number of cols '70' or percent 'x%')
* @param int $readonly 0=Read/Edit, 1=Read only
*/
- function __construct($htmlname, $content, $width='', $height=200, $toolbarname='Basic', $toolbarlocation='In', $toolbarstartexpanded=false, $uselocalbrowser=true, $okforextendededitor=true, $rows=0, $cols=0, $readonly=0)
+ function __construct($htmlname, $content, $width = '', $height = 200, $toolbarname = 'Basic', $toolbarlocation = 'In', $toolbarstartexpanded = false, $uselocalbrowser = true, $okforextendededitor = true, $rows = 0, $cols = 0, $readonly = 0)
{
global $conf,$langs;
@@ -149,7 +149,7 @@ class DolEditor
* @param string $option For ACE editor, set the source language ('html', 'php', 'javascript', ...)
* @return void|string
*/
- function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='')
+ function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $titlecontent = '', $option = '')
{
// phpcs:enable
global $conf,$langs;
diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php
index a57e4e844ec..d5b486f3430 100644
--- a/htdocs/core/class/dolgeoip.class.php
+++ b/htdocs/core/class/dolgeoip.class.php
@@ -41,7 +41,7 @@ class DolGeoIP
* @param string $type 'country' or 'city'
* @param string $datfile Data file
*/
- function __construct($type,$datfile)
+ function __construct($type, $datfile)
{
if ($type == 'country')
{
diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php
index 42386494a37..c7dc7991a4a 100644
--- a/htdocs/core/class/dolgraph.class.php
+++ b/htdocs/core/class/dolgraph.class.php
@@ -88,7 +88,7 @@ class DolGraph
*
* @param string $library 'jflot' (default) or 'artichow' (no more supported)
*/
- function __construct($library='jflot')
+ function __construct($library = 'jflot')
{
global $conf;
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
@@ -658,7 +658,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk
* @return integer|null
*/
- function draw($file, $fileurl='')
+ function draw($file, $fileurl = '')
{
if (empty($file))
{
@@ -690,7 +690,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk
* @return void
*/
- private function draw_artichow($file,$fileurl)
+ private function draw_artichow($file, $fileurl)
{
// phpcs:enable
global $artichow_defaultfont;
@@ -1127,7 +1127,7 @@ class DolGraph
* @param int $shownographyet Show graph to say there is not enough data
* @return string HTML string to show graph
*/
- function show($shownographyet=0)
+ function show($shownographyet = 0)
{
global $langs;
@@ -1149,7 +1149,7 @@ class DolGraph
* @param string $defaultsize Value we want as default size
* @return int Value of width or height to use by default
*/
- static function getDefaultGraphSizeForStats($direction,$defaultsize='')
+ static function getDefaultGraphSizeForStats($direction, $defaultsize = '')
{
global $conf;
diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php
index f38afc67807..19de8abb3f6 100644
--- a/htdocs/core/class/dolreceiptprinter.class.php
+++ b/htdocs/core/class/dolreceiptprinter.class.php
@@ -311,7 +311,7 @@ class dolReceiptPrinter extends Escpos
* @param string $htmlname select html name
* @return int 0 if OK; >0 if KO
*/
- function selectTypePrinter($selected='', $htmlname='printertypeid')
+ function selectTypePrinter($selected = '', $htmlname = 'printertypeid')
{
global $langs;
@@ -335,7 +335,7 @@ class dolReceiptPrinter extends Escpos
* @param string $htmlname select html name
* @return int 0 if OK; >0 if KO
*/
- function selectProfilePrinter($selected='', $htmlname='printerprofileid')
+ function selectProfilePrinter($selected = '', $htmlname = 'printerprofileid')
{
global $langs;
diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php
index 3a1fba460c4..3ce9623a05d 100644
--- a/htdocs/core/class/emailsenderprofile.class.php
+++ b/htdocs/core/class/emailsenderprofile.class.php
@@ -277,7 +277,7 @@ class EmailSenderProfile extends CommonObject
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
* @return string String with URL
*/
- function getNomUrl($withpicto=0)
+ function getNomUrl($withpicto = 0)
{
global $db, $conf, $langs;
global $dolibarr_main_authentication, $dolibarr_main_demo;
@@ -309,7 +309,7 @@ class EmailSenderProfile extends CommonObject
* @param int $withpicto Add download picto into link
* @return string HTML link to file
*/
- function getDirectExternalLink($withpicto=0)
+ function getDirectExternalLink($withpicto = 0)
{
return 'todo';
}
@@ -320,7 +320,7 @@ class EmailSenderProfile 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
* @return string Label of status
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
return $this->LibStatut($this->status,$mode);
}
@@ -333,7 +333,7 @@ class EmailSenderProfile 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
* @return string Label of status
*/
- static function LibStatut($status,$mode=0)
+ static function LibStatut($status, $mode = 0)
{
global $langs;
diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php
index 68e029dae4b..ecaaba8f4c7 100644
--- a/htdocs/core/class/events.class.php
+++ b/htdocs/core/class/events.class.php
@@ -183,7 +183,7 @@ class Events // extends CommonObject
* @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK
*/
- function update($user=null, $notrigger=0)
+ function update($user = null, $notrigger = 0)
{
global $conf, $langs;
@@ -220,7 +220,7 @@ class Events // extends CommonObject
* @param User $user User that load
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $user=null)
+ function fetch($id, $user = null)
{
global $langs;
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index cc1fae502b3..6d26522bb97 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -171,7 +171,7 @@ class ExtraFields
* @param string $enabled Condition to have the field enabled or not
* @return int <=0 if KO, >0 if OK
*/
- function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique=0, $required=0, $default_value='', $param='', $alwayseditable=0, $perms='', $list='-1', $help='', $computed='', $entity='', $langfile='', $enabled='1')
+ function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique = 0, $required = 0, $default_value = '', $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $computed = '', $entity = '', $langfile = '', $enabled = '1')
{
if (empty($attrname)) return -1;
if (empty($label)) return -1;
@@ -221,7 +221,7 @@ class ExtraFields
* @param string $computed Computed value
* @return int <=0 if KO, >0 if OK
*/
- private function create($attrname, $type='varchar', $length=255, $elementtype='member', $unique=0, $required=0, $default_value='',$param='', $perms='', $list='0', $computed='')
+ private function create($attrname, $type = 'varchar', $length = 255, $elementtype = 'member', $unique = 0, $required = 0, $default_value = '', $param = '', $perms = '', $list = '0', $computed = '')
{
if ($elementtype == 'thirdparty') $elementtype='societe';
if ($elementtype == 'contact') $elementtype='socpeople';
@@ -317,7 +317,7 @@ class ExtraFields
* @param string $enabled Condition to have the field enabled or not
* @return int <=0 if KO, >0 if OK
*/
- private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0, $param='', $alwayseditable=0, $perms='', $list='-1', $help='', $default='', $computed='',$entity='', $langfile='', $enabled='1')
+ private function create_label($attrname, $label = '', $type = '', $pos = 0, $size = 0, $elementtype = 'member', $unique = 0, $required = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1')
{
// phpcs:enable
global $conf,$user;
@@ -414,7 +414,7 @@ class ExtraFields
* @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...)
* @return int < 0 if KO, 0 if nothing is done, 1 if OK
*/
- function delete($attrname, $elementtype='member')
+ function delete($attrname, $elementtype = 'member')
{
if ($elementtype == 'thirdparty') $elementtype='societe';
if ($elementtype == 'contact') $elementtype='socpeople';
@@ -472,7 +472,7 @@ class ExtraFields
* @param string $elementtype Element type ('member', 'product', 'thirdparty', ...)
* @return int < 0 if KO, 0 if nothing is done, 1 if OK
*/
- private function delete_label($attrname, $elementtype='member')
+ private function delete_label($attrname, $elementtype = 'member')
{
// phpcs:enable
global $conf;
@@ -529,7 +529,7 @@ class ExtraFields
* @param int $totalizable Is extrafield totalizable on list
* @return int >0 if OK, <=0 if KO
*/
- function update($attrname, $label, $type, $length, $elementtype, $unique=0, $required=0, $pos=0, $param='', $alwayseditable=0, $perms='', $list='', $help='', $default='', $computed='', $entity='', $langfile='', $enabled='1', $totalizable=0)
+ function update($attrname, $label, $type, $length, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0)
{
if ($elementtype == 'thirdparty') $elementtype='societe';
if ($elementtype == 'contact') $elementtype='socpeople';
@@ -639,7 +639,7 @@ class ExtraFields
* @param int $totalizable Is extrafield totalizable on list
* @return int <=0 if KO, >0 if OK
*/
- private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list='0',$help='',$default='',$computed='',$entity='',$langfile='',$enabled='1', $totalizable=0)
+ private function update_label($attrname, $label, $type, $size, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '0', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0)
{
// phpcs:enable
global $conf, $user;
@@ -770,7 +770,7 @@ class ExtraFields
* @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED. Deprecated. Should not be required.
* @return array Array of attributes keys+label for all extra fields.
*/
- function fetch_name_optionals_label($elementtype,$forceload=false)
+ function fetch_name_optionals_label($elementtype, $forceload = false)
{
// phpcs:enable
global $conf;
@@ -893,7 +893,7 @@ class ExtraFields
* @param string $extrafieldsobjectkey If defined (for example $object->table_element), use the new method to get extrafields data
* @return string
*/
- function showInputField($key, $value, $moreparam='', $keysuffix='', $keyprefix='', $morecss='', $objectid=0, $extrafieldsobjectkey='')
+ function showInputField($key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '', $objectid = 0, $extrafieldsobjectkey = '')
{
global $conf,$langs,$form;
@@ -1508,7 +1508,7 @@ class ExtraFields
* @param string $extrafieldsobjectkey If defined (for example $object->table_element), use the new method to get extrafields data
* @return string Formated value
*/
- function showOutputField($key, $value, $moreparam='', $extrafieldsobjectkey='')
+ function showOutputField($key, $value, $moreparam = '', $extrafieldsobjectkey = '')
{
global $conf,$langs;
@@ -1820,7 +1820,7 @@ class ExtraFields
* @param string $extrafieldsobjectkey If defined, use the new method to get extrafields data
* @return string Formated value
*/
- function getAlignFlag($key, $extrafieldsobjectkey='')
+ function getAlignFlag($key, $extrafieldsobjectkey = '')
{
global $conf,$langs;
@@ -1890,7 +1890,7 @@ class ExtraFields
* @param string $onlykey Only following key is filled. When we make update of only one extrafield ($action = 'update_extras'), calling page must must set this to avoid to have other extrafields being reset.
* @return int 1 if array_options set, 0 if no value, -1 if error (field required missing for example)
*/
- function setOptionalsFromPost($extralabels, &$object, $onlykey='')
+ function setOptionalsFromPost($extralabels, &$object, $onlykey = '')
{
global $_POST, $langs;
$nofillrequired='';// For error when required field left blank
@@ -1989,7 +1989,7 @@ class ExtraFields
* @param string $keysuffix Suffix string to add into name and id of field (can be used to avoid duplicate names)
* @return array|int array_options set or 0 if no value
*/
- function getOptionalsFromPost($extrafieldsobjectkey, $keyprefix='', $keysuffix='')
+ function getOptionalsFromPost($extrafieldsobjectkey, $keyprefix = '', $keysuffix = '')
{
global $_POST;
diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php
index 027fdda0514..66f6e19102c 100644
--- a/htdocs/core/class/fileupload.class.php
+++ b/htdocs/core/class/fileupload.class.php
@@ -41,7 +41,7 @@ class FileUpload
* @param int $fk_element fk_element
* @param string $element element
*/
- function __construct($options=null,$fk_element=null,$element=null)
+ function __construct($options = null, $fk_element = null, $element = null)
{
global $db, $conf;
global $object;
diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php
index c1c288cbf79..cf6a3cf345d 100644
--- a/htdocs/core/class/fiscalyear.class.php
+++ b/htdocs/core/class/fiscalyear.class.php
@@ -264,7 +264,7 @@ class Fiscalyear 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
* @return string Label
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
return $this->LibStatut($this->statut,$mode);
}
@@ -277,7 +277,7 @@ class Fiscalyear 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
* @return string Label
*/
- function LibStatut($statut,$mode=0)
+ function LibStatut($statut, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/core/class/google.class.php b/htdocs/core/class/google.class.php
index 615729ba9c3..797f0a14af1 100644
--- a/htdocs/core/class/google.class.php
+++ b/htdocs/core/class/google.class.php
@@ -44,7 +44,7 @@ class GoogleAPI
* @param DoliDB $db Database handler
* @param string $key Google key
*/
- function __construct($db,$key)
+ function __construct($db, $key)
{
$this->db=$db;
$this->key=$key;
diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php
index 98193f1e32e..47edef4011d 100644
--- a/htdocs/core/class/hookmanager.class.php
+++ b/htdocs/core/class/hookmanager.class.php
@@ -136,7 +136,7 @@ class HookManager
* All types can also return some values into an array ->results that will be finaly merged into this->resArray for caller.
* $this->error or this->errors are also defined by class called by this function if error.
*/
- function executeHooks($method, $parameters=array(), &$object='', &$action='')
+ function executeHooks($method, $parameters = array(), &$object = '', &$action = '')
{
if (! is_array($this->hooks) || empty($this->hooks)) return '';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 228c9fa1538..c737c7b791e 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -102,7 +102,7 @@ class Form
* @param string $paramid Key of parameter for id ('id', 'socid')
* @return string HTML edit field
*/
- function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata='string', $moreparam='', $fieldrequired=0, $notabletag=0, $paramid='id')
+ function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id')
{
global $conf,$langs;
@@ -164,7 +164,7 @@ class Form
* @param string $paramid Key of parameter for id ('id', 'socid')
* @return string HTML edit field
*/
- function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='', $notabletag=0, $formatfunc='', $paramid='id')
+ function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata = 'string', $editvalue = '', $extObject = null, $custommsg = null, $moreparam = '', $notabletag = 0, $formatfunc = '', $paramid = 'id')
{
global $conf,$langs,$db;
@@ -306,7 +306,7 @@ class Form
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
* @return string HTML edit in place
*/
- private function editInPlace($object, $value, $htmlname, $condition, $inputType='textarea', $editvalue=null, $extObject=null, $custommsg=null)
+ private function editInPlace($object, $value, $htmlname, $condition, $inputType = 'textarea', $editvalue = null, $extObject = null, $custommsg = null)
{
global $conf;
@@ -441,7 +441,7 @@ class Form
* @see Use function textwithpicto if you can.
* TODO Move this as static as soon as everybody use textwithpicto or @Form::textwithtooltip
*/
- function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger='', $forcenowrap=0)
+ function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0, $img = '', $extracss = '', $notabs = 2, $incbefore = '', $noencodehtmltext = 0, $tooltiptrigger = '', $forcenowrap = 0)
{
global $conf;
@@ -526,7 +526,7 @@ class Form
* @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only)
* @return string HTML code of text, picto, tooltip
*/
- function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger='', $forcenowrap=0)
+ function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 2, $tooltiptrigger = '', $forcenowrap = 0)
{
global $conf, $langs;
@@ -578,7 +578,7 @@ class Form
* @param int $alwaysvisible 1=select button always visible
* @return string Select list
*/
- function selectMassAction($selected, $arrayofaction, $alwaysvisible=0)
+ function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0)
{
global $conf,$langs,$hookmanager;
@@ -678,7 +678,7 @@ class Form
* @param int $addspecialentries 1=Add dedicated entries for group of countries (like 'European Economic Community', ...)
* @return string HTML string with select
*/
- function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0, $addspecialentries=0)
+ function select_country($selected = '', $htmlname = 'country_id', $htmloption = '', $maxlength = 0, $morecss = 'minwidth300', $usecodeaskey = '', $showempty = 1, $disablefavorites = 0, $addspecialentries = 0)
{
// phpcs:enable
global $conf,$langs,$mysoc;
@@ -791,7 +791,7 @@ class Form
* @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return string HTML string with select and input
*/
- function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array())
+ function select_incoterms($selected = '', $location_incoterms = '', $page = '', $htmlname = 'incoterm_id', $htmloption = '', $forcecombo = 1, $events = array())
{
// phpcs:enable
global $conf,$langs;
@@ -884,7 +884,7 @@ class Form
* @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, 2=Force to show only Products, 3=Force to show only services, -1=Force none (and set hidden field to 'service')
* @return void
*/
- function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0)
+ function select_type_of_lines($selected = '', $htmlname = 'type', $showempty = 0, $hidetext = 0, $forceall = 0)
{
// phpcs:enable
global $db,$langs,$user,$conf;
@@ -987,7 +987,7 @@ class Form
* @param int $showempty Add an empty field
* @return void
*/
- function select_type_fees($selected='',$htmlname='type',$showempty=0)
+ function select_type_fees($selected = '', $htmlname = 'type', $showempty = 0)
{
// phpcs:enable
global $user, $langs;
@@ -1031,7 +1031,7 @@ class Form
* @return string Return select box for thirdparty.
* @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0)
*/
- function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0)
+ function select_thirdparty($selected = '', $htmlname = 'socid', $filter = '', $limit = 20, $ajaxoptions = array(), $forcecombo = 0)
{
// phpcs:enable
return $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0, $limit);
@@ -1057,7 +1057,7 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter)
* @return string HTML string with select box for thirdparty.
*/
- function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array(), $multiple=false)
+ function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false)
{
// phpcs:enable
global $conf,$user,$langs;
@@ -1121,7 +1121,7 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
* @return string HTML string with
*/
- function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='', $multiple=false)
+ function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false)
{
// phpcs:enable
global $conf,$user,$langs;
@@ -1295,7 +1295,7 @@ class Form
* @param int $maxvalue Max value for lines that can be selected
* @return int Return number of qualifed lines in list
*/
- function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0)
+ function select_remises($selected, $htmlname, $filter, $socid, $maxvalue = 0)
{
// phpcs:enable
global $langs,$conf;
@@ -1382,7 +1382,7 @@ class Form
* @return int <0 if KO, Nb of contact in list if OK
* @deprected You can use selectcontacts directly (warning order of param was changed)
*/
- function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $events=array(), $options_only=false, $moreparam='', $htmlid='')
+ function select_contacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $showsoc = 0, $forcecombo = 0, $events = array(), $options_only = false, $moreparam = '', $htmlid = '')
{
// phpcs:enable
print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid);
@@ -1412,7 +1412,7 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
* @return int <0 if KO, Nb of contact in list if OK
*/
- function selectcontacts($socid, $selected='', $htmlname='contactid', $showempty=0, $exclude='', $limitto='', $showfunction=0, $moreclass='', $options_only=false, $showsoc=0, $forcecombo=0, $events=array(), $moreparam='', $htmlid='', $multiple=false)
+ function selectcontacts($socid, $selected = '', $htmlname = 'contactid', $showempty = 0, $exclude = '', $limitto = '', $showfunction = 0, $moreclass = '', $options_only = false, $showsoc = 0, $forcecombo = 0, $events = array(), $moreparam = '', $htmlid = '', $multiple = false)
{
global $conf,$langs,$hookmanager,$action;
@@ -1559,7 +1559,7 @@ class Form
* @deprecated Use select_dolusers instead
* @see select_dolusers()
*/
- function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0')
+ function select_users($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0')
{
// phpcs:enable
print $this->select_dolusers($selected,$htmlname,$show_empty,$exclude,$disabled,$include,$enableonly,$force_entity);
@@ -1589,7 +1589,7 @@ class Form
* @return string HTML select string
* @see select_dolgroups
*/
- function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='', $noactive=0, $outputmode=0, $multiple=false)
+ function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false)
{
// phpcs:enable
global $conf,$user,$langs;
@@ -1797,7 +1797,7 @@ class Form
* @return string HTML select string
* @see select_dolgroups
*/
- function select_dolusers_forevent($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array())
+ function select_dolusers_forevent($action = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $showproperties = 0, $listofuserid = array(), $listofcontactid = array(), $listofotherid = array())
{
// phpcs:enable
global $conf, $user, $langs;
@@ -1890,7 +1890,7 @@ class Form
* @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...])
* @return void
*/
- function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $hidepriceinlabel=0, $warehouseStatus='', $selected_combinations = array())
+ function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = array())
{
// phpcs:enable
global $langs,$conf;
@@ -2032,7 +2032,7 @@ class Form
* 'warehouseinternal' = select products from warehouses for internal correct/transfer only
* @return array Array of keys for json
*/
- function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0,$morecss='',$hidepriceinlabel=0, $warehouseStatus='')
+ function select_produits_list($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 20, $price_level = 0, $filterkey = '', $status = 1, $finished = 2, $outputmode = 0, $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '')
{
// phpcs:enable
global $langs,$conf,$user,$db;
@@ -2324,7 +2324,7 @@ class Form
* @param int $hidepriceinlabel Hide price in label
* @return void
*/
- private function constructProductListOption(&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel=0)
+ private function constructProductListOption(&$objp, &$opt, &$optJson, $price_level, $selected, $hidepriceinlabel = 0)
{
global $langs,$conf,$user,$db;
@@ -2546,7 +2546,7 @@ class Form
* @param string $morecss More CSS
* @return void
*/
- function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0, $morecss='')
+ function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '')
{
// phpcs:enable
global $langs,$conf;
@@ -2592,7 +2592,7 @@ class Form
* @param string $morecss Add more CSS
* @return array Array of keys for json
*/
- function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0,$morecss='')
+ function select_produits_fournisseurs_list($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $filterkey = '', $statut = -1, $outputmode = 0, $limit = 100, $alsoproductwithnosupplierprice = 0, $morecss = '')
{
// phpcs:enable
global $langs,$conf,$db;
@@ -2816,7 +2816,7 @@ class Form
* @param int $selected_supplier Pre-selected supplier if more than 1 result
* @return void
*/
- function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='')
+ function select_product_fourn_price($productid, $htmlname = 'productfournpriceid', $selected_supplier = '')
{
// phpcs:enable
global $langs,$conf;
@@ -2930,7 +2930,7 @@ class Form
* @param int $showempty Add an empty field
* @return integer|null
*/
- function select_address($selected, $socid, $htmlname='address_id',$showempty=0)
+ function select_address($selected, $socid, $htmlname = 'address_id', $showempty = 0)
{
// phpcs:enable
// looking for users
@@ -3081,7 +3081,7 @@ class Form
* @param int $addempty Add empty entry
* @return void
*/
- function selectAvailabilityDelay($selected='',$htmlname='availid',$filtertype='',$addempty=0)
+ function selectAvailabilityDelay($selected = '', $htmlname = 'availid', $filtertype = '', $addempty = 0)
{
global $langs,$user;
@@ -3167,7 +3167,7 @@ class Form
* @param int $addempty Add an empty entry
* @return void
*/
- function selectInputReason($selected='',$htmlname='demandreasonid',$exclude='',$addempty=0)
+ function selectInputReason($selected = '', $htmlname = 'demandreasonid', $exclude = '', $addempty = 0)
{
global $langs,$user;
@@ -3263,7 +3263,7 @@ class Form
* @param string $morecss Add more CSS on select tag
* @return void
*/
- function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='')
+ function select_conditions_paiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '')
{
// phpcs:enable
global $langs, $user, $conf;
@@ -3310,7 +3310,7 @@ class Form
* @param string $morecss Add more CSS on select tag
* @return void
*/
- function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='')
+ function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '')
{
// phpcs:enable
global $langs,$user;
@@ -3364,7 +3364,7 @@ class Form
* @param string $htmlname Nom de la zone select
* @return string Code of HTML select to chose tax or not
*/
- function selectPriceBaseType($selected='',$htmlname='price_base_type')
+ function selectPriceBaseType($selected = '', $htmlname = 'price_base_type')
{
global $langs;
@@ -3402,7 +3402,7 @@ class Form
* @param string $moreattrib To add more attribute on select
* @return void
*/
- function selectShippingMethod($selected='',$htmlname='shipping_method_id',$filtre='',$useempty=0,$moreattrib='')
+ function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '')
{
global $langs, $conf, $user;
@@ -3455,7 +3455,7 @@ class Form
* @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @return void
*/
- function formSelectShippingMethod($page, $selected='', $htmlname='shipping_method_id', $addempty=0)
+ function formSelectShippingMethod($page, $selected = '', $htmlname = 'shipping_method_id', $addempty = 0)
{
global $langs, $db;
@@ -3540,7 +3540,7 @@ class Form
* @param int $showempty Add a nempty line
* @return string HTML select
*/
- function selectUnits($selected = '', $htmlname = 'units', $showempty=0)
+ function selectUnits($selected = '', $htmlname = 'units', $showempty = 0)
{
global $langs;
@@ -3591,7 +3591,7 @@ class Form
* @param int $showcurrency Show currency in label
* @return int <0 if error, Num of bank account found if OK (0, 1, 2, ...)
*/
- function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0)
+ function select_comptes($selected = '', $htmlname = 'accountid', $statut = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0)
{
// phpcs:enable
global $langs, $conf;
@@ -3661,7 +3661,7 @@ class Form
* @param int $addempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
* @return void
*/
- function formSelectAccount($page, $selected='', $htmlname='fk_account', $addempty=0)
+ function formSelectAccount($page, $selected = '', $htmlname = 'fk_account', $addempty = 0)
{
global $langs;
if ($htmlname != "none") {
@@ -3699,7 +3699,7 @@ class Form
* @return string
* @see select_categories
*/
- function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0)
+ function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $excludeafterid = 0, $outputmode = 0)
{
// phpcs:enable
global $conf, $langs;
@@ -3790,7 +3790,7 @@ class Form
* @deprecated
* @see formconfirm()
*/
- function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
+ function form_confirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = "", $useajax = 0, $height = 170, $width = 500)
{
// phpcs:enable
dol_syslog(__METHOD__ . ': using form_confirm is deprecated. Use formconfim instead.', LOG_WARNING);
@@ -3821,7 +3821,7 @@ class Form
* @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a