diff --git a/.travis.yml b/.travis.yml
index 485151dde01..86da681ce9b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,7 +37,6 @@ php:
- '7.0'
- '7.1'
- '7.2'
-#- hhvm only with dist: trusty
- nightly
env:
@@ -63,6 +62,14 @@ matrix:
- php: nightly
# We exclude some combinations not usefull to save Travis CPU
exclude:
+ - php: '5.5'
+ env: DB=mysql
+ - php: '5.6'
+ env: DB=mysql
+ - php: '7.0'
+ env: DB=mysql
+ - php: '7.1'
+ env: DB=mysql
- php: '5.5'
env: DB=postgresql
- php: '5.6'
@@ -71,8 +78,6 @@ matrix:
env: DB=postgresql
- php: '7.1'
env: DB=postgresql
- - php: hhvm
- env: DB=postgresql
- php: nightly
env: DB=postgresql
diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml
index 49a4a5b3e0c..79b16bdbf55 100644
--- a/dev/setup/codesniffer/ruleset.xml
+++ b/dev/setup/codesniffer/ruleset.xml
@@ -363,12 +363,12 @@
0
-
+
+
0
diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php
index 060f590d656..3d1445b0cce 100644
--- a/dev/translation/autotranslator.class.php
+++ b/dev/translation/autotranslator.class.php
@@ -72,6 +72,7 @@ class autoTranslator
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function parse_refLangTranslationFiles()
{
diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php
index 7a50f130775..8d4785a3719 100644
--- a/htdocs/accountancy/class/accountingaccount.class.php
+++ b/htdocs/accountancy/class/accountingaccount.class.php
@@ -96,7 +96,8 @@ class AccountingAccount extends CommonObject
*/
public $fk_user_modif;
- var $active; // duplicate with status
+ public $active; // duplicate with status
+ public $status;
/**
@@ -534,6 +535,7 @@ class AccountingAccount extends CommonObject
* @param int $id Id
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function account_desactivate($id)
{
$result = $this->checkUsage();
@@ -567,6 +569,7 @@ class AccountingAccount extends CommonObject
* @param int $id Id
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function account_activate($id)
{
$this->db->begin();
@@ -606,6 +609,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php
index b062b9495b9..b8d3852246c 100644
--- a/htdocs/accountancy/class/accountingjournal.class.php
+++ b/htdocs/accountancy/class/accountingjournal.class.php
@@ -271,6 +271,7 @@ class AccountingJournal extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court
* @return string Label of type
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibType($nature,$mode=0)
{
global $langs;
diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php
index aae6374cb50..38a4fb72028 100644
--- a/htdocs/accountancy/class/bookkeeping.class.php
+++ b/htdocs/accountancy/class/bookkeeping.class.php
@@ -1560,6 +1560,7 @@ class BookKeeping extends CommonObject
* @param string $model Model
* @return int Result
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function export_bookkeping($model = 'ebp')
{
global $conf;
@@ -1717,7 +1718,8 @@ class BookKeeping extends CommonObject
* @param int $select_out Set value returned by select 0=rowid (default), 1=account_number
* @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number
* @return string String with HTML select
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '')
{
global $conf;
@@ -1782,6 +1784,7 @@ class BookKeeping extends CommonObject
* @param string $account Accounting account
* @return string Root account
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_compte_racine($account = null)
{
global $conf;
@@ -1822,6 +1825,7 @@ class BookKeeping extends CommonObject
* @param string $account Accounting account
* @return string Account desc
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_compte_desc($account = null)
{
global $conf;
diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
index a0396363da7..fe91fc74436 100644
--- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php
+++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
@@ -82,6 +82,7 @@ abstract class ActionsAdherentCardCommon
* @param int $id Id
* @return string HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id)
{
global $conf, $langs, $user, $canvas;
@@ -237,6 +238,7 @@ abstract class ActionsAdherentCardCommon
*
* @return string HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function assign_post()
{
global $langs, $mysoc;
diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
index a03712daa79..c5d6a89a152 100644
--- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
+++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
@@ -74,6 +74,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
* @param int $id Id
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id)
{
global $limit, $offset, $sortfield, $sortorder;
@@ -129,6 +130,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
* @param string $sortorder Sort order ('ASC' or 'DESC')
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{
global $conf, $langs;
@@ -138,4 +140,3 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
$this->list_datas = array();
}
}
-
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 0556fcba92e..3e784ab871c 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -150,6 +150,7 @@ class Adherent extends CommonObject
* @param string $errors_to erros to
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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='')
{
global $conf,$langs;
@@ -647,6 +648,7 @@ class Adherent extends CommonObject
* @param User $user User making change
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_end_date($user)
{
$this->db->begin();
@@ -1000,6 +1002,7 @@ class Adherent extends CommonObject
* @param string $login login of member
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_login($login)
{
global $conf;
@@ -1030,6 +1033,7 @@ class Adherent extends CommonObject
* @param string $lastname Lastname
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_name($firstname,$lastname)
{
global $conf;
@@ -1203,6 +1207,7 @@ class Adherent extends CommonObject
*
* @return int <0 si KO, >0 si OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_subscriptions()
{
global $langs;
@@ -1753,6 +1758,7 @@ class Adherent extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_abo()
{
global $conf,$langs;
@@ -1810,6 +1816,7 @@ class Adherent extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_to_abo()
{
global $conf,$langs;
@@ -1993,6 +2000,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
{
global $langs;
@@ -2082,6 +2090,7 @@ class Adherent extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf;
@@ -2117,6 +2126,7 @@ class Adherent extends CommonObject
* @param User $user Objet user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user)
{
global $conf, $langs;
@@ -2262,6 +2272,7 @@ class Adherent extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0)
{
global $conf;
@@ -2278,6 +2289,7 @@ class Adherent extends CommonObject
*
* @return array Tableau info des attributs
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info()
{
global $conf,$langs;
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index cef414ce38a..b7d510a3e0f 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -295,6 +295,7 @@ class AdherentType extends CommonObject
*
* @return array List of types of members
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array()
{
global $conf,$langs;
@@ -430,6 +431,7 @@ class AdherentType extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0)
{
global $conf;
@@ -446,6 +448,7 @@ class AdherentType extends CommonObject
*
* @return array Tableau info des attributs
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info()
{
global $conf,$langs;
diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php
index 240aa617233..90452816be8 100644
--- a/htdocs/adherents/class/subscription.class.php
+++ b/htdocs/adherents/class/subscription.class.php
@@ -369,6 +369,7 @@ class Subscription extends CommonObject
* @param int $statut Id statut
* @return string Label
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut)
{
global $langs;
diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php
index 85be894bae0..c4dae079c3c 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -169,6 +169,7 @@ class Dolistore
* @param int $parent Id of parent category
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_categories($parent = 0)
{
if (!isset($this->categories)) die('not possible');
@@ -215,6 +216,7 @@ class Dolistore
*
* @return string HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_products()
{
global $langs, $conf;
@@ -297,6 +299,7 @@ class Dolistore
* @param string $text symbol previous
* @return string html previous link
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_previous_link($text = '<<')
{
return ''.$text.'';
@@ -308,17 +311,19 @@ class Dolistore
* @param string $text symbol next
* @return string html next link
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_next_link($text = '>>')
{
return ''.$text.'';
}
- /**
+ /**
* get previous url
*
* @return string previous url
*/
- function get_previous_url()
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function get_previous_url()
{
$param_array = array();
if ($this->start < $this->per_page) {
@@ -340,6 +345,7 @@ class Dolistore
*
* @return string next url
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_next_url()
{
$param_array = array();
@@ -364,6 +370,7 @@ class Dolistore
* @param string $v2 version 2
* @return int result of compare
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function version_compare($v1, $v2)
{
$v1 = explode('.', $v1);
diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php
index a0100abf58d..32ebc4fb26e 100644
--- a/htdocs/api/class/api.class.php
+++ b/htdocs/api/class/api.class.php
@@ -277,6 +277,7 @@ class DolibarrApi
* @param array $matches Array of found string by regex search
* @return string Forged criteria. Example: "t.field like 'abc%'"
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function _forge_criteria_callback($matches)
{
global $db;
diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php
index abd8df94275..8d8281745fa 100644
--- a/htdocs/api/class/api_access.class.php
+++ b/htdocs/api/class/api_access.class.php
@@ -59,14 +59,13 @@ class DolibarrApiAccess implements iAuthenticate
*/
public static $user = '';
- // @codingStandardsIgnoreStart
-
/**
* Check access
*
* @return bool
* @throws RestException
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName
public function __isAllowed()
{
global $conf, $db;
@@ -172,11 +171,11 @@ class DolibarrApiAccess implements iAuthenticate
* @example Digest
* @example OAuth
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName
public function __getWWWAuthenticateString()
{
return '';
}
- // @codingStandardsIgnoreEnd
/**
* Verify access
diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php
index 72ec7e9707e..55f2d3f5df0 100644
--- a/htdocs/asset/class/asset.class.php
+++ b/htdocs/asset/class/asset.class.php
@@ -355,6 +355,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($status,$mode=0)
{
global $langs;
diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php
index 213efb2b186..e6b95d7ad37 100644
--- a/htdocs/asset/class/asset_type.class.php
+++ b/htdocs/asset/class/asset_type.class.php
@@ -287,6 +287,7 @@ class AssetType extends CommonObject
*
* @return array List of types of members
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array()
{
global $conf,$langs;
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index a299df1b6a7..94e42ee4334 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -651,6 +651,7 @@ class Categorie extends CommonObject
* @param string $type Type of category ('product', ...)
* @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_type($obj, $type)
{
global $user,$langs,$conf;
@@ -753,6 +754,7 @@ class Categorie extends CommonObject
*
* @return int 1 if OK, -1 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_type($obj,$type)
{
global $user,$langs,$conf;
@@ -973,6 +975,7 @@ class Categorie extends CommonObject
*
* @return array|int <0 KO, array ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_filles()
{
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie";
@@ -1002,6 +1005,7 @@ class Categorie extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function load_motherof()
{
global $conf;
@@ -1046,6 +1050,7 @@ class Categorie extends CommonObject
*
* @return array Array of categories. this->cats and this->motherof are set.
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_full_arbo($type, $markafterid=0)
{
global $conf, $langs;
@@ -1129,6 +1134,7 @@ class Categorie extends CommonObject
* @param int $protection Deep counter to avoid infinite loop
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_path_from_id_categ($id_categ,$protection=1000)
{
dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG);
@@ -1169,6 +1175,7 @@ class Categorie extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function debug_cats()
{
// Display $this->cats
@@ -1192,6 +1199,7 @@ class Categorie extends CommonObject
* @param boolean $parent Just parent categories if true
* @return array Table of Object Category
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_all_categories($type=null, $parent=false)
{
if (! is_numeric($type)) $type = $this->MAP_ID[$type];
@@ -1227,6 +1235,7 @@ class Categorie extends CommonObject
*
* @return integer 1 if already exist, 0 otherwise, -1 if error
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function already_exists()
{
$type=$this->type;
@@ -1277,6 +1286,7 @@ class Categorie extends CommonObject
* @param int $type Type of category (0, 1, ...)
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_main_categories($type=null)
{
return $this->get_all_categories($type, true);
@@ -1291,6 +1301,7 @@ class Categorie extends CommonObject
* @param int $nocolor 0
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function print_all_ways($sep = " >> ", $url='', $nocolor=0)
{
$ways = array();
@@ -1344,6 +1355,7 @@ class Categorie extends CommonObject
*
* @return int|array <0 KO, array OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_meres()
{
$parents = array();
@@ -1379,6 +1391,7 @@ class Categorie extends CommonObject
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_all_ways()
{
$ways = array();
@@ -1594,6 +1607,7 @@ class Categorie extends CommonObject
* @param string $file Nom du fichier uploade
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_photo($sdir, $file)
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -1643,6 +1657,7 @@ class Categorie extends CommonObject
* @param int $nbmax Nombre maximum de photos (0=pas de max)
* @return array Tableau de photos
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_photos($dir,$nbmax=0)
{
include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';
@@ -1697,6 +1712,7 @@ class Categorie extends CommonObject
* @param string $file Path to file
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_photo($file)
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -1725,6 +1741,7 @@ class Categorie extends CommonObject
* @param string $file Path to file
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_image_size($file)
{
$infoImg = getimagesize($file); // Recuperation des infos de l'image
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index 45a1ff2380f..fd620ef2fce 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -699,6 +699,7 @@ class ActionComm extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_userassigned()
{
$sql ="SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency";
@@ -1023,6 +1024,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user, $load_state_board=0)
{
global $conf, $langs;
@@ -1149,6 +1151,7 @@ class ActionComm extends CommonObject
* @param int $datestart Date start of event
* @return string Label
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($percent,$mode,$hidenastatus=0,$datestart='')
{
global $langs;
@@ -1358,6 +1361,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_exportfile($format,$type,$cachedelay,$filename,$filters)
{
global $conf,$langs,$dolibarr_main_url_root,$mysoc;
@@ -1678,8 +1682,6 @@ class ActionComm extends CommonObject
// TODO Scan events of type 'email' into table llx_actioncomm_reminder with status todo, send email, then set status to done
-
-
// Delete also very old past events (we do not keep more than 1 month record in past)
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder WHERE dateremind < '".$this->db->jdate($now - (3600 * 24 * 32))."'";
$this->db->query($sql);
diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php
index ba82630616c..0ae059ae78d 100644
--- a/htdocs/comm/action/class/actioncommreminder.class.php
+++ b/htdocs/comm/action/class/actioncommreminder.class.php
@@ -180,6 +180,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($status,$mode=0)
{
global $langs;
@@ -233,4 +234,3 @@ class ActionCommReminder extends CommonObject
$this->initAsSpecimenCommon();
}
}
-
diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php
index 68f2f723976..8f189c31e6e 100644
--- a/htdocs/comm/action/class/cactioncomm.class.php
+++ b/htdocs/comm/action/class/cactioncomm.class.php
@@ -125,6 +125,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.
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0)
{
global $langs,$conf;
diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php
index df348e4db51..4d8675bc8ee 100644
--- a/htdocs/comm/action/class/ical.class.php
+++ b/htdocs/comm/action/class/ical.class.php
@@ -52,6 +52,7 @@ class ICal
* @param string $file File
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function read_file($file)
{
$this->file = $file;
@@ -71,6 +72,7 @@ class ICal
*
* @return int
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_event_count()
{
return $this->event_count;
@@ -81,6 +83,7 @@ class ICal
*
* @return int
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_todo_count()
{
return $this->todo_count;
@@ -202,6 +205,7 @@ class ICal
* @param string $value Value
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_array($type, $key, $value)
{
@@ -260,6 +264,7 @@ class ICal
* @param string $text Text
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function retun_key_value($text)
{
/*
@@ -283,6 +288,7 @@ class ICal
* @param string $value string
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_rrule($value)
{
$result=array();
@@ -300,6 +306,7 @@ class ICal
* @param string $ical_date String date
* @return int
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_date_to_unix($ical_date)
{
$ical_date = str_replace('T', '', $ical_date);
@@ -322,6 +329,7 @@ class ICal
* @param string $value Value
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_dt_date($key, $value)
{
$return_value=array();
@@ -349,6 +357,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_sort_event_list()
{
$temp = $this->get_event_list();
@@ -370,6 +379,7 @@ class ICal
* @param array $b Operand b
* @return integer
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_dtstart_compare($a, $b)
{
return strnatcasecmp($a['DTSTART']['unixtime'], $b['DTSTART']['unixtime']);
@@ -380,6 +390,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_event_list()
{
return (! empty($this->cal['VEVENT'])?$this->cal['VEVENT']:'');
@@ -390,6 +401,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_freebusy_list()
{
return $this->cal['VFREEBUSY'];
@@ -400,6 +412,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_todo_list()
{
return $this->cal['VTODO'];
@@ -410,6 +423,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_calender_data()
{
return $this->cal['VCALENDAR'];
@@ -420,6 +434,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_all_data()
{
return $this->cal;
diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php
index 56c2f5ddd22..14d1fb20f4e 100644
--- a/htdocs/comm/mailing/class/advtargetemailing.class.php
+++ b/htdocs/comm/mailing/class/advtargetemailing.class.php
@@ -75,9 +75,9 @@ class AdvanceTargetingMailing extends CommonObject
/**
- * Constructor
+ * Constructor
*
- * @param DoliDb $db Database handler
+ * @param DoliDb $db Database handler
*/
function __construct($db)
{
@@ -260,6 +260,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $id Id object
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_by_mailing($id=0)
{
global $langs;
@@ -326,6 +327,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param string $type_element Type target
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_by_element($id=0, $type_element='mailing')
{
global $langs;
@@ -550,6 +552,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param array $arrayquery All element to Query
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function query_thirdparty($arrayquery)
{
global $langs,$conf;
@@ -642,16 +645,16 @@ class AdvanceTargetingMailing extends CommonObject
if (!empty($arrayquery['options_'.$key.'_max'])) {
$sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'].")";
}
- } else if (($extrafields->attribute_type[$key] == 'date') ||
+ } elseif (($extrafields->attribute_type[$key] == 'date') ||
($extrafields->attribute_type[$key] == 'datetime')) {
if (!empty($arrayquery['options_'.$key.'_end_dt'])){
$sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')";
}
- }else if ($extrafields->attribute_type[$key] == 'boolean') {
+ } elseif ($extrafields->attribute_type[$key] == 'boolean') {
if ($arrayquery['options_'.$key]!=''){
$sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")";
}
- }else{
+ } else {
if (is_array($arrayquery['options_'.$key])) {
$sqlwhere[]= " (te.".$key." IN ('".implode("','",$arrayquery['options_'.$key])."'))";
} elseif (!empty($arrayquery['options_'.$key])) {
@@ -704,6 +707,7 @@ class AdvanceTargetingMailing extends CommonObject
* @param int $withThirdpartyFilter add contact with tridparty filter
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function query_contact($arrayquery, $withThirdpartyFilter = 0)
{
global $langs,$conf;
diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php
index d114ad5225f..fa7a9a1bc9e 100644
--- a/htdocs/comm/mailing/class/mailing.class.php
+++ b/htdocs/comm/mailing/class/mailing.class.php
@@ -444,6 +444,7 @@ class Mailing extends CommonObject
*
* @return int 1 if OK, 0 if error
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_targets()
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles";
@@ -469,6 +470,7 @@ class Mailing extends CommonObject
* @param User $user Objet user qui valide
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function reset_targets_status($user)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles";
@@ -541,6 +543,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
@@ -644,4 +647,3 @@ class Mailing extends CommonObject
}
}
}
-
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index bac7cbfcf36..4957bf3e764 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -249,6 +249,7 @@ class Propal extends CommonObject
* TODO Replace calls to this function by generation objet Ligne
* inserted into table $this->products
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_product($idproduct, $qty, $remise_percent=0)
{
global $conf, $mysoc;
@@ -303,6 +304,7 @@ class Propal extends CommonObject
* @param int $idremise Id of fixed discount
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_discount($idremise)
{
global $langs;
@@ -1182,6 +1184,7 @@ class Propal extends CommonObject
* @return int Id of the new object if ok, <0 if ko
* @see create
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_from($user)
{
// i love this function because $this->products is not used in create function...
@@ -1572,6 +1575,7 @@ class Propal extends CommonObject
* @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines($only_product=0)
{
$this->lines=array();
@@ -1812,6 +1816,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date($user, $date, $notrigger=0)
{
if (empty($date))
@@ -1879,6 +1884,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_echeance($user, $date_fin_validite, $notrigger=0)
{
if (! empty($user->rights->propal->creer))
@@ -1939,6 +1945,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison, $notrigger=0)
{
if (! empty($user->rights->propal->creer))
@@ -1999,6 +2006,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_availability($user, $id, $notrigger=0)
{
if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT)
@@ -2068,6 +2076,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_demand_reason($user, $id, $notrigger=0)
{
if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT)
@@ -2139,6 +2148,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_ref_client($user, $ref_client, $notrigger=0)
{
if (! empty($user->rights->propal->creer))
@@ -2202,6 +2212,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_percent($user, $remise, $notrigger=0)
{
$remise=trim($remise)?trim($remise):0;
@@ -2267,6 +2278,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_absolue($user, $remise, $notrigger=0)
{
$remise=trim($remise)?trim($remise):0;
@@ -2550,6 +2562,7 @@ class Propal extends CommonObject
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_draft($user, $notrigger=0)
{
$error=0;
@@ -2613,6 +2626,7 @@ class Propal extends CommonObject
* @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC')
{
global $user;
@@ -2692,6 +2706,7 @@ class Propal extends CommonObject
* @param int $id Id propal
* @return array Array of invoices id
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function InvoiceArrayList($id)
{
$ga = array();
@@ -2972,6 +2987,7 @@ class Propal extends CommonObject
* @return int >0 si ok, <0 si ko
* @deprecated use set_demand_reason
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demand_reason($demand_reason_id, $notrigger=0)
{
global $user;
@@ -3111,6 +3127,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=1)
{
global $conf;
@@ -3156,6 +3173,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user,$mode)
{
global $conf, $langs;
@@ -3328,6 +3346,7 @@ class Propal extends CommonObject
*
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $user;
@@ -4215,6 +4234,7 @@ class PropaleLigne extends CommonObjectLine
*
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total()
{
$this->db->begin();
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 5e0475b158a..380d26f2496 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -441,6 +441,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_draft($user, $idwarehouse=-1)
{
global $conf,$langs;
@@ -522,6 +523,7 @@ class Commande extends CommonOrder
* @param User $user Object user that change status
* @return int <0 if KO, 0 if nothing is done, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_reopen($user)
{
$error=0;
@@ -875,7 +877,7 @@ class Commande extends CommonOrder
$line->fk_unit,
$this->element,
$line->id
- );
+ );
if ($result < 0)
{
if ($result != self::STOCK_NOT_ENOUGH_FOR_ORDER)
@@ -1493,6 +1495,7 @@ class Commande extends CommonOrder
* TODO Remplacer les appels a cette fonction par generation objet Ligne
* insere dans tableau $this->products
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='')
{
global $conf, $mysoc;
@@ -1513,56 +1516,57 @@ class Commande extends CommonOrder
$localtax2_tx=get_localtax($tva_tx,2,$this->thirdparty,$mysoc,$tva_npr);
// multiprix
- if($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level)
+ if($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) {
$price = $prod->multiprices[$this->thirdparty->price_level];
- else
- $price = $prod->price;
+ } else {
+ $price = $prod->price;
+ }
- $line=new OrderLine($this->db);
+ $line=new OrderLine($this->db);
- $line->context = $this->context;
+ $line->context = $this->context;
- $line->fk_product=$idproduct;
- $line->desc=$prod->description;
- $line->qty=$qty;
- $line->subprice=$price;
- $line->remise_percent=$remise_percent;
- $line->vat_src_code=$vat_src_code;
- $line->tva_tx=$tva_tx;
- $line->localtax1_tx=$localtax1_tx;
- $line->localtax2_tx=$localtax2_tx;
- $line->ref=$prod->ref;
- $line->libelle=$prod->label;
- $line->product_desc=$prod->description;
- $line->fk_unit=$prod->fk_unit;
+ $line->fk_product=$idproduct;
+ $line->desc=$prod->description;
+ $line->qty=$qty;
+ $line->subprice=$price;
+ $line->remise_percent=$remise_percent;
+ $line->vat_src_code=$vat_src_code;
+ $line->tva_tx=$tva_tx;
+ $line->localtax1_tx=$localtax1_tx;
+ $line->localtax2_tx=$localtax2_tx;
+ $line->ref=$prod->ref;
+ $line->libelle=$prod->label;
+ $line->product_desc=$prod->description;
+ $line->fk_unit=$prod->fk_unit;
- // Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
- // Save the start and end date of the line in the object
- if ($date_start) { $line->date_start = $date_start; }
- if ($date_end) { $line->date_end = $date_end; }
+ // Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html)
+ // Save the start and end date of the line in the object
+ if ($date_start) { $line->date_start = $date_start; }
+ if ($date_end) { $line->date_end = $date_end; }
- $this->lines[] = $line;
+ $this->lines[] = $line;
- /** POUR AJOUTER AUTOMATIQUEMENT LES SOUSPRODUITS a LA COMMANDE
- if (! empty($conf->global->PRODUIT_SOUSPRODUITS))
- {
- $prod = new Product($this->db);
- $prod->fetch($idproduct);
- $prod -> get_sousproduits_arbo();
- $prods_arbo = $prod->get_arbo_each_prod();
- if(count($prods_arbo) > 0)
- {
- foreach($prods_arbo as $key => $value)
- {
- // print "id : ".$value[1].' :qty: '.$value[0].'
';
- if(! in_array($value[1],$this->products))
- $this->add_product($value[1], $value[0]);
+ /** POUR AJOUTER AUTOMATIQUEMENT LES SOUSPRODUITS a LA COMMANDE
+ if (! empty($conf->global->PRODUIT_SOUSPRODUITS))
+ {
+ $prod = new Product($this->db);
+ $prod->fetch($idproduct);
+ $prod -> get_sousproduits_arbo();
+ $prods_arbo = $prod->get_arbo_each_prod();
+ if(count($prods_arbo) > 0)
+ {
+ foreach($prods_arbo as $key => $value)
+ {
+ // print "id : ".$value[1].' :qty: '.$value[0].'
';
+ if(! in_array($value[1],$this->products))
+ $this->add_product($value[1], $value[0]);
- }
- }
+ }
+ }
- }
- **/
+ }
+ **/
}
}
@@ -1722,6 +1726,7 @@ class Commande extends CommonOrder
* @param int $idremise Id de la remise fixe
* @return int >0 si ok, <0 si ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_discount($idremise)
{
global $langs;
@@ -1799,6 +1804,7 @@ class Commande extends CommonOrder
* @param int $only_product Return only physical products
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines($only_product=0)
{
$this->lines=array();
@@ -2025,6 +2031,7 @@ class Commande extends CommonOrder
*
* TODO deprecate, move to Shipping class
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function nb_expedition()
{
$sql = 'SELECT count(*)';
@@ -2051,6 +2058,7 @@ class Commande extends CommonOrder
*
* TODO FONCTION NON FINIE A FINIR
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function stock_array($filtre_statut=self::STATUS_CANCELED)
{
$this->stocks = array();
@@ -2167,6 +2175,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise($user, $remise, $notrigger=0)
{
$remise=trim($remise)?trim($remise):0;
@@ -2233,6 +2242,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_absolue($user, $remise, $notrigger=0)
{
$remise=trim($remise)?trim($remise):0;
@@ -2299,6 +2309,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date($user, $date, $notrigger=0)
{
if ($user->rights->commande->creer)
@@ -2363,6 +2374,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 si ko, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison, $notrigger=0)
{
if ($user->rights->commande->creer)
@@ -2432,6 +2444,7 @@ class Commande extends CommonOrder
* @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC')
{
global $user;
@@ -2569,6 +2582,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int >0 if ok, <0 if ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demand_reason($demand_reason_id, $notrigger=0)
{
global $user;
@@ -2640,6 +2654,7 @@ class Commande extends CommonOrder
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_ref_client($user, $ref_client, $notrigger=0)
{
if ($user->rights->commande->creer)
@@ -3250,6 +3265,7 @@ class Commande extends CommonOrder
* @param User $user Object user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user)
{
global $conf, $langs;
@@ -3338,6 +3354,7 @@ class Commande extends CommonOrder
* @param int $donotshowbilled Do not show billed status after order status
* @return string Label of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$billed,$mode,$donotshowbilled=0)
{
global $langs, $conf;
@@ -3653,6 +3670,7 @@ class Commande extends CommonOrder
*
* @return int <0 si ko, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $user;
@@ -4288,6 +4306,7 @@ class OrderLine extends CommonOrderLine
*
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total()
{
$this->db->begin();
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index a28555d9c1d..62028804a4b 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -304,6 +304,7 @@ class Account extends CommonObject
* @param string $type Type of link ('payment', 'company', 'member', ...)
* @return int <0 if KO, id line if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_url_line($line_id, $url_id, $url, $label, $type)
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url (";
@@ -342,6 +343,7 @@ class Account extends CommonObject
* @param string $type To search using type
* @return array|-1 Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_url($fk_bank='', $url_id='', $type='')
{
$lines = array();
@@ -783,11 +785,12 @@ class Account extends CommonObject
/**
- * Update BBAN (RIB) account fields
+ * Update BBAN (RIB) account fields
*
- * @param User $user Object user making update
- * @return int <0 if KO, >0 if OK
+ * @param User $user Object user making update
+ * @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_bban(User $user = null)
{
global $conf,$langs;
@@ -1075,6 +1078,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut, $mode = 0)
{
global $langs;
@@ -1110,6 +1114,7 @@ class Account extends CommonObject
*
* @return boolean vrai si peut etre supprime, faux sinon
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function can_be_deleted()
{
$can_be_deleted=false;
@@ -1179,6 +1184,7 @@ class Account extends CommonObject
* @param int $filteraccountid To get info for a particular account id
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board(User $user, $filteraccountid = 0)
{
global $conf, $langs;
@@ -1232,6 +1238,7 @@ class Account extends CommonObject
* @param int $filteraccountid To get info for a particular account id
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board($filteraccountid = 0)
{
global $user;
@@ -1887,6 +1894,7 @@ class AccountLine extends CommonObject
* @param User $user User object that delete
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_urls(User $user = null)
{
$nbko=0;
@@ -1952,12 +1960,13 @@ class AccountLine extends CommonObject
/**
- * Update conciliation field
+ * Update conciliation field
*
- * @param User $user Objet user making update
- * @param int $cat Category id
- * @return int <0 if KO, >0 if OK
+ * @param User $user Objet user making update
+ * @param int $cat Category id
+ * @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_conciliation(User $user, $cat)
{
global $conf,$langs;
@@ -2020,6 +2029,7 @@ class AccountLine extends CommonObject
* @param int $sign 1 or -1
* @return int >0 if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function datev_change($rowid,$sign=1)
{
$sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid;
@@ -2057,6 +2067,7 @@ class AccountLine extends CommonObject
* @param int $id Id of line to change
* @return int >0 if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function datev_next($id)
{
return $this->datev_change($id,1);
@@ -2068,6 +2079,7 @@ class AccountLine extends CommonObject
* @param int $id Id of line to change
* @return int >0 if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function datev_previous($id)
{
return $this->datev_change($id,-1);
@@ -2081,6 +2093,7 @@ class AccountLine extends CommonObject
* @param int $sign 1 or -1
* @return int >0 if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dateo_change($rowid,$sign=1)
{
$sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid;
@@ -2118,6 +2131,7 @@ class AccountLine extends CommonObject
* @param int $id Id of line to change
* @return int >0 if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dateo_next($id)
{
return $this->dateo_change($id,1);
@@ -2129,6 +2143,7 @@ class AccountLine extends CommonObject
* @param int $id Id of line to change
* @return int >0 if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dateo_previous($id)
{
return $this->dateo_change($id,-1);
@@ -2244,6 +2259,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php
index e21e052e478..47e7219ea81 100644
--- a/htdocs/compta/bank/class/paymentvarious.class.php
+++ b/htdocs/compta/bank/class/paymentvarious.class.php
@@ -461,6 +461,7 @@ class PaymentVarious extends CommonObject
* @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_various SET fk_bank = '.$id_bank;
@@ -496,6 +497,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php
index c6c95a0e282..0600a141308 100644
--- a/htdocs/compta/deplacement/class/deplacement.class.php
+++ b/htdocs/compta/deplacement/class/deplacement.class.php
@@ -317,6 +317,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
@@ -463,4 +464,3 @@ class Deplacement extends CommonObject
}
}
}
-
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 7d054d054da..6e61b55e2ba 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -448,8 +448,9 @@ class FactureRec extends CommonInvoice
/**
* Recupere les lignes de factures predefinies dans this->lines
*
- * @return int 1 if OK, < 0 if KO
- */
+ * @return int 1 if OK, < 0 if KO
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$this->lines=array();
@@ -1196,6 +1197,7 @@ class FactureRec extends CommonInvoice
* @param int $type Type invoice
* @return string Label of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0)
{
global $langs;
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index 0b77f7c5c07..cb705e063db 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1416,6 +1416,7 @@ class Facture extends CommonInvoice
*
* @return int 1 if OK, < 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$this->lines=array();
@@ -1676,6 +1677,7 @@ class Facture extends CommonInvoice
* @param int $idremise Id of absolute discount
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_discount($idremise)
{
global $langs;
@@ -1777,6 +1779,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_ref_client($ref_client, $notrigger=0)
{
global $user;
@@ -2012,6 +2015,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_paid($user, $close_code='', $close_note='')
{
$error=0;
@@ -2069,6 +2073,7 @@ class Facture extends CommonInvoice
* @param User $user Object user that change status
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_unpaid($user)
{
$error=0;
@@ -2118,6 +2123,7 @@ class Facture extends CommonInvoice
* @param string $close_note Comment
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_canceled($user, $close_code='', $close_note='')
{
@@ -2478,6 +2484,7 @@ class Facture extends CommonInvoice
* @param int $idwarehouse Id warehouse to use for stock change.
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_draft($user,$idwarehouse=-1)
{
global $conf,$langs;
@@ -3043,6 +3050,7 @@ class Facture extends CommonInvoice
* @param int $percent Percentage
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_percent($line, $percent)
{
global $mysoc,$user;
@@ -3140,6 +3148,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise($user, $remise, $notrigger=0)
{
// Clean parameters
@@ -3204,6 +3213,7 @@ class Facture extends CommonInvoice
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_absolue($user, $remise, $notrigger=0)
{
if (empty($remise)) $remise=0;
@@ -3409,6 +3419,7 @@ class Facture extends CommonInvoice
* @param string $sortorder Sort order
* @return int -1 if KO, array with result if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
{
global $conf,$user;
@@ -3478,6 +3489,7 @@ class Facture extends CommonInvoice
* @param int $socid Id thirdparty
* @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_replacable_invoices($socid=0)
{
global $conf;
@@ -3526,6 +3538,7 @@ class Facture extends CommonInvoice
* @param int $socid Id thirdparty
* @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_qualified_avoir_invoices($socid=0)
{
global $conf;
@@ -3599,6 +3612,7 @@ class Facture extends CommonInvoice
* @param float $amount Amount we request direct debit for
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demande_prelevement($fuser, $amount=0)
{
@@ -3708,6 +3722,7 @@ class Facture extends CommonInvoice
* @param int $did id de la demande a supprimer
* @return int <0 if OK, >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function demande_prelevement_delete($fuser, $did)
{
$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande';
@@ -3732,6 +3747,7 @@ class Facture extends CommonInvoice
* @param User $user Object user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user)
{
global $conf, $langs;
@@ -3976,6 +3992,7 @@ class Facture extends CommonInvoice
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf, $user;
@@ -4089,6 +4106,7 @@ class Facture extends CommonInvoice
*
* @return boolean
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_first()
{
return ($this->situation_counter == 1);
@@ -4099,6 +4117,7 @@ class Facture extends CommonInvoice
*
* @return mixed -1 if error, array of previous situations
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_prev_sits()
{
global $conf;
@@ -4179,6 +4198,7 @@ class Facture extends CommonInvoice
* @return bool Last of the cycle status
*
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_last_in_cycle()
{
global $conf;
@@ -4816,6 +4836,7 @@ class FactureLigne extends CommonInvoiceLine
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total()
{
$this->db->begin();
@@ -4857,6 +4878,7 @@ class FactureLigne extends CommonInvoiceLine
* @param int $invoiceid Invoice id
* @return int >= 0
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_prev_progress($invoiceid)
{
if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") {
diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php
index 764ba119dc7..2b53770183d 100644
--- a/htdocs/compta/localtax/class/localtax.class.php
+++ b/htdocs/compta/localtax/class/localtax.class.php
@@ -350,6 +350,7 @@ class Localtax extends CommonObject
* @param int $year Year
* @return int ???
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_collectee($year = 0)
{
$sql = "SELECT sum(f.localtax) as amount";
@@ -388,6 +389,7 @@ class Localtax extends CommonObject
* @param int $year Year
* @return int ???
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_payee($year = 0)
{
@@ -429,6 +431,7 @@ class Localtax extends CommonObject
* @param int $year Year
* @return int ???
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_reglee($year = 0)
{
@@ -582,6 +585,7 @@ class Localtax extends CommonObject
* @param int $id Id bank account
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'localtax SET fk_bank = '.$id;
@@ -640,12 +644,13 @@ class Localtax extends CommonObject
*
* @param int $status Statut
* @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)
- {
- global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function LibStatut($status, $mode=0)
+ {
+ global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
- return '';
- }
+ return '';
+ }
}
diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
index f8dba8c6b1d..b28ca9dcb18 100644
--- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php
+++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
@@ -498,6 +498,7 @@ class RemiseCheque extends CommonObject
* @param User $user Objet user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user)
{
global $conf, $langs;
@@ -550,6 +551,7 @@ class RemiseCheque extends CommonObject
*
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $user;
@@ -862,8 +864,9 @@ class RemiseCheque extends CommonObject
/**
* Charge les proprietes ref_previous et ref_next
*
- * @return int <0 if KO, 0 if OK
+ * @return int <0 if KO, 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_previous_next_id()
{
global $conf;
@@ -907,6 +910,7 @@ class RemiseCheque extends CommonObject
* @param int $date Date creation
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date($user, $date)
{
if ($user->rights->banque->cheque)
@@ -941,6 +945,7 @@ class RemiseCheque extends CommonObject
* @param int $ref ref of bordereau
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_number($user, $ref)
{
if ($user->rights->banque->cheque)
@@ -1063,6 +1068,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0)
{
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 fa824375793..1fd2ad8bbef 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -708,6 +708,7 @@ class Paiement extends CommonObject
* @param int $id_bank Id compte bancaire
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' set fk_bank = '.$id_bank;
@@ -733,6 +734,7 @@ class Paiement extends CommonObject
* @param int $date New date
* @return int <0 if KO, 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_date($date)
{
if (!empty($date) && $this->statut!=1)
@@ -764,6 +766,7 @@ class Paiement extends CommonObject
* @param string $num New num
* @return int <0 if KO, 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_num($num)
{
if(!empty($num) && $this->statut!=1)
@@ -1127,6 +1130,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0)
{
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
@@ -1171,11 +1175,12 @@ class Paiement extends CommonObject
}
/**
- * Load the third party of object, from id into this->thirdparty
+ * Load the third party of object, from id into this->thirdparty
*
- * @param int $force_thirdparty_id Force thirdparty id
- * @return int <0 if KO, >0 if OK
+ * @param int $force_thirdparty_id Force thirdparty id
+ * @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_thirdparty($force_thirdparty_id=0)
{
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 bfce2e8af95..7eba6afec29 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -122,6 +122,7 @@ class BonPrelevement extends CommonObject
* @param string $number_key number key of account number
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key)
{
$result = 0;
@@ -332,6 +333,7 @@ class BonPrelevement extends CommonObject
*
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_credite()
{
global $user,$conf;
@@ -411,6 +413,7 @@ class BonPrelevement extends CommonObject
* @param int $date date of action
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_infocredit($user, $date)
{
global $conf,$langs;
@@ -558,6 +561,7 @@ class BonPrelevement extends CommonObject
* @param string $method method of transmision to bank
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_infotrans($user, $date, $method)
{
global $conf,$langs;
@@ -679,6 +683,7 @@ class BonPrelevement extends CommonObject
*
* @return double Total amount
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SommeAPrelever()
{
global $conf;
@@ -719,6 +724,7 @@ class BonPrelevement extends CommonObject
* @param int $agence dolibarr mysoc agence
* @return int 0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DeleteNotification($user, $action)
{
$result = 0;
@@ -1242,6 +1251,7 @@ class BonPrelevement extends CommonObject
* @param string $action notification action
* @return int 0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function AddNotification($db, $user, $action)
{
$result = 0;
@@ -1473,6 +1483,7 @@ class BonPrelevement extends CommonObject
* @param string $rib_dom rib domiciliation
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $facnumber, $facid, $rib_dom='')
{
fputs($this->file, "06");
@@ -1566,6 +1577,7 @@ class BonPrelevement extends CommonObject
* @param string $row_drum rib.rowid used to generate rum
* @return string Return string with SEPA part DrctDbtTxInf
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum)
{
$CrLf = "\n";
@@ -1627,6 +1639,7 @@ class BonPrelevement extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregEmetteur()
{
fputs($this->file, "03");
@@ -1699,6 +1712,7 @@ class BonPrelevement extends CommonObject
* @param string $format FRST or RCUR or ALL
* @return string String with SEPA Sender
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n', $format='FRST')
{
// SEPA INITIALISATION
@@ -1814,6 +1828,7 @@ class BonPrelevement extends CommonObject
* @param int $total total amount
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregTotal($total)
{
fputs($this->file, "08");
@@ -1887,6 +1902,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
if (empty($this->labelstatut))
@@ -1938,4 +1954,3 @@ class BonPrelevement extends CommonObject
}
}
}
-
diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php
index 10a7f6d23ee..fc92302cf7d 100644
--- a/htdocs/compta/prelevement/class/ligneprelevement.class.php
+++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php
@@ -135,6 +135,7 @@ class LignePrelevement
* @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
* @return string Label
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
@@ -180,4 +181,3 @@ class LignePrelevement
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
}
}
-
diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php
index 7abdf64d1f0..095defe986a 100644
--- a/htdocs/compta/prelevement/class/rejetprelevement.class.php
+++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php
@@ -205,6 +205,7 @@ class RejetPrelevement
* @param Facture $fac Invoice object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _send_email($fac)
{
global $langs;
@@ -369,4 +370,3 @@ class RejetPrelevement
}
}
}
-
diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php
index a7a8736b96a..48877412d76 100644
--- a/htdocs/compta/salaries/class/paymentsalary.class.php
+++ b/htdocs/compta/salaries/class/paymentsalary.class.php
@@ -497,6 +497,7 @@ class PaymentSalary extends CommonObject
* @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_salary SET fk_bank = '.$id_bank;
@@ -595,6 +596,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0)
{
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php
index 3add8b14076..bfa8c97a058 100644
--- a/htdocs/compta/sociales/class/cchargesociales.class.php
+++ b/htdocs/compta/sociales/class/cchargesociales.class.php
@@ -38,7 +38,7 @@ class Cchargesociales
* @var string Id to identify managed objects
*/
public $element = 'cchargesociales';
-
+
/**
* @var string Name of table without prefix where object is stored
*/
@@ -51,7 +51,7 @@ class Cchargesociales
public $fk_pays;
public $module;
public $accountancy_code;
-
+
/**
* Constructor
@@ -78,7 +78,7 @@ class Cchargesociales
$error = 0;
// Clean parameters
-
+
if (isset($this->libelle)) {
$this->libelle = trim($this->libelle);
}
@@ -101,14 +101,14 @@ class Cchargesociales
$this->accountancy_code = trim($this->accountancy_code);
}
-
+
// Check parameters
// Put here code to add control on parameters values
// Insert request
$sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '(';
-
+
$sql.= 'libelle,';
$sql.= 'deductible,';
$sql.= 'active,';
@@ -117,9 +117,9 @@ class Cchargesociales
$sql.= 'module';
$sql.= 'accountancy_code';
-
+
$sql .= ') VALUES (';
-
+
$sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").',';
$sql .= ' '.(! isset($this->deductible)?'NULL':$this->deductible).',';
$sql .= ' '.(! isset($this->active)?'NULL':$this->active).',';
@@ -128,7 +128,7 @@ class Cchargesociales
$sql .= ' '.(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'").',';
$sql .= ' '.(! isset($this->accountancy_code)?'NULL':"'".$this->db->escape($this->accountancy_code)."'");
-
+
$sql .= ')';
$this->db->begin();
@@ -201,7 +201,7 @@ class Cchargesociales
$obj = $this->db->fetch_object($resql);
$this->id = $obj->id;
-
+
$this->libelle = $obj->libelle;
$this->deductible = $obj->deductible;
$this->active = $obj->active;
@@ -210,7 +210,7 @@ class Cchargesociales
$this->module = $obj->module;
$this->accountancy_code = $obj->accountancy_code;
-
+
}
$this->db->free($resql);
@@ -242,7 +242,7 @@ class Cchargesociales
dol_syslog(__METHOD__, LOG_DEBUG);
// Clean parameters
-
+
if (isset($this->libelle)) {
$this->libelle = trim($this->libelle);
}
@@ -265,7 +265,7 @@ class Cchargesociales
$this->accountancy_code = trim($this->accountancy_code);
}
-
+
// Check parameters
// Put here code to add a control on parameters values
@@ -449,7 +449,7 @@ class Cchargesociales
$result.= $link . $this->ref . $linkend;
return $result;
}
-
+
/**
* Retourne le libelle du status d'un user (actif, inactif)
*
@@ -468,6 +468,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0)
{
global $langs;
@@ -504,8 +505,8 @@ class Cchargesociales
if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5');
}
}
-
-
+
+
/**
* Initialise object with example values
* Id must be 0 if object instance is a specimen
@@ -515,7 +516,7 @@ class Cchargesociales
public function initAsSpecimen()
{
$this->id = 0;
-
+
$this->libelle = '';
$this->deductible = '';
$this->active = '';
diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php
index 41d91235150..bad851450a7 100644
--- a/htdocs/compta/sociales/class/chargesociales.class.php
+++ b/htdocs/compta/sociales/class/chargesociales.class.php
@@ -373,6 +373,7 @@ class ChargeSociales extends CommonObject
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_paid($user)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET";
@@ -388,6 +389,7 @@ class ChargeSociales extends CommonObject
* @param User $user Object user making change
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_unpaid($user)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET";
@@ -418,6 +420,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0,$alreadypaid=-1)
{
global $langs;
@@ -645,4 +648,3 @@ class ChargeSociales extends CommonObject
$this->type_libelle = 'Social contribution label';
}
}
-
diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
index b053e180159..4a989554b69 100644
--- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
+++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
@@ -606,6 +606,7 @@ class PaymentSocialContribution extends CommonObject
* @param int $id_bank Id if bank
* @return int >0 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id;
@@ -642,6 +643,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0)
{
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index 24c660f789c..6b1211cd1fc 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -367,8 +367,9 @@ class Tva extends CommonObject
* Total of the VAT from invoices emitted by the thirdparty.
*
* @param int $year Year
- * @return double Amount
+ * @return double Amount
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tva_sum_collectee($year = 0)
{
@@ -408,6 +409,7 @@ class Tva extends CommonObject
* @param int $year Year
* @return double Amount
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tva_sum_payee($year = 0)
{
@@ -448,6 +450,7 @@ class Tva extends CommonObject
* @param int $year Year
* @return double Amount
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tva_sum_reglee($year = 0)
{
@@ -639,6 +642,7 @@ class Tva extends CommonObject
* @param int $id_bank Id bank account
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id_bank)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.$id_bank;
@@ -803,10 +807,11 @@ 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)
- {
- global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function LibStatut($status,$mode=0)
+ {
+ global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
- return '';
- }
+ return '';
+ }
}
diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php
index c0477a6c752..06c65500527 100644
--- a/htdocs/contact/canvas/actions_contactcard_common.class.php
+++ b/htdocs/contact/canvas/actions_contactcard_common.class.php
@@ -83,6 +83,7 @@ abstract class ActionsContactCardCommon
* @param int $id Id
* @return string HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id)
{
global $conf, $langs, $user, $canvas;
@@ -270,33 +271,34 @@ abstract class ActionsContactCardCommon
*
* @return string HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function assign_post()
{
global $langs, $mysoc;
- $this->object->old_name = $_POST["old_name"];
- $this->object->old_firstname = $_POST["old_firstname"];
+ $this->object->old_name = $_POST["old_name"];
+ $this->object->old_firstname = $_POST["old_firstname"];
- $this->object->socid = $_POST["socid"];
- $this->object->lastname = $_POST["name"];
- $this->object->firstname = $_POST["firstname"];
- $this->object->civility_id = $_POST["civility_id"];
- $this->object->poste = $_POST["poste"];
- $this->object->address = $_POST["address"];
- $this->object->zip = $_POST["zipcode"];
- $this->object->town = $_POST["town"];
- $this->object->fk_departement = $_POST["state_id"];
- $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
- $this->object->state_id = $_POST["state_id"];
- $this->object->phone_pro = $_POST["phone_pro"];
- $this->object->phone_perso = $_POST["phone_perso"];
- $this->object->phone_mobile = $_POST["phone_mobile"];
- $this->object->fax = $_POST["fax"];
- $this->object->email = $_POST["email"];
- $this->object->jabberid = $_POST["jabberid"];
- $this->object->priv = $_POST["priv"];
- $this->object->note = $_POST["note"];
- $this->object->canvas = $_POST["canvas"];
+ $this->object->socid = $_POST["socid"];
+ $this->object->lastname = $_POST["name"];
+ $this->object->firstname = $_POST["firstname"];
+ $this->object->civility_id = $_POST["civility_id"];
+ $this->object->poste = $_POST["poste"];
+ $this->object->address = $_POST["address"];
+ $this->object->zip = $_POST["zipcode"];
+ $this->object->town = $_POST["town"];
+ $this->object->fk_departement = $_POST["state_id"];
+ $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
+ $this->object->state_id = $_POST["state_id"];
+ $this->object->phone_pro = $_POST["phone_pro"];
+ $this->object->phone_perso = $_POST["phone_perso"];
+ $this->object->phone_mobile = $_POST["phone_mobile"];
+ $this->object->fax = $_POST["fax"];
+ $this->object->email = $_POST["email"];
+ $this->object->jabberid = $_POST["jabberid"];
+ $this->object->priv = $_POST["priv"];
+ $this->object->note = $_POST["note"];
+ $this->object->canvas = $_POST["canvas"];
// We set country_id, and country_code label of the chosen country
if ($this->object->country_id)
@@ -317,4 +319,3 @@ abstract class ActionsContactCardCommon
}
}
}
-
diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php
index 01007d28aa8..566434c1d5a 100644
--- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php
+++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php
@@ -73,6 +73,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
* @param int $id Id
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id)
{
global $limit, $offset, $sortfield, $sortorder;
@@ -128,6 +129,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
* @param string $sortorder Sort order ('ASC' or 'DESC')
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{
global $conf, $langs;
@@ -137,4 +139,3 @@ class ActionsContactCardDefault extends ActionsContactCardCommon
$this->list_datas = array();
}
}
-
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index b3251a853c3..4cd6fe81820 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -150,6 +150,7 @@ class Contact extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $user;
@@ -483,6 +484,7 @@ class Contact extends CommonObject
* 2=Return key only (uid=qqq)
* @return string DN
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0)
{
global $conf;
@@ -499,6 +501,7 @@ class Contact extends CommonObject
*
* @return array Tableau info des attributs
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info()
{
global $conf,$langs;
@@ -575,6 +578,7 @@ class Contact extends CommonObject
* @param int $notrigger 0=no, 1=yes
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_perso($id, $user=null, $notrigger=0)
{
$error=0;
@@ -857,6 +861,7 @@ class Contact extends CommonObject
*
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_ref_elements()
{
// Compte les elements pour lesquels il est contact
@@ -1196,6 +1201,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode)
{
global $langs;
@@ -1240,6 +1246,7 @@ class Contact extends CommonObject
* @param int $statut Type (0 = public, 1 = private)
* @return string Label translated
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibPubPriv($statut)
{
global $langs;
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index 4f153cf33d7..2ae8c785282 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -251,6 +251,7 @@ class Contrat extends CommonObject
* @param string $comment A comment typed by user
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function active_line($user, $line_id, $date, $date_end='', $comment='')
{
$result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment);
@@ -272,6 +273,7 @@ class Contrat extends CommonObject
* @param string $comment A comment typed by user
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function close_line($user, $line_id, $date_end, $comment='')
{
$result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment);
@@ -711,6 +713,7 @@ class Contrat extends CommonObject
*
* @return ContratLigne[] Return array of contract lines
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$this->nbofserviceswait=0;
@@ -1789,6 +1792,7 @@ class Contrat extends CommonObject
* @return int <0 if KO, >0 if OK
* @deprecated This function will never be used. Status of a contract is status of its lines.
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_statut($user)
{
dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
@@ -1827,6 +1831,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode)
{
global $langs;
@@ -2008,6 +2013,7 @@ class Contrat extends CommonObject
* @param int $statut Status of lines to get
* @return array Array of line's rowid
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function array_detail($statut=-1)
{
$tab=array();
@@ -2084,6 +2090,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user,$mode)
{
global $conf, $langs;
@@ -2160,6 +2167,7 @@ class Contrat extends CommonObject
*
* @return int <0 si ko, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf, $user;
@@ -2593,6 +2601,7 @@ class ContratLigne extends CommonObjectLine
* @param string $moreatt More attribute
* @return string Libelle
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($statut,$mode,$expired=-1,$moreatt='')
{
global $langs;
@@ -3012,6 +3021,7 @@ class ContratLigne extends CommonObjectLine
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total()
{
$this->db->begin();
@@ -3131,6 +3141,7 @@ class ContratLigne extends CommonObjectLine
* @param string $comment A comment typed by user
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function active_line($user, $date, $date_end = '', $comment = '')
{
global $langs, $conf;
@@ -3188,6 +3199,7 @@ class ContratLigne extends CommonObjectLine
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function close_line($user, $date_end, $comment = '', $notrigger=0)
{
global $langs, $conf;
diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php
index 51f2ae671ef..0fdd3333549 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -833,6 +833,7 @@ class CMailFile
* @param string $sourcefile Path to file to encode
* @return int <0 if KO, encoded string if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _encode_file($sourcefile)
{
$newsourcefile=dol_osencode($sourcefile);
@@ -859,6 +860,7 @@ class CMailFile
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_mail()
{
global $conf,$dolibarr_main_data_root;
@@ -950,6 +952,7 @@ class CMailFile
*
* @return string headers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_smtpheaders()
{
global $conf;
@@ -1014,6 +1017,7 @@ class CMailFile
* @param array $mimefilename_list Array of mime types
* @return string mime headers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_mimeheaders($filename_list, $mimefilename_list)
{
$mimedone=0;
@@ -1042,6 +1046,7 @@ class CMailFile
* @param string $msgtext Message string
* @return string String content
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_body($msgtext)
{
global $conf;
@@ -1144,6 +1149,7 @@ class CMailFile
* @param array $mimefilename_list Tableau
* @return string Chaine fichiers encodes
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_files($filename_list,$mimetype_list,$mimefilename_list)
{
$out = '';
@@ -1189,6 +1195,7 @@ class CMailFile
* @param array $images_list Tableau
* @return string Chaine images encodees
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_images($images_list)
{
$out = '';
@@ -1221,6 +1228,7 @@ class CMailFile
* @param int $port Example: 25, 465
* @return int Socket id if ok, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function check_server_port($host,$port)
{
global $conf;
@@ -1285,6 +1293,7 @@ class CMailFile
* @param string $response Response string
* @return boolean true if success
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function server_parse($socket, $response)
{
$_retVal = true; // Indicates if Object was created or not
@@ -1511,4 +1520,3 @@ class CMailFile
return $ret;
}
}
-
diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php
index 1eafa042d4f..5bc8105049e 100644
--- a/htdocs/core/class/CSMSFile.class.php
+++ b/htdocs/core/class/CSMSFile.class.php
@@ -198,6 +198,7 @@ class CSMSFile
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_sms()
{
global $conf,$dolibarr_main_data_root;
@@ -228,6 +229,7 @@ class CSMSFile
* @param int $result Result of sms sending
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_sms_result($result)
{
global $conf,$dolibarr_main_data_root;
@@ -245,4 +247,3 @@ class CSMSFile
}
}
}
-
diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php
index 34d797ec891..e1a50c63083 100644
--- a/htdocs/core/class/antivir.class.php
+++ b/htdocs/core/class/antivir.class.php
@@ -65,6 +65,7 @@ class AntiVir
* @param string $file File to scan
* @return int <0 if KO (-98 if error, -99 if virus), 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dol_avscan_file($file)
{
global $conf;
@@ -180,4 +181,3 @@ class AntiVir
return $ret;
}
}
-
diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php
index 616136e4912..c65b2ba6fe1 100644
--- a/htdocs/core/class/canvas.class.php
+++ b/htdocs/core/class/canvas.class.php
@@ -141,6 +141,7 @@ class Canvas
* @param string $ref Object ref (if id not provided)
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action='view', $id=0, $ref='')
{
if (method_exists($this->control,'assign_values')) $this->control->assign_values($action, $id, $ref);
@@ -167,6 +168,7 @@ class Canvas
* @param string $action Action code
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function display_canvas($action)
{
global $db, $conf, $langs, $user, $canvas;
diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php
index b75b4050788..287d260f4d2 100644
--- a/htdocs/core/class/comment.class.php
+++ b/htdocs/core/class/comment.class.php
@@ -362,4 +362,4 @@ class Comment extends CommonObject
return count($this->comments);
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index c0ac94461e0..5a1bcd8440d 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -55,6 +55,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_user($user,$outputlangs)
{
global $conf;
@@ -91,6 +92,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_mysoc($mysoc,$outputlangs)
{
global $conf;
@@ -149,6 +151,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_thirdparty($object,$outputlangs)
{
global $conf;
@@ -229,6 +232,7 @@ abstract class CommonDocGenerator
* @param array_key $array_key Name of the key for return array
* @return array of substitution key->code
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object')
{
global $conf;
@@ -299,6 +303,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Language object for output
* @return array Array of substitution key->code
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_other($outputlangs)
{
global $conf;
@@ -337,6 +342,7 @@ abstract class CommonDocGenerator
* @param string $array_key Name of the key for return array
* @return array Array of substitution
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_object($object,$outputlangs,$array_key='object')
{
global $conf;
@@ -482,6 +488,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_lines($line,$outputlangs)
{
global $conf;
@@ -560,6 +567,7 @@ abstract class CommonDocGenerator
* @param array_key $array_key Name of the key for return array
* @return array Array of substitution
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_shipment($object,$outputlangs,$array_key='object')
{
global $conf;
@@ -614,16 +622,17 @@ abstract class CommonDocGenerator
/**
- * Define array with couple substitution key => substitution value
+ * Define array with couple substitution key => substitution value
*
* @param ExpeditionLigne $line Object line
* @param Translate $outputlangs Lang object to use for output
* @return array Substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_shipment_lines($line, $outputlangs)
{
global $conf;
- dol_include_once('/core/lib/product.lib.php');
+ dol_include_once('/core/lib/product.lib.php');
$resarray = array(
'line_fulldesc'=>doc_getlinedesc($line,$outputlangs),
@@ -645,7 +654,7 @@ abstract class CommonDocGenerator
'line_volume'=>empty($line->volume) ? '' : $line->volume*$line->qty_shipped.' '.measuring_units_string($line->volume_units, 'volume'),
);
- // Retrieve extrafields
+ // Retrieve extrafields
$extrafieldkey = $line->element;
$array_key = "line";
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
@@ -667,6 +676,7 @@ abstract class CommonDocGenerator
* @param boolean $recursive Want to fetch child array or child object
* @return array Array of substitution key->code
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true)
{
$array_other = array();
@@ -696,6 +706,7 @@ abstract class CommonDocGenerator
* @param Translate $outputlangs Lang object to use for output
* @return array Substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fill_substitutionarray_with_extrafields($object,$array_to_fill,$extrafields,$array_key,$outputlangs)
{
global $conf;
diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php
index 9bab103d2e4..54d9aed45e9 100644
--- a/htdocs/core/class/commoninvoice.class.php
+++ b/htdocs/core/class/commoninvoice.class.php
@@ -337,6 +337,7 @@ abstract class CommonInvoice extends CommonObject
*
* @return int <=0 if no, >0 if yes
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_erasable()
{
global $conf;
@@ -459,6 +460,7 @@ abstract class CommonInvoice extends CommonObject
* @param int $type Type invoice
* @return string Label of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0)
{
global $langs;
@@ -585,8 +587,9 @@ abstract class CommonInvoice extends CommonObject
* conditions de reglements de la facture et date de facturation
*
* @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
+ * @return date Date limite de reglement si ok, <0 si ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function calculate_date_lim_reglement($cond_reglement=0)
{
if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code;
@@ -776,4 +779,3 @@ abstract class CommonInvoiceLine extends CommonObjectLine
$this->db = $db;
}
}
-
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 16033e0c7e4..a00f91ac5bc 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -722,6 +722,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger=0)
{
global $user,$langs;
@@ -842,6 +843,7 @@ abstract class CommonObject
* @param string $source Nature of contact ('internal' or 'external')
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function copy_linked_contact($objFrom, $source='internal')
{
$contacts = $objFrom->liste_contact(-1, $source);
@@ -865,6 +867,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0)
{
// Insert into database
@@ -892,6 +895,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_contact($rowid, $notrigger=0)
{
global $user;
@@ -929,6 +933,7 @@ abstract class CommonObject
* @param string $code Type of contact (code or id)
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_linked_contact($source='',$code='')
{
$temp = array();
@@ -966,6 +971,7 @@ abstract class CommonObject
* @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...)
* @return array Array of contacts
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_contact($statut=-1,$source='external',$list=0,$code='')
{
global $langs;
@@ -1074,6 +1080,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)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_type_contact($source='internal', $order='position', $option=0, $activeonly=0, $code='')
{
global $langs;
@@ -1183,6 +1190,7 @@ abstract class CommonObject
* @param int $contactid Id du contact. Use this->contactid if empty.
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_contact($contactid=null)
{
if (empty($contactid)) $contactid=$this->contactid;
@@ -1202,6 +1210,7 @@ abstract class CommonObject
* @param int $force_thirdparty_id Force thirdparty id
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_thirdparty($force_thirdparty_id=0)
{
global $conf;
@@ -1264,6 +1273,7 @@ abstract class CommonObject
*
* @return int <0 if KO, 0 if can't guess type of barcode (ISBN, EAN13...), >0 if OK (all barcode properties loaded)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_barcode()
{
global $conf;
@@ -1311,6 +1321,7 @@ abstract class CommonObject
*
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_projet()
{
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
@@ -1331,6 +1342,7 @@ abstract class CommonObject
*
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_product()
{
include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
@@ -1350,6 +1362,7 @@ abstract class CommonObject
* @param int $userid Id du contact
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_user($userid)
{
$user = new User($this->db);
@@ -1363,6 +1376,7 @@ abstract class CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_origin()
{
if ($this->origin == 'shipping') $this->origin = 'expedition';
@@ -1532,6 +1546,7 @@ abstract class CommonObject
* @param int $nodbprefix Do not include DB prefix to forge table name
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_previous_next_ref($filter, $fieldid, $nodbprefix=0)
{
global $conf, $user;
@@ -2167,6 +2182,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_order($renum=false, $rowidorder='ASC', $fk_parent_line=true)
{
if (! $this->table_element_line)
@@ -2284,6 +2300,7 @@ abstract class CommonObject
* @param boolean $fk_parent_line Table with fk_parent_line field or not
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_up($rowid, $fk_parent_line=true)
{
$this->line_order(false, 'ASC', $fk_parent_line);
@@ -2302,6 +2319,7 @@ abstract class CommonObject
* @param boolean $fk_parent_line Table with fk_parent_line field or not
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_down($rowid, $fk_parent_line=true)
{
$this->line_order(false, 'ASC', $fk_parent_line);
@@ -2344,6 +2362,7 @@ abstract class CommonObject
* @param array $rows Array of rows
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_ajaxorder($rows)
{
$num = count($rows);
@@ -2459,6 +2478,7 @@ abstract class CommonObject
* @param int $fk_parent_line Parent line id
* @return int Max value of rang in table of lines
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function line_max($fk_parent_line=0)
{
// Search the last rang with fk_parent_line
@@ -2505,6 +2525,7 @@ abstract class CommonObject
* @param string $ref_ext Update field ref_ext
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_ref_ext($ref_ext)
{
if (! $this->table_element)
@@ -2537,7 +2558,8 @@ abstract class CommonObject
* @param string $suffix '', '_public' or '_private'
* @return int <0 if KO, >0 if OK
*/
- function update_note($note,$suffix='')
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function update_note($note, $suffix='')
{
global $user;
@@ -2589,6 +2611,7 @@ abstract class CommonObject
* @deprecated
* @see update_note()
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_note_public($note)
{
return $this->update_note($note,'_public');
@@ -2604,6 +2627,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller=null)
{
global $conf, $hookmanager, $action;
@@ -2840,6 +2864,7 @@ abstract class CommonObject
* @return int <=0 if KO, >0 if OK
* @see fetchObjectLinked, updateObjectLinked, deleteObjectLinked
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_object_linked($origin=null, $origin_id=null)
{
$origin = (! empty($origin) ? $origin : $this->origin);
@@ -3598,6 +3623,7 @@ abstract class CommonObject
*
* @return string incoterms info
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function display_incoterms()
{
$out = '';
@@ -4209,6 +4235,7 @@ abstract class CommonObject
* @param int $mandatory Mandatory or not
* @return int <=0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_element_resource($resource_id, $resource_type, $busy=0, $mandatory=0)
{
$this->db->begin();
@@ -4251,6 +4278,7 @@ abstract class CommonObject
* @param int $notrigger Disable all triggers
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_resource($rowid, $element, $notrigger=0)
{
global $user;
@@ -4635,6 +4663,7 @@ abstract class CommonObject
* @param User $user Object user
* @return int Result of run_triggers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function call_trigger($trigger_name, $user)
{
global $langs,$conf;
@@ -4669,6 +4698,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_optionals($rowid=null, $optionsArray=null)
{
if (empty($rowid)) $rowid=$this->id;
@@ -6120,7 +6150,7 @@ abstract class CommonObject
*
* @param Extrafields $extrafields Extrafield Object
* @param string $mode Show output (view) or input (edit) for extrafield
- * @param array $params Optional parameters
+ * @param array $params Optional parameters. Example: array('style'=>'class="oddeven"', 'colspan'=>$colspan)
* @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names)
* @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names)
* @param string $onetrtd All fields in same tr td
@@ -6449,6 +6479,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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)
{
global $conf,$user,$langs;
diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php
index e20c023eef3..26227048782 100644
--- a/htdocs/core/class/commonstickergenerator.class.php
+++ b/htdocs/core/class/commonstickergenerator.class.php
@@ -62,7 +62,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php';
abstract class CommonStickerGenerator
{
- public $code; // Code of format
+ public $code; // Code of format
public $format; // Array with informations
// protected
@@ -103,6 +103,7 @@ abstract class CommonStickerGenerator
* @param string $outputdir Output directory for pdf file
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
abstract function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='');
/**
@@ -123,6 +124,7 @@ abstract class CommonStickerGenerator
* @param int $pt point
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Set_Char_Size(&$pdf,$pt)
{
if ($pt > 3) {
@@ -144,6 +146,7 @@ abstract class CommonStickerGenerator
* @param int $nbPointilles Nb pointilles
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Pointille(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$nbPointilles=15)
{
$pdf->SetLineWidth($epaisseur);
@@ -185,6 +188,7 @@ abstract class CommonStickerGenerator
* @param int $taille Size
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Croix(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=4)
{
$pdf->SetDrawColor(192,192,192);
@@ -216,6 +220,7 @@ abstract class CommonStickerGenerator
* @param string $dest to
* @return float value value after conversion
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Convert_Metric($value, $src, $dest)
{
if ($src != $dest) {
@@ -233,6 +238,7 @@ abstract class CommonStickerGenerator
* @param int $pt Point
* @return int Height chars
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Get_Height_Chars($pt)
{
// Tableau de concordance entre la hauteur des caracteres et de l'espacement entre les lignes
@@ -251,19 +257,20 @@ abstract class CommonStickerGenerator
* @param string $format Format
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _Set_Format(&$pdf, $format)
{
- $this->_Metric = $format['metric'];
- $this->_Avery_Name = $format['name'];
- $this->_Avery_Code = $format['code'];
+ $this->_Metric = $format['metric'];
+ $this->_Avery_Name = $format['name'];
+ $this->_Avery_Code = $format['code'];
$this->_Margin_Left = $this->_Convert_Metric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
- $this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
- $this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
- $this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
- $this->_X_Number = $format['NX'];
- $this->_Y_Number = $format['NY'];
- $this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc);
- $this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc);
+ $this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
+ $this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
+ $this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc);
+ $this->_X_Number = $format['NX'];
+ $this->_Y_Number = $format['NY'];
+ $this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc);
+ $this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc);
$this->Set_Char_Size($pdf, $format['font-size']);
}
}
diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php
index 5993729b7ac..7ed51a5ed7c 100644
--- a/htdocs/core/class/discount.class.php
+++ b/htdocs/core/class/discount.class.php
@@ -362,6 +362,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function link_to_invoice($rowidline,$rowidinvoice)
{
// Check parameters
@@ -413,6 +414,7 @@ class DiscountAbsolute
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function unlink_invoice()
{
$sql ="UPDATE ".MAIN_DB_PREFIX."societe_remise_except";
diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php
index 18461beeca3..52d9b47ecdf 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -148,6 +148,7 @@ class DolEditor
* @param string $option For ACE editor, set the source language ('html', 'php', 'javascript', ...)
* @return void|string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='')
{
global $conf,$langs;
@@ -345,4 +346,3 @@ class DolEditor
else print $out;
}
}
-
diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php
index 315649f44a6..55ecc77291a 100644
--- a/htdocs/core/class/dolgraph.class.php
+++ b/htdocs/core/class/dolgraph.class.php
@@ -134,6 +134,7 @@ class DolGraph
* @param float $which_prec Precision
* @return boolean
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetPrecisionY($which_prec)
{
$this->PrecisionY = $which_prec;
@@ -146,6 +147,7 @@ class DolGraph
* @param float $xi Xi
* @return boolean True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHorizTickIncrement($xi)
{
$this->horizTickIncrement = $xi;
@@ -158,6 +160,7 @@ class DolGraph
* @param float $xt Xt
* @return boolean True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetNumXTicks($xt)
{
$this->SetNumXTicks = $xt;
@@ -170,6 +173,7 @@ class DolGraph
* @param float $x Label interval
* @return boolean True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetLabelInterval($x)
{
$this->labelInterval = $x;
@@ -182,6 +186,7 @@ class DolGraph
* @param boolean $bool XGrid or not
* @return boolean true
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHideXGrid($bool)
{
$this->hideXGrid = $bool;
@@ -194,6 +199,7 @@ class DolGraph
* @param boolean $bool YGrid or not
* @return boolean true
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHideYGrid($bool)
{
$this->hideYGrid = $bool;
@@ -206,6 +212,7 @@ class DolGraph
* @param string $label Y label
* @return boolean|null True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetYLabel($label)
{
$this->YLabel = $label;
@@ -217,6 +224,7 @@ class DolGraph
* @param int $w Width
* @return boolean|null True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetWidth($w)
{
$this->width = $w;
@@ -228,6 +236,7 @@ class DolGraph
* @param string $title Title
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetTitle($title)
{
$this->title = $title;
@@ -240,6 +249,7 @@ class DolGraph
* @return void
* @see draw_jflot for syntax of data array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetData($data)
{
$this->data = $data;
@@ -251,6 +261,7 @@ class DolGraph
* @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...)
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetDataColor($datacolor)
{
$this->datacolor = $datacolor;
@@ -262,6 +273,7 @@ class DolGraph
* @param array $type Array with type for each serie. Example: array('pie'), array('lines',...,'bars')
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetType($type)
{
$this->type = $type;
@@ -273,6 +285,7 @@ class DolGraph
* @param array $legend Legend. Example: array('seriename1','seriname2',...)
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetLegend($legend)
{
$this->Legend = $legend;
@@ -284,6 +297,7 @@ class DolGraph
* @param int $legendwidthmin Min width
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetLegendWidthMin($legendwidthmin)
{
$this->LegendWidthMin = $legendwidthmin;
@@ -295,6 +309,7 @@ class DolGraph
* @param int $max Max value
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetMaxValue($max)
{
$this->MaxValue = $max;
@@ -305,6 +320,7 @@ class DolGraph
*
* @return int Max value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMaxValue()
{
return $this->MaxValue;
@@ -316,6 +332,7 @@ class DolGraph
* @param int $min Min value
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetMinValue($min)
{
$this->MinValue = $min;
@@ -326,6 +343,7 @@ class DolGraph
*
* @return int Max value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMinValue()
{
return $this->MinValue;
@@ -337,6 +355,7 @@ class DolGraph
* @param int $h Height
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHeight($h)
{
$this->height = $h;
@@ -348,6 +367,7 @@ class DolGraph
* @param string $s Shading
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetShading($s)
{
$this->SetShading = $s;
@@ -359,6 +379,7 @@ class DolGraph
* @param string $s Shading
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetCssPrefix($s)
{
$this->cssprefix = $s;
@@ -369,6 +390,7 @@ class DolGraph
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetBgColor()
{
unset($this->bgcolor);
@@ -379,6 +401,7 @@ class DolGraph
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetBgColorGrid()
{
unset($this->bgcolorgrid);
@@ -435,6 +458,7 @@ class DolGraph
* @param array $bg_color array(R,G,B) ou 'onglet' ou 'default'
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetBgColor($bg_color = array(255,255,255))
{
global $theme_bgcolor,$theme_bgcoloronglet;
@@ -463,6 +487,7 @@ class DolGraph
* @param array $bg_colorgrid array(R,G,B) ou 'onglet' ou 'default'
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetBgColorGrid($bg_colorgrid = array(255,255,255))
{
global $theme_bgcolor,$theme_bgcoloronglet;
@@ -490,6 +515,7 @@ class DolGraph
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetDataColor()
{
unset($this->datacolor);
@@ -500,6 +526,7 @@ class DolGraph
*
* @return int Max value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMaxValueInData()
{
$k = 0;
@@ -525,6 +552,7 @@ class DolGraph
*
* @return int Min value of all data
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMinValueInData()
{
$k = 0;
@@ -550,6 +578,7 @@ class DolGraph
*
* @return int Max value of all data
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetCeilMaxValue()
{
$max = $this->GetMaxValueInData();
@@ -573,6 +602,7 @@ class DolGraph
*
* @return double Max value of all data
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetFloorMinValue()
{
$min = $this->GetMinValueInData();
@@ -629,6 +659,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function draw_artichow($file,$fileurl)
{
global $artichow_defaultfont;
@@ -817,6 +848,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk. Never used here.
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function draw_jflot($file,$fileurl)
{
global $artichow_defaultfont;
@@ -1098,4 +1130,3 @@ class DolGraph
return 0;
}
}
-
diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php
index 57f2e42922c..a00da884aba 100644
--- a/htdocs/core/class/dolreceiptprinter.class.php
+++ b/htdocs/core/class/dolreceiptprinter.class.php
@@ -359,6 +359,7 @@ class dolReceiptPrinter extends Escpos
* @param string $parameter Printer parameter
* @return int 0 if OK; >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function AddPrinter($name, $type, $profile, $parameter)
{
global $conf;
@@ -384,6 +385,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id
* @return int 0 if OK; >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function UpdatePrinter($name, $type, $profile, $parameter, $printerid)
{
global $conf;
@@ -408,6 +410,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id
* @return int 0 if OK; >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DeletePrinter($printerid)
{
global $conf;
@@ -430,6 +433,7 @@ class dolReceiptPrinter extends Escpos
* @param int $templateid Template id
* @return int 0 if OK; >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function UpdateTemplate($name, $template, $templateid)
{
global $conf;
@@ -453,6 +457,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id
* @return int 0 if OK; >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SendTestToPrinter($printerid)
{
global $conf;
@@ -489,6 +494,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id
* @return int 0 if OK; >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SendToPrinter($object, $templateid, $printerid)
{
global $conf;
@@ -650,6 +656,7 @@ class dolReceiptPrinter extends Escpos
* @param int $printerid Printer id
* @return int 0 if OK; >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function InitPrinter($printerid)
{
global $conf;
diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php
index 610925ccc8f..94c9488a085 100644
--- a/htdocs/core/class/emailsenderprofile.class.php
+++ b/htdocs/core/class/emailsenderprofile.class.php
@@ -322,6 +322,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($status,$mode=0)
{
global $langs;
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 06a096337ba..d7b16293a11 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -316,6 +316,7 @@ class ExtraFields
* @param string $enabled Condition to have the field enabled or not
* @return int <=0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
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')
{
global $conf,$user;
@@ -469,6 +470,7 @@ class ExtraFields
* @param string $elementtype Element type ('member', 'product', 'thirdparty', ...)
* @return int < 0 if KO, 0 if nothing is done, 1 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function delete_label($attrname, $elementtype='member')
{
global $conf;
@@ -634,6 +636,7 @@ class ExtraFields
* @param int $totalizable Is extrafield totalizable on list
* @return int <=0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
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)
{
global $conf, $user;
@@ -752,6 +755,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.
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_name_optionals_label($elementtype,$forceload=false)
{
global $conf;
diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php
index ad8c98d43c8..9d8a045ba62 100644
--- a/htdocs/core/class/fiscalyear.class.php
+++ b/htdocs/core/class/fiscalyear.class.php
@@ -262,6 +262,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
diff --git a/htdocs/core/class/genericobject.class.php b/htdocs/core/class/genericobject.class.php
index 41d57731c34..993d884c88b 100644
--- a/htdocs/core/class/genericobject.class.php
+++ b/htdocs/core/class/genericobject.class.php
@@ -24,19 +24,18 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
/**
- * Class of a generic business object
+ * Class of a generic business object
*/
class GenericObject extends CommonObject
{
- /**
- * Constructor
- *
- * @param DoliDB $db Database handler
- */
- function __construct($db)
- {
- $this->db=$db;
- }
+ /**
+ * Constructor
+ *
+ * @param DoliDB $db Database handler
+ */
+ function __construct($db)
+ {
+ $this->db=$db;
+ }
}
-
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 17ff8fdb5a1..0419e2cfc68 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -666,6 +666,7 @@ class Form
* @param int $disablefavorites Disable favorites
* @return string HTML string with select
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0)
{
global $conf,$langs;
@@ -761,6 +762,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
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array())
{
global $conf,$langs;
@@ -852,6 +854,7 @@ class Form
* @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, -1=Force none (and set hidden field to 'service')
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0)
{
global $db,$langs,$user,$conf;
@@ -901,6 +904,7 @@ class Form
*
* @return int Nb of lines loaded, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_types_fees()
{
global $langs;
@@ -951,6 +955,7 @@ class Form
* @param int $showempty Add an empty field
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_fees($selected='',$htmlname='type',$showempty=0)
{
global $user, $langs;
@@ -993,6 +998,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)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0)
{
return $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0, $limit);
@@ -1017,6 +1023,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.
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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)
{
global $conf,$user,$langs;
@@ -1079,6 +1086,7 @@ class Form
* @param bool $multiple add [] in the name of element and add 'multiple' attribut
* @return string HTML string with
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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)
{
global $conf,$user,$langs;
@@ -1250,6 +1258,7 @@ class Form
* @param int $maxvalue Max value for lines that can be selected
* @return int Return number of qualifed lines in list
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0)
{
global $langs,$conf;
@@ -1335,6 +1344,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)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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='')
{
print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid);
@@ -1489,6 +1499,7 @@ class Form
* @deprecated Use select_dolusers instead
* @see select_dolusers()
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0')
{
print $this->select_dolusers($selected,$htmlname,$show_empty,$exclude,$disabled,$include,$enableonly,$force_entity);
@@ -1517,6 +1528,7 @@ class Form
* @return string HTML select string
* @see select_dolgroups
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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)
{
global $conf,$user,$langs;
@@ -1723,6 +1735,7 @@ class Form
* @return string HTML select string
* @see select_dolgroups
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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())
{
global $conf, $user, $langs;
@@ -1814,6 +1827,7 @@ class Form
* @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...])
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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())
{
global $langs,$conf;
@@ -1954,6 +1968,7 @@ class Form
* 'warehouseinternal' = select products from warehouses for internal correct/transfer only
* @return array Array of keys for json
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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='')
{
global $langs,$conf,$user,$db;
@@ -2430,6 +2445,7 @@ class Form
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0)
{
global $langs,$conf;
@@ -2473,6 +2489,7 @@ class Form
* @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices
* @return array Array of keys for json
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0)
{
global $langs,$conf,$db;
@@ -2695,6 +2712,7 @@ class Form
* @param int $selected_supplier Pre-selected supplier if more than 1 result
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='')
{
global $langs,$conf;
@@ -2807,6 +2825,7 @@ class Form
* @param int $showempty Add an empty field
* @return integer|null
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_address($selected, $socid, $htmlname='address_id',$showempty=0)
{
// On recherche les utilisateurs
@@ -2855,6 +2874,7 @@ class Form
*
* @return int Nb of lines loaded, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_conditions_paiements()
{
global $langs;
@@ -2902,6 +2922,7 @@ class Form
*
* @return int Nb of lines loaded, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_availability()
{
global $langs;
@@ -3068,6 +3089,7 @@ class Form
*
* @return int Nb of lines loaded, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_types_paiements()
{
global $langs;
@@ -3128,6 +3150,7 @@ class Form
* @param string $morecss Add more CSS on select tag
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='')
{
global $langs, $user, $conf;
@@ -3173,6 +3196,7 @@ class Form
* @param string $morecss Add more CSS on select tag
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='')
{
global $langs,$user;
@@ -3446,6 +3470,7 @@ class Form
* @param int $showcurrency Show currency in label
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0)
{
global $langs, $conf;
@@ -3549,6 +3574,7 @@ class Form
* @return string
* @see select_categories
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0)
{
global $conf, $langs;
@@ -3638,6 +3664,7 @@ class Form
* @deprecated
* @see formconfirm()
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500)
{
print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width);
@@ -3946,6 +3973,7 @@ class Form
* @param int $nooutput No print is done. String is returned.
* @return string Return html content
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0)
{
global $langs;
@@ -4000,6 +4028,7 @@ class Form
* @param int $addempty Add empty entry
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0)
{
global $langs;
@@ -4033,6 +4062,7 @@ class Form
* @param int $addempty Ajoute entree vide
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_availability($page, $selected='', $htmlname='availability', $addempty=0)
{
global $langs;
@@ -4110,6 +4140,7 @@ class Form
* @return string
* @see select_date
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
{
global $langs;
@@ -4149,6 +4180,7 @@ class Form
* @param array $include List of users id to include
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='')
{
global $langs;
@@ -4187,6 +4219,7 @@ class Form
* @param int $active Active or not, -1 = all
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1)
{
global $langs;
@@ -4219,6 +4252,7 @@ class Form
* @param string $htmlname Name of select html field
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code')
{
global $langs;
@@ -4247,6 +4281,7 @@ class Form
* @param string $currency Currency code to explain the rate
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='')
{
global $langs, $mysoc, $conf;
@@ -4294,6 +4329,7 @@ class Form
* @param int $discount_type 0 => customer discount, 1 => supplier discount
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0)
{
global $conf,$langs;
@@ -4383,6 +4419,7 @@ class Form
* @param string $htmlname Name of HTML select. If 'none', we just show contact link.
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_contacts($page, $societe, $selected='', $htmlname='contactid')
{
global $langs, $conf;
@@ -4431,6 +4468,7 @@ class Form
* @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array())
{
global $langs;
@@ -4467,6 +4505,7 @@ class Form
* @param string $htmlname name of HTML select list
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_currency($selected='',$htmlname='currency_id')
{
print $this->selectCurrency($selected,$htmlname);
@@ -4577,6 +4616,7 @@ class Form
* @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'")
* @return int Nb of loaded lines, 0 if already loaded, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_vatrates($country_code)
{
global $langs;
@@ -4657,6 +4697,7 @@ class Form
* @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0)
{
global $langs,$conf,$mysoc;
@@ -4846,6 +4887,7 @@ class Form
* @return string|null Nothing or string if nooutput is 1
* @see form_date, select_month, select_year, select_dayofweek
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
{
global $conf,$langs;
@@ -5212,6 +5254,7 @@ class Form
* @param int $nooutput Do not output html string but return it
* @return string|null
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0)
{
global $langs;
@@ -6406,6 +6449,7 @@ class Form
* @param int $useempty Affiche valeur vide dans liste
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0)
{
@@ -6786,6 +6830,7 @@ class Form
* @return string
* @see select_dolusers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false)
{
global $conf,$user,$langs;
@@ -7114,4 +7159,3 @@ class Form
return $out;
}
}
-
diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php
index 8a0073e0351..64e33cd5023 100644
--- a/htdocs/core/class/html.formaccounting.class.php
+++ b/htdocs/core/class/html.formaccounting.class.php
@@ -69,6 +69,7 @@ class FormAccounting extends Form
* @param int $disabledajaxcombo Disable ajax combo box.
* @return string String with HTML select
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_journal($selectid, $htmlname = 'journal', $nature=0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='', $disabledajaxcombo=0)
{
global $conf,$langs;
@@ -148,6 +149,7 @@ class FormAccounting extends Form
* @param int $allcountries All countries
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0)
{
global $db,$langs,$user,$mysoc;
@@ -223,6 +225,7 @@ class FormAccounting extends Form
* @param string $selectedkey Value
* @return string HTML edit field
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '')
{
$options = array();
@@ -260,6 +263,7 @@ class FormAccounting extends Form
* @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache.
* @return string String with HTML select
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='')
{
global $conf, $langs;
@@ -347,6 +351,7 @@ class FormAccounting extends Form
* @param string $morecss More css
* @return string String with HTML select
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200')
{
@@ -407,6 +412,7 @@ class FormAccounting extends Form
* @param string $output_format (html/opton (for option html only)/array (to return options arrays
* @return string/array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function selectyear_accountancy_bookkepping($selected = '', $htmlname = 'yearid', $useempty = 0, $output_format = 'html')
{
global $conf;
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index e4702c52c8c..7fc07ab46ed 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -64,6 +64,7 @@ class FormActions
* @param string $morecss More css on select field
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_select_status_action($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100')
{
global $langs,$conf;
@@ -325,6 +326,7 @@ class FormActions
* @param int $nooutput 1=No output
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_actions($selected='', $htmlname='actioncode', $excludetype='', $onlyautoornot=0, $hideinfohelp=0, $multiselect=0, $nooutput=0)
{
global $langs,$user,$form,$conf;
diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php
index 16d59197c24..fd9bc3ab3f9 100644
--- a/htdocs/core/class/html.formadmin.class.php
+++ b/htdocs/core/class/html.formadmin.class.php
@@ -65,7 +65,8 @@ class FormAdmin
* @param int $showcode Add language code into label
* @param int $forcecombo Force to use combo box (so no ajax beautify effect)
* @return string Return HTML select string with list of languages
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0, $forcecombo=0)
{
global $langs;
@@ -135,6 +136,7 @@ class FormAdmin
* @param string $moreattrib More attributes on html select tag
* @return integer|null
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib='')
{
global $langs,$conf;
@@ -223,6 +225,7 @@ class FormAdmin
* @param string[] $dirmenuarray Directories to scan
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_menu_families($selected, $htmlname, $dirmenuarray)
{
global $langs,$conf;
@@ -293,6 +296,7 @@ class FormAdmin
* @param string $htmlname Nom de la zone select
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_timezone($selected,$htmlname)
{
global $langs,$conf;
@@ -339,14 +343,15 @@ class FormAdmin
/**
- * Return html select list with available languages (key='en_US', value='United States' for example)
+ * Return html select list with available languages (key='en_US', value='United States' for example)
*
- * @param string $selected Paper format pre-selected
- * @param string $htmlname Name of HTML select field
- * @param string $filter Value to filter on code
- * @param int $showempty Add empty value
- * @return string Return HTML output
+ * @param string $selected Paper format pre-selected
+ * @param string $htmlname Name of HTML select field
+ * @param string $filter Value to filter on code
+ * @param int $showempty Add empty value
+ * @return string Return HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_paper_format($selected='',$htmlname='paperformat_id',$filter=0,$showempty=0)
{
global $langs;
diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php
index 206569c192d..6780f01735a 100644
--- a/htdocs/core/class/html.formbarcode.class.php
+++ b/htdocs/core/class/html.formbarcode.class.php
@@ -111,6 +111,7 @@ class FormBarCode
* @param int $useempty Affiche valeur vide dans liste
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_barcode_type($selected='',$htmlname='barcodetype_id',$useempty=0)
{
global $langs,$conf;
@@ -170,6 +171,7 @@ class FormBarCode
* @param string $htmlname Nom du formulaire select
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_barcode_type($page, $selected='', $htmlname='barcodetype_id')
{
global $langs,$conf;
@@ -187,4 +189,3 @@ class FormBarCode
}
}
}
-
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index 8c965207b62..8d64a01eb65 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -41,7 +41,6 @@ class FormCompany
*/
public $error='';
-
/**
* Constructor
*
@@ -62,6 +61,7 @@ class FormCompany
* @param string $filter Add a SQL filter to select
* @return array Array of types
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function typent_array($mode=0, $filter='')
{
global $langs,$mysoc;
@@ -103,6 +103,7 @@ class FormCompany
* @param string $filter Add a SQL filter to select
* @return array Array of types d'effectifs
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function effectif_array($mode=0, $filter='')
{
$effs = array();
@@ -143,6 +144,7 @@ class FormCompany
* @param int $empty Add empty value in list
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0)
{
global $user, $langs;
@@ -195,6 +197,7 @@ class FormCompany
* @param string $htmlname Id of department
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_departement($selected='',$country_codeid=0, $htmlname='state_id')
{
print $this->select_state($selected,$country_codeid, $htmlname);
@@ -213,6 +216,7 @@ class FormCompany
* @return string String with HTML select
* @see select_country
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_state($selected='',$country_codeid=0, $htmlname='state_id')
{
global $conf,$langs,$user;
@@ -324,6 +328,7 @@ class FormCompany
* @param string $htmlname Name of HTML select field
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_region($selected='',$htmlname='region_id')
{
global $conf,$langs;
@@ -388,6 +393,7 @@ class FormCompany
* @param string $morecss Add more css on SELECT element
* @return string String with HTML select
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_civility($selected='',$htmlname='civility_id',$morecss='maxwidth100')
{
global $conf,$langs,$user;
@@ -447,6 +453,7 @@ class FormCompany
* @deprecated Use print xxx->select_juridicalstatus instead
* @see select_juridicalstatus()
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_forme_juridique($selected='', $country_codeid=0, $filter='')
{
print $this->select_juridicalstatus($selected, $country_codeid, $filter);
@@ -462,6 +469,7 @@ class FormCompany
* @param string $htmlname HTML name of select
* @return string String with HTML select
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_juridicalstatus($selected='', $country_codeid=0, $filter='', $htmlname='forme_juridique_code')
{
global $conf,$langs,$user;
@@ -758,6 +766,7 @@ class FormCompany
* @param string $morecss More css
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='',$morecss='')
{
global $conf;
@@ -787,6 +796,7 @@ class FormCompany
* @param string $morecss More css
* @return string HTML string with prof id
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_input_id_prof($idprof,$htmlname,$preselected,$country_code,$morecss='maxwidth100onsmartphone quatrevingtpercent')
{
global $conf,$langs;
@@ -835,6 +845,7 @@ class FormCompany
* @param string $htmlname HTML select name
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_localtax($local, $selected, $htmlname)
{
$tax=get_localtax_by_third($local);
@@ -868,4 +879,3 @@ class FormCompany
}
}
}
-
diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php
index c4710e033cc..474a7125a9d 100644
--- a/htdocs/core/class/html.formcontract.class.php
+++ b/htdocs/core/class/html.formcontract.class.php
@@ -31,7 +31,7 @@ class FormContract
* @var DoliDB Database handler.
*/
public $db;
-
+
/**
* @var string Error code (or message)
*/
@@ -59,6 +59,7 @@ class FormContract
* @param int $showempty Show empty line
* @return int Nbr of project if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
{
global $db,$user,$conf,$langs;
@@ -173,11 +174,11 @@ class FormContract
* @param string $htmlname Nom de la zone html
* @param int $maxlength Maximum length of label
* @param int $showempty Show empty line
- * @return int Nbr of project if OK, <0 if KO
+ * @return int Nbr of project if OK, <0 if KO
*/
function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
{
- global $langs;
+ global $langs;
print "\n";
print '';
- }
+ }
}
diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php
index 92cbcc52334..fdb56e94e21 100644
--- a/htdocs/core/class/html.formcron.class.php
+++ b/htdocs/core/class/html.formcron.class.php
@@ -58,6 +58,7 @@ class FormCron extends Form
* @param integer $readonly Select is read only or not
* @return string HTML select field
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_typejob($htmlname,$selected=0,$readonly=0)
{
global $langs;
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index bdbc8805218..003235f57c9 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -77,6 +77,7 @@ class FormFile
* @param string $sectiondir If upload must be done inside a particular directory (is sectiondir defined, sectionid must not be)
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1, $htmlname='formuserfile', $accept='', $sectiondir='')
{
global $conf,$langs, $hookmanager;
@@ -252,6 +253,7 @@ class FormFile
* @return int <0 if KO, number of shown files if OK
* @deprecated Use print xxx->showdocuments() instead.
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='')
{
$this->numoffiles=0;
@@ -1008,6 +1010,7 @@ class FormFile
* @return int <0 if KO, nb of files shown if OK
* @see list_of_autoecmfiles
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0)
{
global $user, $conf, $langs, $hookmanager;
@@ -1394,6 +1397,7 @@ class FormFile
* @return int <0 if KO, nb of files shown if OK
* @see list_of_documents
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0)
{
global $user, $conf, $langs, $form;
@@ -1830,4 +1834,3 @@ class FormFile
return $out;
}
}
-
diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php
index 62950626e2d..3d5f2c9b640 100644
--- a/htdocs/core/class/html.formintervention.class.php
+++ b/htdocs/core/class/html.formintervention.class.php
@@ -59,6 +59,7 @@ class FormIntervention
* @param int $showempty Show empty line
* @return int Nbre of project if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1)
{
global $db,$user,$conf,$langs;
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index ac7968cbd52..17a8ec17939 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -141,6 +141,7 @@ class FormMail extends Form
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function clear_attached_files()
{
global $conf,$user;
@@ -165,6 +166,7 @@ class FormMail extends Form
* @param string $type Mime type (can be dol_mimetype($file))
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_attached_files($path, $file='', $type='')
{
$listofpaths=array();
@@ -195,6 +197,7 @@ class FormMail extends Form
* @param string $keytodelete Key in file array (0, 1, 2, ...)
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function remove_attached_files($keytodelete)
{
$listofpaths=array();
@@ -222,6 +225,7 @@ class FormMail extends Form
*
* @return array array('paths'=> ,'names'=>, 'mimes'=> )
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_attached_files()
{
$listofpaths=array();
@@ -244,6 +248,7 @@ class FormMail extends Form
* @param string $removefileaction Name of action when removing file attachments
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function show_form($addfileaction='addfile',$removefileaction='removefile')
{
print $this->get_form($addfileaction,$removefileaction);
@@ -259,6 +264,7 @@ class FormMail extends Form
* @param string $removefileaction Name of action when removing file attachments
* @return string Form to show
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_form($addfileaction='addfile', $removefileaction='removefile')
{
global $conf, $langs, $user, $hookmanager, $form;
diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index 0c11a378a18..9a4bdc46b75 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -68,7 +68,8 @@ class FormOther
* @param int $fk_user Utilisateur créant le modèle
* @return void
*/
- function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0, $fk_user=null)
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function select_export_model($selected='', $htmlname='exportmodelid', $type='', $useempty=0, $fk_user=null)
{
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."export_model";
@@ -118,7 +119,8 @@ class FormOther
* @param int $useempty Affiche valeur vide dans liste
* @return void
*/
- function select_import_model($selected='',$htmlname='importmodelid',$type='',$useempty=0)
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function select_import_model($selected='', $htmlname='importmodelid', $type='', $useempty=0)
{
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."import_model";
@@ -165,7 +167,8 @@ class FormOther
* @param string $htmlname Name of combo list
* @return integer
*/
- function select_ecotaxes($selected='',$htmlname='ecotaxe_id')
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function select_ecotaxes($selected='', $htmlname='ecotaxe_id')
{
global $langs;
@@ -222,7 +225,8 @@ class FormOther
* @param string $country_code Country Code
* @return string HTML select list
*/
- function select_revenue_stamp($selected='',$htmlname='revenuestamp',$country_code='')
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function select_revenue_stamp($selected='', $htmlname='revenuestamp', $country_code='')
{
global $langs;
@@ -283,6 +287,7 @@ class FormOther
* @param int $showempty Add also an empty line
* @return string HTML select string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_percent($selected=0,$htmlname='percent',$disabled=0,$increment=5,$start=0,$end=100,$showempty=0)
{
$return = '