add visibility

This commit is contained in:
Frédéric FRANCE 2019-02-28 23:19:58 +01:00
parent 304dafe9f5
commit 796ea6f4ea
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
30 changed files with 139 additions and 138 deletions

View File

@ -201,6 +201,7 @@
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint"> <rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
<severity>0</severity> <severity>0</severity>
</rule> </rule>
<rule ref="Squiz.Scope.MethodScope.Missing" />
<!-- Rules from PEAR Standard --> <!-- Rules from PEAR Standard -->

View File

@ -551,10 +551,10 @@ class Commande extends CommonOrder
$this->db->rollback(); $this->db->rollback();
return -1; return -1;
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Tag the order as validated (opened) * Tag the order as validated (opened)
* Function used when order is reopend after being closed. * Function used when order is reopend after being closed.
@ -1768,7 +1768,7 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Adding line of fixed discount in the order in DB * Adding line of fixed discount in the order in DB
* *
@ -3727,7 +3727,7 @@ class Commande extends CommonOrder
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Charge indicateurs this->nb de tableau de bord * Charge indicateurs this->nb de tableau de bord
* *

View File

@ -455,7 +455,7 @@ class FactureRec extends CommonInvoice
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Recupere les lignes de factures predefinies dans this->lines * Recupere les lignes de factures predefinies dans this->lines
* *

View File

@ -404,7 +404,7 @@ class Cchargesociales
* @param string $morecss Add more css on link * @param string $morecss Add more css on link
* @return string String with URL * @return string String with URL
*/ */
function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '') public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $maxlen = 24, $morecss = '')
{ {
global $langs, $conf, $db; global $langs, $conf, $db;
global $dolibarr_main_authentication, $dolibarr_main_demo; global $dolibarr_main_authentication, $dolibarr_main_demo;
@ -438,12 +438,12 @@ class Cchargesociales
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status * @return string Label of status
*/ */
function getLibStatut($mode = 0) public function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->status, $mode); return $this->LibStatut($this->status, $mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoi le libelle d'un status donne * Renvoi le libelle d'un status donne
* *
@ -451,7 +451,7 @@ class Cchargesociales
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status * @return string Label of status
*/ */
function LibStatut($status, $mode = 0) public function LibStatut($status, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;

View File

@ -81,7 +81,7 @@ class Tva extends CommonObject
* *
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
*/ */
function __construct($db) public function __construct($db)
{ {
$this->db = $db; $this->db = $db;
} }
@ -93,7 +93,7 @@ class Tva extends CommonObject
* @param User $user User that create * @param User $user User that create
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function create($user) public function create($user)
{ {
global $conf, $langs; global $conf, $langs;
@ -173,7 +173,7 @@ class Tva extends CommonObject
* @param int $notrigger 0=no, 1=yes (no update trigger) * @param int $notrigger 0=no, 1=yes (no update trigger)
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update($user, $notrigger = 0) public function update($user, $notrigger = 0)
{ {
global $conf, $langs; global $conf, $langs;
@ -241,7 +241,7 @@ class Tva extends CommonObject
* @param User $user User that load * @param User $user User that load
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function fetch($id, $user = null) public function fetch($id, $user = null)
{ {
global $langs; global $langs;
$sql = "SELECT"; $sql = "SELECT";
@ -309,7 +309,7 @@ class Tva extends CommonObject
* @param User $user User that delete * @param User $user User that delete
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function delete($user) public function delete($user)
{ {
global $conf, $langs; global $conf, $langs;
@ -343,7 +343,7 @@ class Tva extends CommonObject
* *
* @return void * @return void
*/ */
function initAsSpecimen() public function initAsSpecimen()
{ {
$this->id=0; $this->id=0;
@ -365,7 +365,7 @@ class Tva extends CommonObject
* @param int $year Year * @param int $year Year
* @return double Amount * @return double Amount
*/ */
function solde($year = 0) public function solde($year = 0)
{ {
$reglee = $this->tva_sum_reglee($year); $reglee = $this->tva_sum_reglee($year);
@ -385,7 +385,7 @@ class Tva extends CommonObject
* @param int $year Year * @param int $year Year
* @return double Amount * @return double Amount
*/ */
function tva_sum_collectee($year = 0) public function tva_sum_collectee($year = 0)
{ {
// phpcs:enable // phpcs:enable
@ -419,14 +419,14 @@ class Tva extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* VAT payed * VAT payed
* *
* @param int $year Year * @param int $year Year
* @return double Amount * @return double Amount
*/ */
function tva_sum_payee($year = 0) public function tva_sum_payee($year = 0)
{ {
// phpcs:enable // phpcs:enable
@ -461,14 +461,14 @@ class Tva extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Total of the VAT payed * Total of the VAT payed
* *
* @param int $year Year * @param int $year Year
* @return double Amount * @return double Amount
*/ */
function tva_sum_reglee($year = 0) public function tva_sum_reglee($year = 0)
{ {
// phpcs:enable // phpcs:enable
@ -510,7 +510,7 @@ class Tva extends CommonObject
* @param User $user Object user that insert * @param User $user Object user that insert
* @return int <0 if KO, rowid in tva table if OK * @return int <0 if KO, rowid in tva table if OK
*/ */
function addPayment($user) public function addPayment($user)
{ {
global $conf,$langs; global $conf,$langs;
@ -654,14 +654,14 @@ class Tva extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Update link between payment tva and line generate into llx_bank * Update link between payment tva and line generate into llx_bank
* *
* @param int $id_bank Id bank account * @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function update_fk_bank($id_bank) public function update_fk_bank($id_bank)
{ {
// phpcs:enable // phpcs:enable
$sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.(int) $id_bank; $sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.(int) $id_bank;
@ -687,7 +687,7 @@ class Tva extends CommonObject
* @param string $morecss More CSS * @param string $morecss More CSS
* @return string Chaine with URL * @return string Chaine with URL
*/ */
function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '') public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '')
{ {
global $langs, $conf; global $langs, $conf;
@ -733,7 +733,7 @@ class Tva extends CommonObject
* *
* @return int Amount of payment already done, <0 if KO * @return int Amount of payment already done, <0 if KO
*/ */
function getSommePaiement() public function getSommePaiement()
{ {
$table='paiementcharge'; $table='paiementcharge';
$field='fk_charge'; $field='fk_charge';
@ -766,7 +766,7 @@ class Tva extends CommonObject
* @param int $id Id of vat payment * @param int $id Id of vat payment
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function info($id) public function info($id)
{ {
$sql = "SELECT t.rowid, t.tms, t.fk_user_modif, t.datec, t.fk_user_creat"; $sql = "SELECT t.rowid, t.tms, t.fk_user_modif, t.datec, t.fk_user_creat";
$sql.= " FROM ".MAIN_DB_PREFIX."tva as t"; $sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
@ -813,12 +813,12 @@ class Tva extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle * @return string Libelle
*/ */
function getLibStatut($mode = 0) public function getLibStatut($mode = 0)
{ {
return $this->LibStatut($this->statut, $mode); return $this->LibStatut($this->statut, $mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoi le libelle d'un statut donne * Renvoi le libelle d'un statut donne
* *
@ -826,7 +826,7 @@ class Tva extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut * @return string Libelle du statut
*/ */
function LibStatut($status, $mode = 0) public function LibStatut($status, $mode = 0)
{ {
// phpcs:enable // phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage

View File

@ -187,7 +187,7 @@ class FormFile
$out .= '<tr>'; $out .= '<tr>';
if (! empty($options)) $out .= '<td>'.$options.'</td>'; if (! empty($options)) $out .= '<td>'.$options.'</td>';
$out .= '<td valign="middle" class="nowrap">'; $out .= '<td valign="middle" class="nowrap">';
$out .= '<input type="checkbox" '.$rename.' class="savingdocmask" name="savingdocmask" value="'.dol_escape_js($savingdocmask).'"> '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/',$langs->transnoentitiesnoconv("OriginFileName"),$savingdocmask), $langs->transnoentitiesnoconv("OriginFileName")); $out .= '<input type="checkbox" '.$rename.' class="savingdocmask" name="savingdocmask" value="'.dol_escape_js($savingdocmask).'"> '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/', $langs->transnoentitiesnoconv("OriginFileName"), $savingdocmask), $langs->transnoentitiesnoconv("OriginFileName"));
$out .= '</td>'; $out .= '</td>';
$out .= '</tr>'; $out .= '</tr>';
} }

View File

@ -59,7 +59,7 @@ class mod_contract_magre extends ModelNumRefContracts
* *
* @return string text description * @return string text description
*/ */
public function info() public function info()
{ {
global $conf,$langs; global $conf,$langs;
@ -137,14 +137,14 @@ class mod_contract_magre extends ModelNumRefContracts
return $numFinal; return $numFinal;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return next value * Return next value
* *
* @param Societe $objsoc third party object * @param Societe $objsoc third party object
* @param Object $objforref contract object * @param Object $objforref contract object
* @return string Value if OK, 0 if KO * @return string Value if OK, 0 if KO
*/ */
public function contract_get_num($objsoc, $objforref) public function contract_get_num($objsoc, $objforref)
{ {
// phpcs:enable // phpcs:enable

View File

@ -111,7 +111,7 @@ abstract class ModeleNumRefExpenseReport
* *
* @return string Example * @return string Example
*/ */
function getExample() public function getExample()
{ {
global $langs; global $langs;
$langs->load("trips"); $langs->load("trips");
@ -123,7 +123,7 @@ abstract class ModeleNumRefExpenseReport
* *
* @return boolean false if conflict, true if ok * @return boolean false if conflict, true if ok
*/ */
function canBeActivated() public function canBeActivated()
{ {
return true; return true;
} }
@ -134,7 +134,7 @@ abstract class ModeleNumRefExpenseReport
* @param Object $object Object we need next value for * @param Object $object Object we need next value for
* @return string Value * @return string Value
*/ */
function getNextValue($object) public function getNextValue($object)
{ {
global $langs; global $langs;
return $langs->trans("NotAvailable"); return $langs->trans("NotAvailable");
@ -145,7 +145,7 @@ abstract class ModeleNumRefExpenseReport
* *
* @return string Value * @return string Value
*/ */
function getVersion() public function getVersion()
{ {
global $langs; global $langs;
$langs->load("admin"); $langs->load("admin");

View File

@ -114,7 +114,7 @@ class ExportExcel2007 extends ExportExcel
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function close_file() public function close_file()
{ {
// phpcs:enable // phpcs:enable
global $conf; global $conf;

View File

@ -63,7 +63,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
* *
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
*/ */
function __construct($db) public function __construct($db)
{ {
global $conf, $langs, $mysoc; global $conf, $langs, $mysoc;
@ -108,7 +108,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
* @param Translate $langs Lang object to use for output * @param Translate $langs Lang object to use for output
* @return string Description * @return string Description
*/ */
function info($langs) public function info($langs)
{ {
global $conf, $langs; global $conf, $langs;
@ -202,7 +202,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
* @param int $hideref Do not show ref * @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO * @return int 1 if OK, <=0 if KO
*/ */
function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager; global $user,$langs,$conf,$mysoc,$hookmanager;

View File

@ -230,7 +230,7 @@ class pdf_crabe extends ModelePDFFactures
* @param int $hideref Do not show ref * @param int $hideref Do not show ref
* @return int 1=OK, 0=KO * @return int 1=OK, 0=KO
*/ */
function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes; global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;

View File

@ -77,7 +77,7 @@ abstract class ModeleNumRefProjects
* *
* @return boolean true if module can be used * @return boolean true if module can be used
*/ */
function isEnabled() public function isEnabled()
{ {
return true; return true;
} }
@ -87,7 +87,7 @@ abstract class ModeleNumRefProjects
* *
* @return string Texte descripif * @return string Texte descripif
*/ */
function info() public function info()
{ {
global $langs; global $langs;
$langs->load("projects"); $langs->load("projects");
@ -99,7 +99,7 @@ abstract class ModeleNumRefProjects
* *
* @return string Example * @return string Example
*/ */
function getExample() public function getExample()
{ {
global $langs; global $langs;
$langs->load("projects"); $langs->load("projects");
@ -112,7 +112,7 @@ abstract class ModeleNumRefProjects
* *
* @return boolean false si conflit, true si ok * @return boolean false si conflit, true si ok
*/ */
function canBeActivated() public function canBeActivated()
{ {
return true; return true;
} }
@ -124,7 +124,7 @@ abstract class ModeleNumRefProjects
* @param Project $project Object project * @param Project $project Object project
* @return string Valeur * @return string Valeur
*/ */
function getNextValue($objsoc, $project) public function getNextValue($objsoc, $project)
{ {
global $langs; global $langs;
return $langs->trans("NotAvailable"); return $langs->trans("NotAvailable");
@ -135,7 +135,7 @@ abstract class ModeleNumRefProjects
* *
* @return string Valeur * @return string Valeur
*/ */
function getVersion() public function getVersion()
{ {
global $langs; global $langs;
$langs->load("admin"); $langs->load("admin");

View File

@ -59,7 +59,7 @@ class mod_task_universal extends ModeleNumRefTask
* *
* @return string Texte descripif * @return string Texte descripif
*/ */
function info() public function info()
{ {
global $conf,$langs; global $conf,$langs;

View File

@ -78,7 +78,7 @@ abstract class ModeleNumRefTask
* *
* @return boolean true if module can be used * @return boolean true if module can be used
*/ */
function isEnabled() public function isEnabled()
{ {
return true; return true;
} }
@ -88,7 +88,7 @@ abstract class ModeleNumRefTask
* *
* @return string Texte descripif * @return string Texte descripif
*/ */
function info() public function info()
{ {
global $langs; global $langs;
$langs->load("projects"); $langs->load("projects");
@ -100,7 +100,7 @@ abstract class ModeleNumRefTask
* *
* @return string Example * @return string Example
*/ */
function getExample() public function getExample()
{ {
global $langs; global $langs;
$langs->load("projects"); $langs->load("projects");
@ -113,7 +113,7 @@ abstract class ModeleNumRefTask
* *
* @return boolean false si conflit, true si ok * @return boolean false si conflit, true si ok
*/ */
function canBeActivated() public function canBeActivated()
{ {
return true; return true;
} }
@ -125,7 +125,7 @@ abstract class ModeleNumRefTask
* @param Project $project Object project * @param Project $project Object project
* @return string Valeur * @return string Valeur
*/ */
function getNextValue($objsoc, $project) public function getNextValue($objsoc, $project)
{ {
global $langs; global $langs;
return $langs->trans("NotAvailable"); return $langs->trans("NotAvailable");
@ -136,7 +136,7 @@ abstract class ModeleNumRefTask
* *
* @return string Valeur * @return string Valeur
*/ */
function getVersion() public function getVersion()
{ {
global $langs; global $langs;
$langs->load("admin"); $langs->load("admin");

View File

@ -238,7 +238,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Check if mask/numbering use prefix * Check if mask/numbering use prefix
* *
@ -315,7 +315,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoi si un code est pris ou non (par autre tiers) * Renvoi si un code est pris ou non (par autre tiers)
* *

View File

@ -77,7 +77,7 @@ abstract class ModeleNumRefSuppliersInvoices
* *
* @return boolean true if model can be used * @return boolean true if model can be used
*/ */
function isEnabled() public function isEnabled()
{ {
return true; return true;
} }
@ -86,7 +86,7 @@ abstract class ModeleNumRefSuppliersInvoices
* *
* @return string Description Text * @return string Description Text
*/ */
function info() public function info()
{ {
global $langs; global $langs;
$langs->load("invoices"); $langs->load("invoices");
@ -97,7 +97,7 @@ abstract class ModeleNumRefSuppliersInvoices
* *
* @return string Example * @return string Example
*/ */
function getExample() public function getExample()
{ {
global $langs; global $langs;
$langs->load("invoices"); $langs->load("invoices");
@ -108,7 +108,7 @@ abstract class ModeleNumRefSuppliersInvoices
* *
* @return boolean false if conflict, true if ok * @return boolean false if conflict, true if ok
*/ */
function canBeActivated() public function canBeActivated()
{ {
return true; return true;
} }
@ -130,7 +130,7 @@ abstract class ModeleNumRefSuppliersInvoices
* *
* @return string Value * @return string Value
*/ */
function getVersion() public function getVersion()
{ {
global $langs; global $langs;
$langs->load("admin"); $langs->load("admin");

View File

@ -117,8 +117,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* *
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
*/ */
function __construct($db) public function __construct($db)
{ {
global $conf, $langs, $mysoc; global $conf, $langs, $mysoc;
// Load translation files required by the page // Load translation files required by the page
@ -180,10 +180,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->localtax2=array(); $this->localtax2=array();
$this->atleastoneratenotnull=0; $this->atleastoneratenotnull=0;
$this->atleastonediscount=0; $this->atleastonediscount=0;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Function to build pdf onto disk * Function to build pdf onto disk
* *
@ -195,8 +195,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* @param int $hideref Do not show ref * @param int $hideref Do not show ref
* @return int 1=OK, 0=KO * @return int 1=OK, 0=KO
*/ */
function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes; global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes;
@ -608,7 +608,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$this->error=$langs->trans("ErrorConstantNotDefined", "SUPPLIER_OUTPUTDIR"); $this->error=$langs->trans("ErrorConstantNotDefined", "SUPPLIER_OUTPUTDIR");
return 0; return 0;
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**

View File

@ -61,7 +61,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
* *
* @return string Texte descripif * @return string Texte descripif
*/ */
function info() public function info()
{ {
global $db, $conf, $langs; global $db, $conf, $langs;

View File

@ -82,7 +82,7 @@ abstract class ModeleNumRefSuppliersOrders
* *
* @return boolean true if model can be used * @return boolean true if model can be used
*/ */
function isEnabled() public function isEnabled()
{ {
return true; return true;
} }
@ -91,7 +91,7 @@ abstract class ModeleNumRefSuppliersOrders
* *
* @return string Description Text * @return string Description Text
*/ */
function info() public function info()
{ {
global $langs; global $langs;
$langs->load("orders"); $langs->load("orders");
@ -102,7 +102,7 @@ abstract class ModeleNumRefSuppliersOrders
* *
* @return string Example * @return string Example
*/ */
function getExample() public function getExample()
{ {
global $langs; global $langs;
$langs->load("orders"); $langs->load("orders");
@ -113,7 +113,7 @@ abstract class ModeleNumRefSuppliersOrders
* *
* @return boolean false if conflict, true if ok * @return boolean false if conflict, true if ok
*/ */
function canBeActivated() public function canBeActivated()
{ {
return true; return true;
} }
@ -122,7 +122,7 @@ abstract class ModeleNumRefSuppliersOrders
* *
* @return string Valeur * @return string Valeur
*/ */
function getNextValue() public function getNextValue()
{ {
global $langs; global $langs;
return $langs->trans("NotAvailable"); return $langs->trans("NotAvailable");
@ -132,7 +132,7 @@ abstract class ModeleNumRefSuppliersOrders
* *
* @return string Value * @return string Value
*/ */
function getVersion() public function getVersion()
{ {
global $langs; global $langs;
$langs->load("admin"); $langs->load("admin");

View File

@ -117,7 +117,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* *
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
*/ */
function __construct($db) public function __construct($db)
{ {
global $conf, $langs, $mysoc; global $conf, $langs, $mysoc;
@ -176,7 +176,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Function to build pdf onto disk * Function to build pdf onto disk
* *
@ -188,7 +188,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param int $hideref Do not show ref * @param int $hideref Do not show ref
* @return int 1=OK, 0=KO * @return int 1=OK, 0=KO
*/ */
function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) public function write_file($object, $outputlangs = '', $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{ {
// phpcs:enable // phpcs:enable
global $user, $langs, $conf, $mysoc, $hookmanager; global $user, $langs, $conf, $mysoc, $hookmanager;
@ -517,7 +517,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Show total to pay * Show total to pay
* *
@ -527,7 +527,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param Translate $outputlangs Objet langs * @param Translate $outputlangs Objet langs
* @return int Position pour suite * @return int Position pour suite
*/ */
function _tableau_cheque(&$pdf, $object, $posy, $outputlangs) private function _tableau_cheque(&$pdf, $object, $posy, $outputlangs)
{ {
// phpcs:enable // phpcs:enable
global $conf,$mysoc; global $conf,$mysoc;
@ -590,7 +590,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param string $currency Currency code * @param string $currency Currency code
* @return void * @return void
*/ */
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '') private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
{ {
global $conf,$mysoc; global $conf,$mysoc;
@ -631,7 +631,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param Translate $outputlangs Object lang for output * @param Translate $outputlangs Object lang for output
* @return void * @return void
*/ */
function _pagehead(&$pdf, $object, $showaddress, $outputlangs) private function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{ {
global $langs, $conf, $mysoc; global $langs, $conf, $mysoc;
@ -810,7 +810,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param int $hidefreetext 1=Hide free text * @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text * @return int Return height of bottom margin including footer text
*/ */
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{ {
global $conf; global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS; $showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;

View File

@ -59,7 +59,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
* *
* @return string Texte descripif * @return string Texte descripif
*/ */
function info() public function info()
{ {
global $conf, $langs; global $conf, $langs;
@ -99,7 +99,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
* *
* @return string Example * @return string Example
*/ */
function getExample() public function getExample()
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
@ -122,7 +122,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
* @param Object $object Object we need next value for * @param Object $object Object we need next value for
* @return string Value if KO, <0 if KO * @return string Value if KO, <0 if KO
*/ */
function getNextValue($objsoc, $object) public function getNextValue($objsoc, $object)
{ {
global $db,$conf; global $db,$conf;
@ -143,7 +143,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return next free value * Return next free value
* *
@ -151,7 +151,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
* @param string $objforref Object for number to search * @param string $objforref Object for number to search
* @return string Next free value * @return string Next free value
*/ */
function commande_get_num($objsoc, $objforref) public function commande_get_num($objsoc, $objforref)
{ {
// phpcs:enable // phpcs:enable
return $this->getNextValue($objsoc, $objforref); return $this->getNextValue($objsoc, $objforref);

View File

@ -155,7 +155,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return next free value * Return next free value
* *

View File

@ -221,7 +221,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
return $texte; return $texte;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Function to build a document on disk using the generic odt module. * Function to build a document on disk using the generic odt module.
* *

View File

@ -193,7 +193,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->atleastonediscount=0; $this->atleastonediscount=0;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Function to build pdf onto disk * Function to build pdf onto disk
* *

View File

@ -303,7 +303,7 @@ class Establishment extends CommonObject
return $this->LibStatut($this->status, $mode); return $this->LibStatut($this->status, $mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Give a label from a status * Give a label from a status
* *

View File

@ -321,7 +321,7 @@ class Productcustomerprice extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Load all customer prices in memory from database * Load all customer prices in memory from database
* *
@ -436,7 +436,7 @@ class Productcustomerprice extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Load all objects in memory from database * Load all objects in memory from database
* *
@ -742,7 +742,7 @@ class Productcustomerprice extends CommonObject
$this->db->commit(); $this->db->commit();
return 1; return 1;
} }
} }
/** /**
* Force update price on child price * Force update price on child price
@ -835,7 +835,7 @@ class Productcustomerprice extends CommonObject
$this->error = "Error " . $this->db->lasterror(); $this->error = "Error " . $this->db->lasterror();
return - 1; return - 1;
} }
} }
/** /**
* Delete object in database * Delete object in database
@ -890,7 +890,7 @@ class Productcustomerprice extends CommonObject
$this->db->commit(); $this->db->commit();
return 1; return 1;
} }
} }
/** /**
* Load an object from its id and create a new one in database * Load an object from its id and create a new one in database
@ -942,7 +942,7 @@ class Productcustomerprice extends CommonObject
$this->db->rollback(); $this->db->rollback();
return - 1; return - 1;
} }
} }
/** /**
* Initialise object with example values * Initialise object with example values
@ -972,7 +972,7 @@ class Productcustomerprice extends CommonObject
$this->localtax2_tx = ''; $this->localtax2_tx = '';
$this->fk_user = ''; $this->fk_user = '';
$this->import_key = ''; $this->import_key = '';
} }
} }
/** /**

View File

@ -220,7 +220,7 @@ class Propalmergepdfproduct extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Load object in memory from the database * Load object in memory from the database
* *
@ -337,10 +337,10 @@ class Propalmergepdfproduct extends CommonObject
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); } if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
if (! $error) //if (! $error)
{ //{
if (! $notrigger) // if (! $notrigger)
{ // {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger. // want this action calls a trigger.
@ -350,8 +350,8 @@ class Propalmergepdfproduct extends CommonObject
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf); //$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; } //if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers //// End call triggers
} // }
} //}
// Commit or rollback // Commit or rollback
if ($error) if ($error)
@ -430,7 +430,7 @@ class Propalmergepdfproduct extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Delete object in database * Delete object in database
* *
@ -448,10 +448,10 @@ class Propalmergepdfproduct extends CommonObject
$this->db->begin(); $this->db->begin();
if (! $error) //if (! $error)
{ //{
if (! $notrigger) // if (! $notrigger)
{ // {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger. // want this action calls a trigger.
@ -461,8 +461,8 @@ class Propalmergepdfproduct extends CommonObject
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; } //if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers //// End call triggers
} // }
} //}
if (! $error) if (! $error)
{ {
@ -496,7 +496,7 @@ class Propalmergepdfproduct extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Delete object in database * Delete object in database
* *
@ -511,10 +511,10 @@ class Propalmergepdfproduct extends CommonObject
$this->db->begin(); $this->db->begin();
if (! $error) //if (! $error)
{ //{
if (! $notrigger) // if (! $notrigger)
{ // {
// Uncomment this and change MYOBJECT to your own tag if you // Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger. // want this action calls a trigger.
@ -524,8 +524,8 @@ class Propalmergepdfproduct extends CommonObject
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; } //if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers //// End call triggers
} // }
} //}
if (! $error) if (! $error)
{ {

View File

@ -444,7 +444,7 @@ class Entrepot extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return list of all warehouses * Return list of all warehouses
* *
@ -477,7 +477,7 @@ class Entrepot extends CommonObject
return $liste; return $liste;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return number of unique different product into a warehouse * Return number of unique different product into a warehouse
* *
@ -511,7 +511,7 @@ class Entrepot extends CommonObject
return $ret; return $ret;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return stock and value of warehosue * Return stock and value of warehosue
* *
@ -557,7 +557,7 @@ class Entrepot extends CommonObject
return $this->LibStatut($this->statut, $mode); return $this->LibStatut($this->statut, $mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return label of a given status * Return label of a given status
* *
@ -684,7 +684,7 @@ class Entrepot extends CommonObject
$this->country_code='FR'; $this->country_code='FR';
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return full path to current warehouse * Return full path to current warehouse
* *
@ -726,7 +726,7 @@ class Entrepot extends CommonObject
return implode(' >> ', array_reverse($TArbo)); return implode(' >> ', array_reverse($TArbo));
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return array of children warehouses ids from $id warehouse (recursive function) * Return array of children warehouses ids from $id warehouse (recursive function)
* *
@ -751,7 +751,7 @@ class Entrepot extends CommonObject
} }
return $TChildWarehouses; return $TChildWarehouses;
} }
/** /**
* Create object on disk * Create object on disk

View File

@ -111,7 +111,7 @@ class MouvementStock extends CommonObject
* @param int $id_product_batch Id product_batch (when skip_batch is false and we already know which record of product_batch to use) * @param int $id_product_batch Id product_batch (when skip_batch is false and we already know which record of product_batch to use)
* @return int <0 if KO, 0 if fk_product is null, >0 if OK * @return int <0 if KO, 0 if fk_product is null, >0 if OK
*/ */
public function _create($user, $fk_product, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $skip_batch = false, $id_product_batch = 0) private function _create($user, $fk_product, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $skip_batch = false, $id_product_batch = 0)
{ {
global $conf, $langs; global $conf, $langs;
@ -877,7 +877,7 @@ class MouvementStock extends CommonObject
return $result; return $result;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return Url link of origin object * Return Url link of origin object
* *
@ -1032,7 +1032,7 @@ class MouvementStock extends CommonObject
return $this->LibStatut($mode); return $this->LibStatut($mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Renvoi le libelle d'un status donne * Renvoi le libelle d'un status donne
* *

View File

@ -490,7 +490,7 @@ class Productlot extends CommonObject
return $this->LibStatut(0, $mode); return $this->LibStatut(0, $mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/** /**
* Return label of a given status * Return label of a given status
* *