diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml
index c1136b668c5..375ddd0dcc0 100644
--- a/dev/setup/codesniffer/ruleset.xml
+++ b/dev/setup/codesniffer/ruleset.xml
@@ -346,9 +346,9 @@
0
-
+
0
diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php
index f14a3e7f761..144b7a675f4 100644
--- a/htdocs/accountancy/class/accountancysystem.class.php
+++ b/htdocs/accountancy/class/accountancysystem.class.php
@@ -130,4 +130,4 @@ class AccountancySystem
return $result;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php
index 257c2af0111..eae9b387761 100644
--- a/htdocs/accountancy/class/accountingaccount.class.php
+++ b/htdocs/accountancy/class/accountingaccount.class.php
@@ -494,6 +494,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();
@@ -526,6 +527,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();
@@ -564,6 +566,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 454de6d7b84..8d06684459b 100644
--- a/htdocs/accountancy/class/accountingjournal.class.php
+++ b/htdocs/accountancy/class/accountingjournal.class.php
@@ -252,6 +252,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 f7fed2e2b5b..2caae52dcb8 100644
--- a/htdocs/accountancy/class/bookkeeping.class.php
+++ b/htdocs/accountancy/class/bookkeeping.class.php
@@ -1539,6 +1539,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;
@@ -1695,7 +1696,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;
@@ -1759,6 +1761,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;
@@ -1799,6 +1802,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 f49d1cecb99..57fabdecd17 100644
--- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php
+++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php
@@ -76,6 +76,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;
@@ -231,6 +232,7 @@ abstract class ActionsAdherentCardCommon
*
* @return string HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
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 451f46f899f..415474ef70e 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;
@@ -130,6 +131,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;
@@ -139,4 +141,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 5d7664b13aa..00c41d7a500 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -139,6 +139,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;
@@ -629,6 +630,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();
@@ -983,6 +985,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;
@@ -1013,6 +1016,7 @@ class Adherent extends CommonObject
* @param string $lastname Lastname
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_name($firstname,$lastname)
{
global $conf;
@@ -1186,6 +1190,7 @@ class Adherent extends CommonObject
*
* @return int <0 si KO, >0 si OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_subscriptions()
{
global $langs;
@@ -1736,6 +1741,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;
@@ -1793,6 +1799,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;
@@ -1976,6 +1983,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;
@@ -2065,6 +2073,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;
@@ -2101,6 +2110,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;
@@ -2246,6 +2256,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;
@@ -2262,6 +2273,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 ca8372c04ed..548bfc21c93 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -287,6 +287,7 @@ class AdherentType extends CommonObject
*
* @return array List of types of members
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array()
{
global $conf,$langs;
@@ -422,6 +423,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;
@@ -438,6 +440,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 1c4007780b9..47a3eb66f50 100644
--- a/htdocs/adherents/class/subscription.class.php
+++ b/htdocs/adherents/class/subscription.class.php
@@ -361,6 +361,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 660886c835d..cdbe461edde 100644
--- a/htdocs/admin/dolistore/class/dolistore.class.php
+++ b/htdocs/admin/dolistore/class/dolistore.class.php
@@ -160,6 +160,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');
@@ -206,6 +207,7 @@ class Dolistore
*
* @return string HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_products()
{
global $langs, $conf;
@@ -282,16 +284,19 @@ class Dolistore
return $html;
}
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_previous_link($text = '<<')
{
return ''.$text.'';
}
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_next_link($text = '>>')
{
return ''.$text.'';
}
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_previous_url()
{
$param_array = array();
@@ -309,6 +314,7 @@ class Dolistore
return $this->url."&".$param;
}
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_next_url()
{
$param_array = array();
@@ -326,6 +332,7 @@ class Dolistore
return $this->url."&".$param;
}
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function version_compare($v1, $v2)
{
$v1 = explode('.', $v1);
@@ -355,4 +362,3 @@ class Dolistore
return $ret;
}
}
-
diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php
index 5918b1a5414..6c2f92510dd 100644
--- a/htdocs/api/class/api.class.php
+++ b/htdocs/api/class/api.class.php
@@ -273,6 +273,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/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php
index 4ab05ce675c..f5e9af6f8df 100644
--- a/htdocs/asset/class/asset.class.php
+++ b/htdocs/asset/class/asset.class.php
@@ -336,6 +336,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;
@@ -461,4 +462,4 @@ class Asset extends CommonObject
return 0;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php
index 51ea3a0c799..4f633fb273a 100644
--- a/htdocs/asset/class/asset_type.class.php
+++ b/htdocs/asset/class/asset_type.class.php
@@ -279,6 +279,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/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php
index b1084b01a54..e6fdd1d38a1 100644
--- a/htdocs/blockedlog/class/authority.class.php
+++ b/htdocs/blockedlog/class/authority.class.php
@@ -330,4 +330,4 @@ class BlockedLogAuthority
return 1;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index 0210491fba7..cbe0e6860f8 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -1055,4 +1055,3 @@ class BlockedLog
}
}
-
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index 70b2108dd4c..2ea63cc7bfc 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -635,6 +635,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;
@@ -737,6 +738,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;
@@ -957,6 +959,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";
@@ -986,6 +989,7 @@ class Categorie extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function load_motherof()
{
global $conf;
@@ -1030,6 +1034,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;
@@ -1113,6 +1118,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);
@@ -1153,6 +1159,7 @@ class Categorie extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function debug_cats()
{
// Display $this->cats
@@ -1176,6 +1183,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];
@@ -1211,6 +1219,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;
@@ -1261,6 +1270,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);
@@ -1275,6 +1285,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();
@@ -1328,6 +1339,7 @@ class Categorie extends CommonObject
*
* @return int|array <0 KO, array OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_meres()
{
$parents = array();
@@ -1363,6 +1375,7 @@ class Categorie extends CommonObject
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_all_ways()
{
$ways = array();
@@ -1578,6 +1591,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';
@@ -1627,6 +1641,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';
@@ -1681,6 +1696,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';
@@ -1709,6 +1725,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 6c863580203..2d5db0a5c86 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -5,7 +5,7 @@
* Copyright (C) 2011-2017 Juanjo Menent
* Copyright (C) 2015 Marcos García
* Copyright (C) 2018 Nicolas ZABOURI
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@@ -688,6 +688,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";
@@ -1012,6 +1013,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;
@@ -1138,6 +1140,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;
@@ -1223,7 +1226,7 @@ class ActionComm extends CommonObject
if ((!$user->rights->agenda->allactions->read && $this->author->id != $user->id) || (!$user->rights->agenda->myactions->read && $this->author->id == $user->id))
$option = 'nolink';
-
+
$label = $this->label;
if (empty($label)) $label=$this->libelle; // For backward compatibility
@@ -1347,6 +1350,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;
@@ -1667,8 +1671,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);
@@ -1679,4 +1681,3 @@ class ActionComm extends CommonObject
}
}
-
diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php
index 4873db461f6..9c02e39e4f6 100644
--- a/htdocs/comm/action/class/actioncommreminder.class.php
+++ b/htdocs/comm/action/class/actioncommreminder.class.php
@@ -172,6 +172,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;
@@ -226,4 +227,3 @@ class ActionCommReminder extends CommonObject
}
}
-
diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php
index d8496a9a4ff..2383feb0512 100644
--- a/htdocs/comm/action/class/cactioncomm.class.php
+++ b/htdocs/comm/action/class/cactioncomm.class.php
@@ -110,6 +110,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 708b52c9151..47361e6b49f 100644
--- a/htdocs/comm/action/class/ical.class.php
+++ b/htdocs/comm/action/class/ical.class.php
@@ -53,6 +53,7 @@ class ICal
* @param string $file File
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function read_file($file)
{
$this->file = $file;
@@ -72,6 +73,7 @@ class ICal
*
* @return int
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_event_count()
{
return $this->event_count;
@@ -82,6 +84,7 @@ class ICal
*
* @return int
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_todo_count()
{
return $this->todo_count;
@@ -203,6 +206,7 @@ class ICal
* @param string $value Value
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_array($type, $key, $value)
{
@@ -261,6 +265,7 @@ class ICal
* @param string $text Text
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function retun_key_value($text)
{
/*
@@ -284,6 +289,7 @@ class ICal
* @param string $value string
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_rrule($value)
{
$result=array();
@@ -301,6 +307,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);
@@ -323,6 +330,7 @@ class ICal
* @param string $value Value
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ical_dt_date($key, $value)
{
$return_value=array();
@@ -350,6 +358,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_sort_event_list()
{
$temp = $this->get_event_list();
@@ -371,6 +380,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']);
@@ -381,6 +391,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_event_list()
{
return (! empty($this->cal['VEVENT'])?$this->cal['VEVENT']:'');
@@ -391,6 +402,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_freebusy_list()
{
return $this->cal['VFREEBUSY'];
@@ -401,6 +413,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_todo_list()
{
return $this->cal['VTODO'];
@@ -411,6 +424,7 @@ class ICal
*
* @return array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_calender_data()
{
return $this->cal['VCALENDAR'];
@@ -421,6 +435,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 50d9faf0637..b1727212f9f 100644
--- a/htdocs/comm/mailing/class/advtargetemailing.class.php
+++ b/htdocs/comm/mailing/class/advtargetemailing.class.php
@@ -239,6 +239,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;
@@ -305,6 +306,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;
@@ -529,6 +531,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;
@@ -621,16 +624,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])) {
@@ -683,6 +686,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;
@@ -949,5 +953,4 @@ class AdvanceTargetingMailing extends CommonObject
return $return_sql_criteria;
}
-
-}
\ No newline at end of file
+}
diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
index 7408bb27d37..8b9bd0d1fd7 100644
--- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
+++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
@@ -460,4 +460,4 @@ class FormAdvTargetEmailing extends Form
$this->db->free ( $resql );
return $out;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php
index 63fc0a2caab..92d92e89983 100644
--- a/htdocs/comm/mailing/class/mailing.class.php
+++ b/htdocs/comm/mailing/class/mailing.class.php
@@ -437,6 +437,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";
@@ -462,6 +463,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";
@@ -534,6 +536,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;
@@ -638,4 +641,3 @@ class Mailing extends CommonObject
}
}
-
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index e49fe43e2c9..bab2493bd3b 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -234,6 +234,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;
@@ -288,6 +289,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;
@@ -1167,6 +1169,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...
@@ -1556,6 +1559,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();
@@ -1795,6 +1799,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))
@@ -1862,6 +1867,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))
@@ -1922,6 +1928,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))
@@ -1982,6 +1989,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)
@@ -2051,6 +2059,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)
@@ -2122,6 +2131,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))
@@ -2185,6 +2195,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;
@@ -2250,6 +2261,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;
@@ -2533,6 +2545,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;
@@ -2596,6 +2609,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;
@@ -2675,6 +2689,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();
@@ -2955,6 +2970,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;
@@ -3094,6 +3110,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;
@@ -3139,6 +3156,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;
@@ -3309,6 +3327,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;
@@ -4189,6 +4208,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();
@@ -4217,4 +4237,3 @@ class PropaleLigne extends CommonObjectLine
}
}
-
diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php
index 941c061eea1..471f0493936 100644
--- a/htdocs/commande/class/commande.class.php
+++ b/htdocs/commande/class/commande.class.php
@@ -428,6 +428,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;
@@ -509,6 +510,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;
@@ -1480,6 +1482,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;
@@ -1709,6 +1712,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;
@@ -1786,6 +1790,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();
@@ -2012,6 +2017,7 @@ class Commande extends CommonOrder
*
* TODO deprecate, move to Shipping class
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function nb_expedition()
{
$sql = 'SELECT count(*)';
@@ -2038,6 +2044,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();
@@ -2154,6 +2161,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;
@@ -2220,6 +2228,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;
@@ -2286,6 +2295,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)
@@ -2348,8 +2358,9 @@ class Commande extends CommonOrder
* @param User $user Objet utilisateur qui modifie
* @param int $date_livraison Date de livraison
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
- * @return int <0 si ko, >0 si ok
+ * @return int <0 si ko, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison, $notrigger=0)
{
if ($user->rights->commande->creer)
@@ -2419,6 +2430,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;
@@ -2556,6 +2568,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;
@@ -2627,6 +2640,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)
@@ -3237,6 +3251,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;
@@ -3324,6 +3339,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;
@@ -3640,6 +3656,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;
@@ -4266,6 +4283,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();
@@ -4299,4 +4317,3 @@ class OrderLine extends CommonOrderLine
}
}
}
-
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 79b72a5a54c..a02186bc1c5 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -296,6 +296,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 (";
@@ -334,6 +335,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();
@@ -775,11 +777,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;
@@ -1065,6 +1068,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;
@@ -1100,6 +1104,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;
@@ -1170,6 +1175,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;
@@ -1223,6 +1229,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;
@@ -1852,6 +1859,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;
@@ -1917,12 +1925,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;
@@ -1985,6 +1994,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;
@@ -2022,6 +2032,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);
@@ -2033,6 +2044,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);
@@ -2046,6 +2058,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;
@@ -2083,6 +2096,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);
@@ -2094,6 +2108,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);
@@ -2209,6 +2224,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;
@@ -2282,4 +2298,3 @@ class AccountLine extends CommonObject
}
}
-
diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php
index fe56ea99504..8bb9a369ac5 100644
--- a/htdocs/compta/bank/class/paymentvarious.class.php
+++ b/htdocs/compta/bank/class/paymentvarious.class.php
@@ -440,6 +440,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;
@@ -475,6 +476,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 05664080ed3..6bd16b62c2d 100644
--- a/htdocs/compta/deplacement/class/deplacement.class.php
+++ b/htdocs/compta/deplacement/class/deplacement.class.php
@@ -300,6 +300,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;
@@ -447,4 +448,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 06f33f3f69a..84cfc2e3505 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -435,8 +435,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();
@@ -1183,6 +1184,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 b09c0435bcd..04ea5fa5546 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -1403,6 +1403,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();
@@ -1664,6 +1665,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;
@@ -1765,6 +1767,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;
@@ -2000,6 +2003,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;
@@ -2057,6 +2061,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;
@@ -2106,6 +2111,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='')
{
@@ -2466,6 +2472,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;
@@ -3031,6 +3038,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;
@@ -3128,6 +3136,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
@@ -3192,6 +3201,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;
@@ -3397,6 +3407,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;
@@ -3466,6 +3477,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;
@@ -3514,6 +3526,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;
@@ -3587,6 +3600,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)
{
@@ -3696,6 +3710,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';
@@ -3720,6 +3735,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;
@@ -3963,6 +3979,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;
@@ -4076,6 +4093,7 @@ class Facture extends CommonInvoice
*
* @return boolean
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_first()
{
return ($this->situation_counter == 1);
@@ -4086,6 +4104,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;
@@ -4166,6 +4185,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;
@@ -4796,6 +4816,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();
@@ -4837,6 +4858,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 a75de537724..1eb5dc9618b 100644
--- a/htdocs/compta/localtax/class/localtax.class.php
+++ b/htdocs/compta/localtax/class/localtax.class.php
@@ -337,6 +337,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";
@@ -375,6 +376,7 @@ class Localtax extends CommonObject
* @param int $year Year
* @return int ???
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_payee($year = 0)
{
@@ -416,6 +418,7 @@ class Localtax extends CommonObject
* @param int $year Year
* @return int ???
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_reglee($year = 0)
{
@@ -569,6 +572,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;
@@ -629,11 +633,12 @@ class Localtax extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Libelle du statut
*/
- function LibStatut($status,$mode=0)
- {
- 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 189afeda59f..4b548964603 100644
--- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php
+++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php
@@ -486,6 +486,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;
@@ -538,6 +539,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;
@@ -850,8 +852,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;
@@ -895,6 +898,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)
@@ -929,6 +933,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)
@@ -1051,6 +1056,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 53a17830c09..6404db12045 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -700,6 +700,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;
@@ -725,6 +726,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)
@@ -756,6 +758,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)
@@ -1119,6 +1122,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
@@ -1163,11 +1167,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 94d5a764a38..cedc8a1431e 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -114,6 +114,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;
@@ -325,6 +326,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;
@@ -404,6 +406,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;
@@ -551,6 +554,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;
@@ -672,6 +676,7 @@ class BonPrelevement extends CommonObject
*
* @return double Total amount
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SommeAPrelever()
{
global $conf;
@@ -712,6 +717,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;
@@ -1235,6 +1244,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;
@@ -1467,6 +1477,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");
@@ -1560,6 +1571,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";
@@ -1621,6 +1633,7 @@ class BonPrelevement extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EnregEmetteur()
{
fputs($this->file, "03");
@@ -1694,6 +1707,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
@@ -1809,6 +1823,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");
@@ -1882,6 +1897,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))
@@ -1934,4 +1950,3 @@ class BonPrelevement extends CommonObject
}
}
-
diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php
index fa8545c4ea2..ba7661d60e0 100644
--- a/htdocs/compta/prelevement/class/ligneprelevement.class.php
+++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php
@@ -128,6 +128,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;
@@ -173,4 +174,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 87de138e63a..e18834872d9 100644
--- a/htdocs/compta/prelevement/class/rejetprelevement.class.php
+++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php
@@ -200,6 +200,7 @@ class RejetPrelevement
* @param Facture $fac Invoice object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _send_email($fac)
{
global $langs;
@@ -366,4 +367,3 @@ class RejetPrelevement
}
}
-
diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php
index 31c616ac00d..22df2a58407 100644
--- a/htdocs/compta/salaries/class/paymentsalary.class.php
+++ b/htdocs/compta/salaries/class/paymentsalary.class.php
@@ -479,6 +479,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;
@@ -577,6 +578,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 a44b820c8ea..fe0983d7855 100644
--- a/htdocs/compta/sociales/class/cchargesociales.class.php
+++ b/htdocs/compta/sociales/class/cchargesociales.class.php
@@ -45,7 +45,7 @@ class Cchargesociales
/**
*/
-
+
public $libelle;
public $deductible;
public $active;
@@ -56,7 +56,7 @@ class Cchargesociales
/**
*/
-
+
/**
* Constructor
@@ -83,7 +83,7 @@ class Cchargesociales
$error = 0;
// Clean parameters
-
+
if (isset($this->libelle)) {
$this->libelle = trim($this->libelle);
}
@@ -106,14 +106,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,';
@@ -122,9 +122,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).',';
@@ -133,7 +133,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();
@@ -206,7 +206,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;
@@ -215,7 +215,7 @@ class Cchargesociales
$this->module = $obj->module;
$this->accountancy_code = $obj->accountancy_code;
-
+
}
$this->db->free($resql);
@@ -247,7 +247,7 @@ class Cchargesociales
dol_syslog(__METHOD__, LOG_DEBUG);
// Clean parameters
-
+
if (isset($this->libelle)) {
$this->libelle = trim($this->libelle);
}
@@ -270,7 +270,7 @@ class Cchargesociales
$this->accountancy_code = trim($this->accountancy_code);
}
-
+
// Check parameters
// Put here code to add a control on parameters values
@@ -454,7 +454,7 @@ class Cchargesociales
$result.= $link . $this->ref . $linkend;
return $result;
}
-
+
/**
* Retourne le libelle du status d'un user (actif, inactif)
*
@@ -473,6 +473,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;
@@ -509,8 +510,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
@@ -520,7 +521,7 @@ class Cchargesociales
public function initAsSpecimen()
{
$this->id = 0;
-
+
$this->libelle = '';
$this->deductible = '';
$this->active = '';
@@ -529,7 +530,7 @@ class Cchargesociales
$this->module = '';
$this->accountancy_code = '';
-
+
}
}
diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php
index 65e6085a650..bb4fd40edc1 100644
--- a/htdocs/compta/sociales/class/chargesociales.class.php
+++ b/htdocs/compta/sociales/class/chargesociales.class.php
@@ -365,6 +365,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";
@@ -380,6 +381,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";
@@ -410,6 +412,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;
@@ -637,4 +640,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 114a2e78cf1..4061cedd8c5 100644
--- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
+++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php
@@ -600,6 +600,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;
@@ -636,6 +637,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
@@ -708,5 +710,3 @@ class PaymentSocialContribution extends CommonObject
return $result;
}
}
-
-
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index af330910cdf..def18a6ff7a 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -354,8 +354,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)
{
@@ -395,6 +396,7 @@ class Tva extends CommonObject
* @param int $year Year
* @return double Amount
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tva_sum_payee($year = 0)
{
@@ -435,6 +437,7 @@ class Tva extends CommonObject
* @param int $year Year
* @return double Amount
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tva_sum_reglee($year = 0)
{
@@ -626,6 +629,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;
@@ -790,10 +794,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 ba96c865d1a..1648c0ff8e2 100644
--- a/htdocs/contact/canvas/actions_contactcard_common.class.php
+++ b/htdocs/contact/canvas/actions_contactcard_common.class.php
@@ -72,6 +72,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;
@@ -307,4 +308,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 bfcb5a21142..8bfca9c6dd6 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;
@@ -129,6 +130,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;
@@ -138,4 +140,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 d7df30d5ee5..ae58d0b6e4b 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -142,6 +142,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;
@@ -475,6 +476,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;
@@ -491,6 +493,7 @@ class Contact extends CommonObject
*
* @return array Tableau info des attributs
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info()
{
global $conf,$langs;
@@ -567,6 +570,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;
@@ -845,6 +849,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
@@ -1184,6 +1189,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;
@@ -1228,6 +1234,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 a867d8937c9..51ce4d39d08 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -236,6 +236,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);
@@ -257,6 +258,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);
@@ -698,6 +700,7 @@ class Contrat extends CommonObject
*
* @return ContratLigne[] Return array of contract lines
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$this->nbofserviceswait=0;
@@ -1776,6 +1779,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);
@@ -1814,6 +1818,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;
@@ -1995,6 +2000,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();
@@ -2071,6 +2077,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;
@@ -2147,6 +2154,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;
@@ -2561,6 +2569,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;
@@ -2980,6 +2989,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();
@@ -3099,6 +3109,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;
@@ -3156,6 +3167,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 f5382a91550..2c5912deee2 100644
--- a/htdocs/core/class/CMailFile.class.php
+++ b/htdocs/core/class/CMailFile.class.php
@@ -834,6 +834,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);
@@ -860,6 +861,7 @@ class CMailFile
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_mail()
{
global $conf,$dolibarr_main_data_root;
@@ -951,6 +953,7 @@ class CMailFile
*
* @return string headers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_smtpheaders()
{
global $conf;
@@ -1015,6 +1018,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;
@@ -1043,6 +1047,7 @@ class CMailFile
* @param string $msgtext Message string
* @return string String content
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_body($msgtext)
{
global $conf;
@@ -1145,6 +1150,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 = '';
@@ -1190,6 +1196,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 = '';
@@ -1222,6 +1229,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;
@@ -1286,6 +1294,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
@@ -1512,4 +1521,3 @@ class CMailFile
return $ret;
}
}
-
diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php
index 0a149feabf4..b224d4b98b6 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;
@@ -246,4 +248,3 @@ class CSMSFile
}
}
-
diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php
index b5f4f0e5539..f150c32f868 100644
--- a/htdocs/core/class/antivir.class.php
+++ b/htdocs/core/class/antivir.class.php
@@ -54,6 +54,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;
@@ -170,4 +171,3 @@ class AntiVir
}
}
-
diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php
index d9c496add4f..6c7be963f76 100644
--- a/htdocs/core/class/canvas.class.php
+++ b/htdocs/core/class/canvas.class.php
@@ -130,6 +130,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);
@@ -156,6 +157,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 9aeebd575bf..fe7a6692d9a 100644
--- a/htdocs/core/class/comment.class.php
+++ b/htdocs/core/class/comment.class.php
@@ -328,4 +328,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 70058ae4a7c..5e8806dfedd 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -54,6 +54,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;
@@ -90,6 +91,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;
@@ -148,6 +150,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;
@@ -228,7 +231,9 @@ abstract class CommonDocGenerator
* @param array_key $array_key Name of the key for return array
* @return array of substitution key->code
*/
- function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object') {
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object')
+ {
global $conf;
if(empty($object->country) && ! empty($object->country_code))
@@ -297,6 +302,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;
@@ -335,6 +341,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;
@@ -480,6 +487,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;
@@ -558,6 +566,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;
@@ -611,12 +620,13 @@ abstract class CommonDocGenerator
/**
- * Define array with couple substitution key => substitution value
+ * Define array with couple substitution key => substitution value
*
- * @param array $line Array of lines
- * @param Translate $outputlangs Lang object to use for output
- * @return array Substitution array
+ * @param array $line Array of lines
+ * @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;
@@ -652,6 +662,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();
if(!empty($object)) {
@@ -680,6 +691,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;
@@ -775,4 +787,3 @@ abstract class CommonDocGenerator
$pdf->line($x, $y+$h, $x, $y);
}
}
-
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 72ef472229d..b6b27708ffa 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -687,6 +687,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;
@@ -807,6 +808,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);
@@ -830,6 +832,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
@@ -857,6 +860,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;
@@ -894,6 +898,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();
@@ -931,6 +936,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;
@@ -1040,6 +1046,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;
@@ -1149,6 +1156,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;
@@ -1168,6 +1176,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;
@@ -1230,6 +1239,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;
@@ -1277,6 +1287,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';
@@ -1297,6 +1308,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';
@@ -1316,6 +1328,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);
@@ -1329,6 +1342,7 @@ abstract class CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_origin()
{
if ($this->origin == 'shipping') $this->origin = 'expedition';
@@ -1498,6 +1512,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;
@@ -2134,6 +2149,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)
@@ -2251,6 +2267,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);
@@ -2269,6 +2286,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);
@@ -2311,6 +2329,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);
@@ -2426,6 +2445,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
@@ -2472,6 +2492,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)
@@ -2504,7 +2525,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;
@@ -2556,6 +2578,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');
@@ -2571,6 +2594,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;
@@ -2807,6 +2831,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);
@@ -3565,6 +3590,7 @@ abstract class CommonObject
*
* @return string incoterms info
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function display_incoterms()
{
$out = '';
@@ -4176,6 +4202,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();
@@ -4218,6 +4245,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;
@@ -4603,6 +4631,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;
@@ -4637,6 +4666,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;
@@ -6414,6 +6444,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 1091962f6ea..9c5d5f9046b 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
@@ -93,7 +93,7 @@ abstract class CommonStickerGenerator
{
$this->db = $db;
}
-
+
/**
* Function to build PDF on disk, then output on HTTP strem.
*
@@ -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='');
/**
@@ -114,7 +115,7 @@ abstract class CommonStickerGenerator
* @return void
*/
abstract function addSticker(&$pdf,$outputlangs,$param);
-
+
/**
* Methode qui permet de modifier la taille des caracteres
* Cela modiera aussi l'espace entre chaque ligne
@@ -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) {
@@ -130,7 +132,7 @@ abstract class CommonStickerGenerator
$this->_Line_Height = $this->_Get_Height_Chars($pt);
$pdf->SetFont('','',$pt);
}
- }
+ }
/**
* protected Print dot line
@@ -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
*/
- function _Set_Format(&$pdf, $format)
+ // 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 9fc1921aa60..9d9b6a1c96a 100644
--- a/htdocs/core/class/discount.class.php
+++ b/htdocs/core/class/discount.class.php
@@ -341,6 +341,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
@@ -392,6 +393,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 860d89afea8..cd508c23310 100644
--- a/htdocs/core/class/doleditor.class.php
+++ b/htdocs/core/class/doleditor.class.php
@@ -149,6 +149,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;
@@ -347,4 +348,3 @@ class DolEditor
}
}
-
diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php
index f40d30f389e..28fbe14f287 100644
--- a/htdocs/core/class/dolgraph.class.php
+++ b/htdocs/core/class/dolgraph.class.php
@@ -130,6 +130,7 @@ class DolGraph
* @param float $which_prec Precision
* @return boolean
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetPrecisionY($which_prec)
{
$this->PrecisionY = $which_prec;
@@ -142,6 +143,7 @@ class DolGraph
* @param float $xi Xi
* @return boolean True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHorizTickIncrement($xi)
{
$this->horizTickIncrement = $xi;
@@ -154,6 +156,7 @@ class DolGraph
* @param float $xt Xt
* @return boolean True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetNumXTicks($xt)
{
$this->SetNumXTicks = $xt;
@@ -166,6 +169,7 @@ class DolGraph
* @param float $x Label interval
* @return boolean True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetLabelInterval($x)
{
$this->labelInterval = $x;
@@ -178,6 +182,7 @@ class DolGraph
* @param boolean $bool XGrid or not
* @return boolean true
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHideXGrid($bool)
{
$this->hideXGrid = $bool;
@@ -190,6 +195,7 @@ class DolGraph
* @param boolean $bool YGrid or not
* @return boolean true
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHideYGrid($bool)
{
$this->hideYGrid = $bool;
@@ -202,6 +208,7 @@ class DolGraph
* @param string $label Y label
* @return boolean|null True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetYLabel($label)
{
$this->YLabel = $label;
@@ -213,6 +220,7 @@ class DolGraph
* @param int $w Width
* @return boolean|null True
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetWidth($w)
{
$this->width = $w;
@@ -224,6 +232,7 @@ class DolGraph
* @param string $title Title
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetTitle($title)
{
$this->title = $title;
@@ -236,6 +245,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;
@@ -247,6 +257,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;
@@ -258,6 +269,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;
@@ -269,6 +281,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;
@@ -280,6 +293,7 @@ class DolGraph
* @param int $legendwidthmin Min width
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetLegendWidthMin($legendwidthmin)
{
$this->LegendWidthMin = $legendwidthmin;
@@ -291,6 +305,7 @@ class DolGraph
* @param int $max Max value
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetMaxValue($max)
{
$this->MaxValue = $max;
@@ -301,6 +316,7 @@ class DolGraph
*
* @return int Max value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMaxValue()
{
return $this->MaxValue;
@@ -312,6 +328,7 @@ class DolGraph
* @param int $min Min value
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetMinValue($min)
{
$this->MinValue = $min;
@@ -322,6 +339,7 @@ class DolGraph
*
* @return int Max value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMinValue()
{
return $this->MinValue;
@@ -333,6 +351,7 @@ class DolGraph
* @param int $h Height
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetHeight($h)
{
$this->height = $h;
@@ -344,6 +363,7 @@ class DolGraph
* @param string $s Shading
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetShading($s)
{
$this->SetShading = $s;
@@ -355,6 +375,7 @@ class DolGraph
* @param string $s Shading
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetCssPrefix($s)
{
$this->cssprefix = $s;
@@ -365,6 +386,7 @@ class DolGraph
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetBgColor()
{
unset($this->bgcolor);
@@ -375,6 +397,7 @@ class DolGraph
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetBgColorGrid()
{
unset($this->bgcolorgrid);
@@ -431,6 +454,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;
@@ -459,6 +483,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;
@@ -486,6 +511,7 @@ class DolGraph
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ResetDataColor()
{
unset($this->datacolor);
@@ -496,6 +522,7 @@ class DolGraph
*
* @return int Max value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMaxValueInData()
{
$k = 0;
@@ -521,6 +548,7 @@ class DolGraph
*
* @return int Min value of all data
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetMinValueInData()
{
$k = 0;
@@ -546,6 +574,7 @@ class DolGraph
*
* @return int Max value of all data
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetCeilMaxValue()
{
$max = $this->GetMaxValueInData();
@@ -569,6 +598,7 @@ class DolGraph
*
* @return double Max value of all data
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetFloorMinValue()
{
$min = $this->GetMinValueInData();
@@ -625,6 +655,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function draw_artichow($file,$fileurl)
{
global $artichow_defaultfont;
@@ -813,6 +844,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.NotCamelCaps
private function draw_jflot($file,$fileurl)
{
global $artichow_defaultfont;
@@ -1095,4 +1127,3 @@ class DolGraph
}
}
-
diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php
index 2499176b58b..91906497e9f 100644
--- a/htdocs/core/class/dolreceiptprinter.class.php
+++ b/htdocs/core/class/dolreceiptprinter.class.php
@@ -45,7 +45,7 @@
* Cut ticket partially
* Open cash drawer
* Activate buzzer
- *
+ *
* Code which can be placed everywhere
* Print QR Code
* Print date AAAA-MM-DD
@@ -94,7 +94,7 @@
require_once DOL_DOCUMENT_ROOT .'/includes/mike42/escpos-php/Escpos.php';
-
+
/**
* Class to manage Receipt Printers
*/
@@ -300,16 +300,16 @@ class dolReceiptPrinter extends Escpos
function selectTypePrinter($selected='', $htmlname='printertypeid')
{
global $langs;
-
+
$options = array(
1 => $langs->trans('CONNECTOR_DUMMY'),
2 => $langs->trans('CONNECTOR_FILE_PRINT'),
3 => $langs->trans('CONNECTOR_NETWORK_PRINT'),
4 => $langs->trans('CONNECTOR_WINDOWS_PRINT')
);
-
+
$this->resprint = Form::selectarray($htmlname, $options, $selected);
-
+
return 0;
}
@@ -324,7 +324,7 @@ class dolReceiptPrinter extends Escpos
function selectProfilePrinter($selected='', $htmlname='printerprofileid')
{
global $langs;
-
+
$options = array(
0 => $langs->trans('PROFILE_DEFAULT'),
1 => $langs->trans('PROFILE_SIMPLE'),
@@ -332,7 +332,7 @@ class dolReceiptPrinter extends Escpos
3 => $langs->trans('PROFILE_P822D'),
4 => $langs->trans('PROFILE_STAR')
);
-
+
$this->profileresprint = Form::selectarray($htmlname, $options, $selected);
return 0;
}
@@ -347,6 +347,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;
@@ -372,6 +373,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;
@@ -396,6 +398,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;
@@ -418,6 +421,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;
@@ -441,6 +445,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;
@@ -477,6 +482,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;
@@ -520,11 +526,11 @@ class dolReceiptPrinter extends Escpos
$ret = $this->InitPrinter($printerid);
if ($ret>0) {
setEventMessages($this->error, $this->errors, 'errors');
- }
- else
+ }
+ else
{
$nboflines = count($vals);
- for ($line=0; $line < $nboflines; $line++)
+ for ($line=0; $line < $nboflines; $line++)
{
switch ($vals[$line]['tag']) {
case 'DOL_ALIGN_CENTER':
@@ -638,6 +644,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 7f34165030b..e4ede83a158 100644
--- a/htdocs/core/class/emailsenderprofile.class.php
+++ b/htdocs/core/class/emailsenderprofile.class.php
@@ -314,6 +314,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 62122ed636c..fb6906c3456 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -748,6 +748,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 987033d35e3..a14b541e34b 100644
--- a/htdocs/core/class/fiscalyear.class.php
+++ b/htdocs/core/class/fiscalyear.class.php
@@ -245,6 +245,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 c89b5c31fea..49b767a6f3d 100644
--- a/htdocs/core/class/genericobject.class.php
+++ b/htdocs/core/class/genericobject.class.php
@@ -29,15 +29,14 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
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 6fe2dffd3d3..13978b5f0cd 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -658,6 +658,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;
@@ -753,6 +754,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;
@@ -844,6 +846,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;
@@ -893,6 +896,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;
@@ -943,6 +947,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;
@@ -985,6 +990,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);
@@ -1009,6 +1015,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;
@@ -1071,6 +1078,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;
@@ -1242,6 +1250,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;
@@ -1327,6 +1336,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);
@@ -1481,6 +1491,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);
@@ -1509,6 +1520,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;
@@ -1715,6 +1727,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;
@@ -1806,6 +1819,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;
@@ -1946,6 +1960,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;
@@ -2422,6 +2437,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;
@@ -2465,6 +2481,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;
@@ -2687,6 +2704,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;
@@ -2799,6 +2817,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
@@ -2847,6 +2866,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;
@@ -2894,6 +2914,7 @@ class Form
*
* @return int Nb of lines loaded, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_availability()
{
global $langs;
@@ -3060,6 +3081,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;
@@ -3120,6 +3142,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;
@@ -3165,6 +3188,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;
@@ -3438,6 +3462,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;
@@ -3541,6 +3566,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;
@@ -3630,6 +3656,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);
@@ -3940,6 +3967,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;
@@ -3994,6 +4022,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;
@@ -4027,6 +4056,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;
@@ -4104,6 +4134,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;
@@ -4143,6 +4174,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;
@@ -4181,6 +4213,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;
@@ -4213,6 +4246,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;
@@ -4241,6 +4275,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;
@@ -4288,6 +4323,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;
@@ -4377,6 +4413,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;
@@ -4425,6 +4462,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;
@@ -4461,6 +4499,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);
@@ -4571,6 +4610,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;
@@ -4651,6 +4691,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;
@@ -4840,6 +4881,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;
@@ -5206,6 +5248,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;
@@ -6400,6 +6443,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)
{
@@ -6780,6 +6824,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;
@@ -7109,4 +7154,3 @@ class Form
}
}
-
diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php
index 17e437f5223..f32def70ea6 100644
--- a/htdocs/core/class/html.formaccounting.class.php
+++ b/htdocs/core/class/html.formaccounting.class.php
@@ -62,6 +62,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;
@@ -141,6 +142,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;
@@ -216,6 +218,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();
@@ -252,6 +255,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;
@@ -339,6 +343,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') {
$aux_account = array();
@@ -398,6 +403,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;
@@ -428,4 +434,3 @@ class FormAccounting extends Form
}
}
}
-
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 451ee0d700d..51e873485fd 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -57,6 +57,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;
@@ -318,6 +319,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 fd0470c63f4..111852f2c38 100644
--- a/htdocs/core/class/html.formadmin.class.php
+++ b/htdocs/core/class/html.formadmin.class.php
@@ -57,7 +57,8 @@ class FormAdmin
* @param string $morecss Add more css styles
* @param int $showcode Add language code into label
* @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)
{
global $langs;
@@ -124,6 +125,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;
@@ -212,6 +214,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;
@@ -282,6 +285,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;
@@ -328,14 +332,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 dba8c5d24e5..3e29a7d92f4 100644
--- a/htdocs/core/class/html.formbarcode.class.php
+++ b/htdocs/core/class/html.formbarcode.class.php
@@ -104,6 +104,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;
@@ -163,6 +164,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;
@@ -181,4 +183,3 @@ class FormBarCode
}
}
-
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index 86105133c4c..2e5658d6757 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -35,7 +35,6 @@ class FormCompany
var $error;
-
/**
* Constructor
*
@@ -56,6 +55,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;
@@ -97,6 +97,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();
@@ -137,6 +138,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;
@@ -189,6 +191,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);
@@ -207,6 +210,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;
@@ -316,6 +320,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;
@@ -380,6 +385,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;
@@ -439,6 +445,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);
@@ -454,6 +461,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;
@@ -750,6 +758,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;
@@ -779,6 +788,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;
@@ -827,6 +837,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);
@@ -861,4 +872,3 @@ class FormCompany
}
}
-
diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php
index a3a3696e5f4..bf4f46ad229 100644
--- a/htdocs/core/class/html.formcontract.class.php
+++ b/htdocs/core/class/html.formcontract.class.php
@@ -52,6 +52,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;
@@ -67,14 +68,14 @@ class FormContract
if ($socid > 0)
{
// CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
- if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY))
+ if (empty($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY))
$sql.= " AND (c.fk_soc=".$socid." OR c.fk_soc IS NULL)";
else if ($conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all')
{
$sql.= " AND (c.fk_soc IN (".$socid.", ".$conf->global->CONTRACT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") ";
$sql.= " OR c.fk_soc IS NULL)";
}
- }
+ }
if ($socid == 0) $sql.= " AND (c.fk_soc = 0 OR c.fk_soc IS NULL)";
$sql.= " ORDER BY c.ref ";
@@ -140,14 +141,14 @@ class FormContract
}
print '';
$db->free($resql);
-
+
if (!empty($conf->use_javascript_ajax))
{
// Make select dynamic
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
print ajax_combobox($htmlname);
}
-
+
return $num;
}
else
@@ -156,7 +157,7 @@ class FormContract
return -1;
}
}
-
+
/**
* Show a form to select a contract
*
@@ -168,10 +169,10 @@ class FormContract
* @param int $showempty Show empty line
* @return int Nbr of project if OK, <0 if KO
*/
- function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
- {
- global $langs;
-
+ function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1)
+ {
+ global $langs;
+
print "\n";
print '';
- }
-
+ }
+
}
diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php
index 255868f02a5..87cc16e6eac 100644
--- a/htdocs/core/class/html.formcron.class.php
+++ b/htdocs/core/class/html.formcron.class.php
@@ -51,6 +51,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 7c457accadf..f3092bf87b2 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -73,6 +73,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;
@@ -248,6 +249,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;
@@ -1003,6 +1005,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;
@@ -1390,6 +1393,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;
@@ -1828,4 +1832,3 @@ class FormFile
}
}
-
diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php
index b675ba6e674..5502d870005 100644
--- a/htdocs/core/class/html.formintervention.class.php
+++ b/htdocs/core/class/html.formintervention.class.php
@@ -52,6 +52,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 4ce4bfee824..361f8370b78 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -132,6 +132,7 @@ class FormMail extends Form
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function clear_attached_files()
{
global $conf,$user;
@@ -156,6 +157,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();
@@ -186,6 +188,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();
@@ -213,6 +216,7 @@ class FormMail extends Form
*
* @return array array('paths'=> ,'names'=>, 'mimes'=> )
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_attached_files()
{
$listofpaths=array();
@@ -235,6 +239,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);
@@ -250,6 +255,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 69fe03ecaa1..0a31d53d7c5 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -64,7 +64,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";
@@ -114,7 +115,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";
@@ -161,7 +163,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;
@@ -218,7 +221,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;
@@ -279,6 +283,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 = '';
}
}
-
diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php
index 6db6f200136..4bf80cb7d00 100644
--- a/htdocs/core/class/html.formsms.class.php
+++ b/htdocs/core/class/html.formsms.class.php
@@ -89,6 +89,7 @@ class FormSms
* @param int $showform Show form tags and submit button (recommanded is to use with value 0)
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function show_form($morecss='titlefield', $showform=1)
{
global $conf, $langs, $user, $form;
@@ -356,4 +357,3 @@ function limitChars(textarea, limit, infodiv)
}
}
-
diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php
index 83886e63af8..fc86d7a05cd 100644
--- a/htdocs/core/class/html.formsocialcontrib.class.php
+++ b/htdocs/core/class/html.formsocialcontrib.class.php
@@ -53,6 +53,7 @@ class FormSocialContrib
* @param string $morecss Add more CSS on select
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_socialcontrib($selected='',$htmlname='actioncode', $useempty=0, $maxlen=40, $help=1, $morecss='minwidth300')
{
global $conf,$db,$langs,$user,$mysoc;
@@ -115,4 +116,3 @@ class FormSocialContrib
}
}
-
diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php
index 655969d73f6..3a8a147f4db 100644
--- a/htdocs/core/class/interfaces.class.php
+++ b/htdocs/core/class/interfaces.class.php
@@ -56,6 +56,7 @@ class Interfaces
* @param Conf $conf Objet conf
* @return int Nb of triggers ran if no error, -Nb of triggers with errors otherwise.
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function run_triggers($action,$object,$user,$langs,$conf)
{
// Check parameters
diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php
index f54caacff8b..1b3e667c68d 100644
--- a/htdocs/core/class/ldap.class.php
+++ b/htdocs/core/class/ldap.class.php
@@ -147,6 +147,7 @@ class Ldap
*
* @return int <0 if KO, 1 if bind anonymous, 2 if bind auth
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function connect_bind()
{
global $langs, $conf;
@@ -650,6 +651,7 @@ class Ldap
* @param array $info Attributes array
* @return string Content of file
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function dump_content($dn, $info)
{
$content='';
@@ -1429,6 +1431,7 @@ class Ldap
* @param string $value AD time to convert
* @return integer Unix timestamp
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function convert_time($value)
{
$dateLargeInt=$value; // nano secondes depuis 1601 !!!!
diff --git a/htdocs/core/class/menu.class.php b/htdocs/core/class/menu.class.php
index 17d5e06589f..b1ecbbf483c 100644
--- a/htdocs/core/class/menu.class.php
+++ b/htdocs/core/class/menu.class.php
@@ -73,7 +73,7 @@ class Menu
/**
* Insert a menu entry into this->liste
*
- * @param int $idafter Array key after which inserting new entry
+ * @param int $idafter Array key after which inserting new entry
* @param string $url Url to follow on click
* @param string $titre Label of menu to add
* @param integer $level Level of menu to add
@@ -101,9 +101,12 @@ class Menu
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function remove_last()
{
- if (count($this->liste) > 1) array_pop($this->liste);
+ if (count($this->liste) > 1) {
+ array_pop($this->liste);
+ }
}
/**
diff --git a/htdocs/core/class/openid.class.php b/htdocs/core/class/openid.class.php
index d46481a0c60..8edd5911bad 100644
--- a/htdocs/core/class/openid.class.php
+++ b/htdocs/core/class/openid.class.php
@@ -51,6 +51,7 @@ class SimpleOpenID
* @param string $a Server
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetOpenIDServer($a)
{
$this->URLs['openid_server'] = $a;
@@ -62,6 +63,7 @@ class SimpleOpenID
* @param string $a Server
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetTrustRoot($a)
{
$this->URLs['trust_root'] = $a;
@@ -73,6 +75,7 @@ class SimpleOpenID
* @param string $a Server
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetCancelURL($a)
{
$this->URLs['cancel'] = $a;
@@ -84,6 +87,7 @@ class SimpleOpenID
* @param string $a Server
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetApprovedURL($a)
{
$this->URLs['approved'] = $a;
@@ -95,11 +99,12 @@ class SimpleOpenID
* @param string $a Server
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetRequiredFields($a)
{
- if (is_array($a)){
+ if (is_array($a)) {
$this->fields['required'] = $a;
- }else{
+ } else {
$this->fields['required'][] = $a;
}
}
@@ -110,11 +115,12 @@ class SimpleOpenID
* @param string $a Server
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetOptionalFields($a)
{
- if (is_array($a)){
+ if (is_array($a)) {
$this->fields['optional'] = $a;
- }else{
+ } else {
$this->fields['optional'][] = $a;
}
}
@@ -122,13 +128,14 @@ class SimpleOpenID
/**
* SetIdentity
*
- * @param string $a Server
+ * @param string $a Server
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetIdentity($a)
{ // Set Identity URL
if ((stripos($a, 'http://') === false)
- && (stripos($a, 'https://') === false)){
+ && (stripos($a, 'https://') === false)) {
$a = 'http://'.$a;
}
/*
@@ -152,8 +159,9 @@ class SimpleOpenID
*
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetIdentity()
- { // Get Identity
+ {
return $this->openid_url_identity;
}
@@ -162,6 +170,7 @@ class SimpleOpenID
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetError()
{
$e = $this->error;
@@ -175,6 +184,7 @@ class SimpleOpenID
* @param string $desc Description
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ErrorStore($code, $desc = null)
{
$errs['OPENID_NOSERVERSFOUND'] = 'Cannot find OpenID Server TAG on Identity page.';
@@ -189,6 +199,7 @@ class SimpleOpenID
*
* @return boolean
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function IsError()
{
if (count($this->error) > 0)
@@ -227,6 +238,7 @@ class SimpleOpenID
* @param string $openid_identity Server
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function OpenID_Standarize($openid_identity = null)
{
if ($openid_identity === null)
@@ -273,6 +285,7 @@ class SimpleOpenID
* @param string $params Params
* @return boolean|unknown
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function FSOCK_Request($url, $method="GET", $params = "")
{
$fp = fsockopen("ssl://www.myopenid.com", 443, $errno, $errstr, 3); // Connection timeout is 3 seconds
@@ -305,6 +318,7 @@ class SimpleOpenID
* @param string $params Params
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function CURL_Request($url, $method="GET", $params = "")
{ // Remember, SSL MUST BE SUPPORTED
if (is_array($params)) $params = $this->array2url($params);
@@ -333,6 +347,7 @@ class SimpleOpenID
* @param string $content Content
* @return array Array of servers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function HTML2OpenIDServer($content)
{
$get = array();
@@ -359,6 +374,7 @@ class SimpleOpenID
* @param string $url Url to found endpoint
* @return string Endpoint
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetOpenIDServer($url='')
{
global $conf;
@@ -369,12 +385,12 @@ class SimpleOpenID
$response = getURLContent($url);
list($servers, $delegates) = $this->HTML2OpenIDServer($response);
- if (count($servers) == 0){
+ if (count($servers) == 0) {
$this->ErrorStore('OPENID_NOSERVERSFOUND');
return false;
}
if (isset($delegates[0])
- && ($delegates[0] != "")){
+ && ($delegates[0] != "")) {
$this->SetIdentity($delegates[0]);
}
$this->SetOpenIDServer($servers[0]);
@@ -386,6 +402,7 @@ class SimpleOpenID
*
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetRedirectURL()
{
$params = array();
@@ -410,6 +427,7 @@ class SimpleOpenID
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Redirect()
{
$redirect_to = $this->GetRedirectURL();
@@ -430,6 +448,7 @@ class SimpleOpenID
*
* @return boolean
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ValidateWithServer()
{
$params = array(
@@ -522,4 +541,3 @@ class SimpleOpenID
}
}
-
diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php
index 32a5842d410..9b76e2d2409 100644
--- a/htdocs/core/class/rssparser.class.php
+++ b/htdocs/core/class/rssparser.class.php
@@ -462,6 +462,7 @@ class RssParser
* @param array $attrs Attributes of tags
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function feed_start_element($p, $element, &$attrs)
{
$el = $element = strtolower($element);
@@ -581,6 +582,7 @@ class RssParser
* @param string $text Tag
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function feed_cdata($p, $text)
{
if ($this->_format == 'atom' and $this->incontent)
@@ -601,6 +603,7 @@ class RssParser
* @param string $el Tag
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function feed_end_element($p, $el)
{
$el = strtolower($el);
@@ -669,6 +672,7 @@ class RssParser
* @param string $text Text
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function append_content($text)
{
if ( $this->initem ) {
@@ -781,4 +785,3 @@ function xml2php($xml)
return $array;
}
-
diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php
index 7f0f8143cbd..4f220470f1f 100644
--- a/htdocs/core/class/smtps.class.php
+++ b/htdocs/core/class/smtps.class.php
@@ -349,6 +349,7 @@ class SMTPs
*
* @return mixed $_retVal Boolean indicating success or failure on connection
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _server_connect()
{
// Default return value
@@ -411,6 +412,7 @@ class SMTPs
*
* @return boolean|null $_retVal Boolean indicating success or failure of authentication
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _server_authenticate()
{
global $conf;
@@ -1052,6 +1054,7 @@ class SMTPs
* @param string $_strAddr Email address
* @return array An array of the various parts of an email address
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _strip_email($_strAddr)
{
// Keep the orginal
@@ -1094,6 +1097,7 @@ class SMTPs
*
* @return array Returns an array of bares addresses
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_RCPT_list()
{
/**
@@ -1123,6 +1127,7 @@ class SMTPs
* @param string $_which Which collection of addresses to return ('to', 'cc', 'bcc')
* @return string|false Array of emaill address
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_email_list($_which = null)
{
// We need to know which address segment to pull
@@ -1754,6 +1759,7 @@ class SMTPs
* @param string $response Response. Example: "550 5.7.1 https://support.google.com/a/answer/6140680#invalidcred j21sm814390wre.3"
* @return boolean True or false
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function server_parse($socket, $response)
{
/**
@@ -1795,6 +1801,7 @@ class SMTPs
* @param string $CRLF CRLF
* @return boolean|null True or false
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function socket_send_str( $_strSend, $_returnCode = null, $CRLF = "\r\n" )
{
if ($this->_debug) $this->log.=$_strSend; // @CHANGE LDR for log
@@ -2049,4 +2056,3 @@ class SMTPs
* - basic shell with some commets
*
*/
-
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index bdcae2e33ea..c1053193506 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -764,6 +764,7 @@ class Translate
* @param int $usecode 1=Show code instead of country name for language variant, 2=Show only code
* @return array List of languages
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_available_languages($langdir=DOL_DOCUMENT_ROOT,$maxlength=0,$usecode=0)
{
global $conf;
@@ -802,6 +803,7 @@ class Translate
* @param integer $searchalt Search also alernate language file
* @return boolean true if exists and readable
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function file_exists($filename,$searchalt=0)
{
// Test si fichier dans repertoire de la langue
@@ -1024,6 +1026,7 @@ class Translate
*
* @return array Array of translation keys lang_key => string_translation_loaded
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_translations_for_substitutions()
{
$substitutionarray = array();
diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php
index b0ad770532b..4abe445c774 100644
--- a/htdocs/core/db/Database.interface.php
+++ b/htdocs/core/db/Database.interface.php
@@ -41,6 +41,7 @@ interface Database
* @param resource $resultset Resultset of request
* @return array Array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset);
/**
@@ -77,6 +78,7 @@ interface Database
* @param string $owner Username of database owner
* @return resource resource defined if OK, null if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
/**
@@ -102,6 +104,7 @@ interface Database
* @return int Nombre de lignes
* @see num_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset);
/**
@@ -118,6 +121,7 @@ interface Database
* @param string $table Nmae of table filter ('xxx%')
* @return array List of tables in an array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database, $table = '');
/**
@@ -150,6 +154,7 @@ interface Database
* @param resource $resultset Resultset of request
* @return array Array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset);
/**
@@ -174,6 +179,7 @@ interface Database
* @param string $fieldid Field name
* @return int Id of row
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab, $fieldid = 'rowid');
/**
@@ -254,6 +260,7 @@ interface Database
* @return int Nb of lines
* @see affected_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset);
/**
@@ -289,6 +296,7 @@ interface Database
* @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
/**
@@ -297,6 +305,7 @@ interface Database
* @param string $table Name of table
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table);
/**
@@ -315,6 +324,7 @@ interface Database
* @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table, $field_name, $field_desc, $field_position = "");
/**
@@ -324,6 +334,7 @@ interface Database
* @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table, $field_name);
/**
@@ -334,6 +345,7 @@ interface Database
* @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table, $field_name, $field_desc);
/**
@@ -350,6 +362,7 @@ interface Database
* @param string $field Optionnel : Name of field if we want description of field
* @return resource Resource
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table, $field = "");
/**
@@ -375,6 +388,7 @@ interface Database
* @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser(
$dolibarr_main_db_host,
$dolibarr_main_db_user,
@@ -417,6 +431,7 @@ interface Database
* @param string $table Name of table
* @return array Array with inforation on table
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table);
/**
@@ -447,6 +462,7 @@ interface Database
*
* @return string Id connexion
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId();
/**
@@ -455,6 +471,7 @@ interface Database
* @param resource $resultset Curseur de la requete voulue
* @return Object Object result line or false if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset);
/**
@@ -463,6 +480,7 @@ interface Database
* @param string $database Name of database
* @return boolean true if OK, false if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database);
}
diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php
index 4734c3364b5..adf4fb151ce 100644
--- a/htdocs/core/db/mssql.class.php
+++ b/htdocs/core/db/mssql.class.php
@@ -145,6 +145,7 @@ class DoliDBMssql extends DoliDB
* @param string $database Name of database
* @return boolean true if OK, false if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database)
{
return @mssql_select_db($database, $this->db);
@@ -465,6 +466,7 @@ class DoliDBMssql extends DoliDB
* @param resource $resultset Curseur de la requete voulue
* @return object|false Object result line or false if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset)
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -478,6 +480,7 @@ class DoliDBMssql extends DoliDB
* @param resource $resultset Resultset of request
* @return array|false Array or false if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset)
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -492,6 +495,7 @@ class DoliDBMssql extends DoliDB
* @param resource $resultset Resultset of request
* @return array|false Array or false if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset)
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -506,6 +510,7 @@ class DoliDBMssql extends DoliDB
* @return int Nb of lines
* @see affected_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset)
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -520,6 +525,7 @@ class DoliDBMssql extends DoliDB
* @return int Nombre de lignes
* @see num_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset)
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -646,6 +652,7 @@ class DoliDBMssql extends DoliDB
* @param string $fieldid Field name
* @return int Id of row or -1 on error
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab,$fieldid='rowid')
{
$res = $this->query("SELECT @@IDENTITY as id");
@@ -707,6 +714,7 @@ class DoliDBMssql extends DoliDB
*
* @return string Id connexion
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId()
{
$resql=$this->query('SELECT CONNECTION_ID()');
@@ -729,6 +737,7 @@ class DoliDBMssql extends DoliDB
* @param string $owner Username of database owner
* @return false|resource|true resource defined if OK, false if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
/*if (empty($charset)) $charset=$this->forcecharset;
@@ -761,6 +770,7 @@ class DoliDBMssql extends DoliDB
* @param string $table Nmae of table filter ('xxx%')
* @return array List of tables in an array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database,$table='')
{
$this->_results = mssql_list_tables($database, $this->db);
@@ -773,6 +783,7 @@ class DoliDBMssql extends DoliDB
* @param string $table Name of table
* @return array Tableau des informations des champs de la table
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table)
{
@@ -796,6 +807,7 @@ class DoliDBMssql extends DoliDB
* @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
{
// FIXME: $fulltext_keys parameter is unused
@@ -869,6 +881,7 @@ class DoliDBMssql extends DoliDB
* @param string $table Name of table
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table)
{
$sql = "DROP TABLE ".$table;
@@ -886,6 +899,7 @@ class DoliDBMssql extends DoliDB
* @param string $field Optionnel : Name of field if we want description of field
* @return false|resource|true Resource
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table,$field="")
{
$sql="DESC ".$table." ".$field;
@@ -904,6 +918,7 @@ class DoliDBMssql extends DoliDB
* @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table,$field_name,$field_desc,$field_position="")
{
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@@ -939,6 +954,7 @@ class DoliDBMssql extends DoliDB
* @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table,$field_name,$field_desc)
{
$sql = "ALTER TABLE ".$table;
@@ -961,6 +977,7 @@ class DoliDBMssql extends DoliDB
* @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table,$field_name)
{
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@@ -982,6 +999,7 @@ class DoliDBMssql extends DoliDB
* @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{
$sql = "CREATE LOGIN ".$this->EscapeFieldName($dolibarr_main_db_user)." WITH PASSWORD='$dolibarr_main_db_pass'";
@@ -1138,6 +1156,7 @@ class DoliDBMssql extends DoliDB
* @param string $fieldname Field's name to escape
* @return string field's name escaped
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function EscapeFieldName($fieldname) {
return "[".$fieldname."]";
}
@@ -1150,6 +1169,7 @@ class DoliDBMssql extends DoliDB
* @param mixed $fields String for one field or array of string for multiple field
* @return false|object
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetFieldInformation($table,$fields) {
$sql="SELECT * from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$this->escape($table)."' AND COLUMN_NAME";
if (is_array($fields))
@@ -1176,4 +1196,3 @@ class DoliDBMssql extends DoliDB
}
}
-
diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php
index 23c19542ae6..cd434791310 100644
--- a/htdocs/core/db/mysqli.class.php
+++ b/htdocs/core/db/mysqli.class.php
@@ -173,6 +173,7 @@ class DoliDBMysqli extends DoliDB
* @param string $database Name of database
* @return boolean true if OK, false if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database)
{
dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
@@ -291,6 +292,7 @@ class DoliDBMysqli extends DoliDB
* @param mysqli_result $resultset Curseur de la requete voulue
* @return object|null Object result line or null if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset)
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -305,6 +307,7 @@ class DoliDBMysqli extends DoliDB
* @param mysqli_result $resultset Resultset of request
* @return array|null Array or null if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -318,6 +321,7 @@ class DoliDBMysqli extends DoliDB
* @param mysqli_result $resultset Resultset of request
* @return array|null|0 Array or null if KO or end of cursor or 0 if resultset is bool
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -340,6 +344,7 @@ class DoliDBMysqli extends DoliDB
* @return int Nb of lines
* @see affected_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -354,6 +359,7 @@ class DoliDBMysqli extends DoliDB
* @return int Nombre de lignes
* @see num_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -463,6 +469,7 @@ class DoliDBMysqli extends DoliDB
* @param string $fieldid Field name
* @return int|string Id of row
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab,$fieldid='rowid')
{
return $this->db->insert_id;
@@ -543,6 +550,7 @@ class DoliDBMysqli extends DoliDB
*
* @return string Id connexion
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId()
{
$resql=$this->query('SELECT CONNECTION_ID()');
@@ -565,6 +573,7 @@ class DoliDBMysqli extends DoliDB
* @param string $owner Username of database owner
* @return bool|mysqli_result resource defined if OK, null if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
if (empty($charset)) $charset=$this->forcecharset;
@@ -593,6 +602,7 @@ class DoliDBMysqli extends DoliDB
* @param string $table Nmae of table filter ('xxx%')
* @return array List of tables in an array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database, $table='')
{
$listtables=array();
@@ -618,6 +628,7 @@ class DoliDBMysqli extends DoliDB
* @param string $table Name of table
* @return array Tableau des informations des champs de la table
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table)
{
$infotables=array();
@@ -648,6 +659,7 @@ class DoliDBMysqli extends DoliDB
* @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
{
// FIXME: $fulltext_keys parameter is unused
@@ -724,6 +736,7 @@ class DoliDBMysqli extends DoliDB
* @param string $table Name of table
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table)
{
$sql = "DROP TABLE ".$table;
@@ -741,6 +754,7 @@ class DoliDBMysqli extends DoliDB
* @param string $field Optionnel : Name of field if we want description of field
* @return bool|mysqli_result Resultset x (x->Field, x->Type, ...)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table,$field="")
{
$sql="DESC ".$table." ".$field;
@@ -759,6 +773,7 @@ class DoliDBMysqli extends DoliDB
* @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table,$field_name,$field_desc,$field_position="")
{
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@@ -808,6 +823,7 @@ class DoliDBMysqli extends DoliDB
* @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table,$field_name,$field_desc)
{
$sql = "ALTER TABLE ".$table;
@@ -852,6 +868,7 @@ class DoliDBMysqli extends DoliDB
* @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table,$field_name)
{
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@@ -873,6 +890,7 @@ class DoliDBMysqli extends DoliDB
* @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{
$sql = "CREATE USER '".$this->escape($dolibarr_main_db_user)."'";
@@ -1082,4 +1100,3 @@ class DoliDBMysqli extends DoliDB
return $result;
}
}
-
diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php
index 8e57b29109e..be6bb0888d2 100644
--- a/htdocs/core/db/pgsql.class.php
+++ b/htdocs/core/db/pgsql.class.php
@@ -367,6 +367,7 @@ class DoliDBPgsql extends DoliDB
* @param string $database Name of database
* @return bool true if OK, false if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database)
{
if ($database == $this->database_name) return true;
@@ -546,6 +547,7 @@ class DoliDBPgsql extends DoliDB
* @param resource $resultset Curseur de la requete voulue
* @return false|object Object result line or false if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -559,6 +561,7 @@ class DoliDBPgsql extends DoliDB
* @param resource $resultset Resultset of request
* @return false|array Array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -572,6 +575,7 @@ class DoliDBPgsql extends DoliDB
* @param resource $resultset Resultset of request
* @return false|array Array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset)
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -586,6 +590,7 @@ class DoliDBPgsql extends DoliDB
* @return int Nb of lines, -1 on error
* @see affected_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -600,6 +605,7 @@ class DoliDBPgsql extends DoliDB
* @return int Nb of lines
* @see num_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -761,6 +767,7 @@ class DoliDBPgsql extends DoliDB
* @param string $fieldid Field name
* @return string Id of row
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab,$fieldid='rowid')
{
//$result = pg_query($this->db,"SELECT MAX(".$fieldid.") FROM ".$tab);
@@ -824,6 +831,7 @@ class DoliDBPgsql extends DoliDB
*
* @return string Id connexion
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId()
{
return '?';
@@ -842,6 +850,7 @@ class DoliDBPgsql extends DoliDB
* @param string $owner Username of database owner
* @return false|resource resource defined if OK, null if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
if (empty($charset)) $charset=$this->forcecharset;
@@ -863,6 +872,7 @@ class DoliDBPgsql extends DoliDB
* @param string $table Name of table filter ('xxx%')
* @return array List of tables in an array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database, $table='')
{
$listtables=array();
@@ -887,6 +897,7 @@ class DoliDBPgsql extends DoliDB
* @return array Tableau des informations des champs de la table
*
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table)
{
$infotables=array();
@@ -932,6 +943,7 @@ class DoliDBPgsql extends DoliDB
* @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
{
// FIXME: $fulltext_keys parameter is unused
@@ -1005,6 +1017,7 @@ class DoliDBPgsql extends DoliDB
* @param string $table Name of table
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table)
{
$sql = "DROP TABLE ".$table;
@@ -1024,6 +1037,7 @@ class DoliDBPgsql extends DoliDB
* @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{
// Note: using ' on user does not works with pgsql
@@ -1046,6 +1060,7 @@ class DoliDBPgsql extends DoliDB
* @param string $field Optionnel : Name of field if we want description of field
* @return false|resource Resultset x (x->attname)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table,$field="")
{
$sql ="SELECT attname FROM pg_attribute, pg_type WHERE typname = '".$table."' AND attrelid = typrelid";
@@ -1066,6 +1081,7 @@ class DoliDBPgsql extends DoliDB
* @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table,$field_name,$field_desc,$field_position="")
{
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@@ -1104,6 +1120,7 @@ class DoliDBPgsql extends DoliDB
* @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table,$field_name,$field_desc)
{
$sql = "ALTER TABLE ".$table;
@@ -1146,6 +1163,7 @@ class DoliDBPgsql extends DoliDB
* @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table,$field_name)
{
$sql= "ALTER TABLE ".$table." DROP COLUMN ".$field_name;
diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php
index 78762f282b4..43a2217d64e 100644
--- a/htdocs/core/db/sqlite3.class.php
+++ b/htdocs/core/db/sqlite3.class.php
@@ -302,6 +302,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $database Name of database
* @return boolean true if OK, false if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_db($database)
{
dol_syslog(get_class($this)."::select_db database=".$database, LOG_DEBUG);
@@ -496,6 +497,7 @@ class DoliDBSqlite3 extends DoliDB
* @param SQLite3Result $resultset Curseur de la requete voulue
* @return false|object Object result line or false if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_object($resultset)
{
// Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
@@ -515,6 +517,7 @@ class DoliDBSqlite3 extends DoliDB
* @param SQLite3Result $resultset Resultset of request
* @return false|array Array or false if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_array($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -530,6 +533,7 @@ class DoliDBSqlite3 extends DoliDB
* @param SQLite3Result $resultset Resultset of request
* @return false|array Array or false if KO or end of cursor
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_row($resultset)
{
// If resultset not provided, we take the last used by connexion
@@ -552,6 +556,7 @@ class DoliDBSqlite3 extends DoliDB
* @return int Nb of lines
* @see affected_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function num_rows($resultset)
{
// FIXME: SQLite3Result does not have a queryString member
@@ -571,6 +576,7 @@ class DoliDBSqlite3 extends DoliDB
* @return int Nb of lines
* @see affected_rows
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function affected_rows($resultset)
{
// FIXME: SQLite3Result does not have a queryString member
@@ -699,6 +705,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $fieldid Field name
* @return int Id of row
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function last_insert_id($tab,$fieldid='rowid')
{
return $this->db->lastInsertRowId();
@@ -778,6 +785,7 @@ class DoliDBSqlite3 extends DoliDB
*
* @return string Id connexion
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLGetConnectId()
{
return '?';
@@ -795,6 +803,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $owner Username of database owner
* @return SQLite3Result resource defined if OK, null if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
if (empty($charset)) $charset=$this->forcecharset;
@@ -823,6 +832,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $table Name of table filter ('xxx%')
* @return array List of tables in an array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLListTables($database, $table='')
{
$listtables=array();
@@ -849,6 +859,7 @@ class DoliDBSqlite3 extends DoliDB
* @return array Tableau des informations des champs de la table
* TODO modify for sqlite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLInfoTable($table)
{
$infotables=array();
@@ -879,6 +890,7 @@ class DoliDBSqlite3 extends DoliDB
* @param array $keys Tableau des champs cles noms => valeur
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateTable($table,$fields,$primary_key,$type,$unique_keys=null,$fulltext_keys=null,$keys=null)
{
// FIXME: $fulltext_keys parameter is unused
@@ -951,6 +963,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $table Name of table
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropTable($table)
{
$sql = "DROP TABLE ".$table;
@@ -968,6 +981,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $field Optionnel : Name of field if we want description of field
* @return SQLite3Result Resource
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDescTable($table,$field="")
{
$sql="DESC ".$table." ".$field;
@@ -986,6 +1000,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $field_position Optionnel ex.: "after champtruc"
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLAddField($table,$field_name,$field_desc,$field_position="")
{
// cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
@@ -1028,6 +1043,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $field_desc Array with description of field format
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLUpdateField($table,$field_name,$field_desc)
{
$sql = "ALTER TABLE ".$table;
@@ -1049,6 +1065,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $field_name Name of field to drop
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLDropField($table,$field_name)
{
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
@@ -1071,6 +1088,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $dolibarr_main_db_name Database name where user must be granted
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function DDLCreateUser($dolibarr_main_db_host,$dolibarr_main_db_user,$dolibarr_main_db_pass,$dolibarr_main_db_name)
{
$sql = "INSERT INTO user ";
@@ -1302,6 +1320,7 @@ class DoliDBSqlite3 extends DoliDB
* @param int $day Day
* @return int Formatted date
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private static function calc_daynr($year, $month, $day) {
$y = $year;
if ($y == 0 && $month == 0) return 0;
@@ -1322,6 +1341,7 @@ class DoliDBSqlite3 extends DoliDB
* @param bool $sunday_first_day_of_week ???
* @return int
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private static function calc_weekday($daynr, $sunday_first_day_of_week) {
$ret = floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7);
return $ret;
@@ -1333,6 +1353,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $year Year
* @return int Nb of days in year
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private static function calc_days_in_year($year)
{
return (($year & 3) == 0 && ($year%100 || ($year%400 == 0 && $year)) ? 366 : 365);
@@ -1348,6 +1369,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $calc_year ???
* @return string ???
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private static function calc_week($year, $month, $day, $week_behaviour, &$calc_year) {
$daynr=self::calc_daynr($year,$month,$day);
$first_daynr=self::calc_daynr($year,1,1);
@@ -1388,4 +1410,3 @@ class DoliDBSqlite3 extends DoliDB
}
}
-
diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php
index 8df3f28da3e..40c1ff5187c 100644
--- a/htdocs/core/modules/DolibarrModules.class.php
+++ b/htdocs/core/modules/DolibarrModules.class.php
@@ -1007,6 +1007,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* @param string $reldir Relative directory where to scan files
* @return int <=0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_tables($reldir)
{
global $conf;
@@ -1123,6 +1124,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_boxes($option='')
{
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
@@ -1220,6 +1222,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_boxes()
{
global $conf;
@@ -1295,6 +1298,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_cronjobs()
{
require_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
@@ -1405,6 +1409,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_cronjobs()
{
global $conf;
@@ -1434,6 +1439,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_tabs()
{
global $conf;
@@ -1459,6 +1465,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if ok)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_tabs()
{
global $conf;
@@ -1526,6 +1533,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_const()
{
global $conf;
@@ -1595,6 +1603,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int <0 if KO, 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_const()
{
global $conf;
@@ -1633,6 +1642,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_permissions($reinitadminperms=0, $force_entity=null, $notrigger=0)
{
global $conf,$user;
@@ -1785,6 +1795,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_permissions()
{
global $conf;
@@ -1810,6 +1821,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_menus()
{
global $user;
@@ -1919,6 +1931,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_menus()
{
global $conf;
@@ -1948,6 +1961,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_dirs()
{
global $langs, $conf;
@@ -2009,6 +2023,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_dirs($name,$dir)
{
global $conf;
@@ -2050,6 +2065,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_dirs()
{
global $conf;
@@ -2075,6 +2091,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function insert_module_parts()
{
global $conf;
@@ -2153,6 +2170,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @return int Error count (0 if OK)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_module_parts()
{
global $conf;
diff --git a/htdocs/core/modules/action/modules_action.php b/htdocs/core/modules/action/modules_action.php
index 2971b6f59ee..8e9d2200f36 100644
--- a/htdocs/core/modules/action/modules_action.php
+++ b/htdocs/core/modules/action/modules_action.php
@@ -37,6 +37,7 @@ abstract class ModeleAction extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -62,6 +63,7 @@ abstract class ModeleAction extends CommonDocGenerator
* @param int $hideref Hide ref
* @return int 0 if KO, 1 if OK
*/
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function action_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{
global $conf,$langs,$user;
diff --git a/htdocs/core/modules/action/rapport.pdf.php b/htdocs/core/modules/action/rapport.pdf.php
index 7dec29e5189..285664dea95 100644
--- a/htdocs/core/modules/action/rapport.pdf.php
+++ b/htdocs/core/modules/action/rapport.pdf.php
@@ -92,6 +92,7 @@ class CommActionRapport
* @param Translate $outputlangs Lang object for output language
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($socid = 0, $catid = 0, $outputlangs='')
{
global $user,$conf,$langs,$hookmanager;
@@ -99,7 +100,7 @@ class CommActionRapport
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products"));
@@ -342,4 +343,3 @@ class CommActionRapport
return $y;
}
}
-
diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
index 710d996757c..afecc770fb9 100644
--- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php
@@ -37,7 +37,7 @@ class pdf_ban extends ModeleBankAccountDoc
{
var $emetteur; // Objet societe qui emet
var $version = 'development';
-
+
/**
* Constructor
*
@@ -55,7 +55,7 @@ class pdf_ban extends ModeleBankAccountDoc
$this->db = $db;
$this->name = "ban";
$this->description = $langs->trans("DocumentModelBan").' (Volunteer wanted to finish)';
-
+
// Dimension page pour format A4
$this->type = 'pdf';
$formatarray=pdf_getFormat();
@@ -92,6 +92,7 @@ class pdf_ban extends ModeleBankAccountDoc
* @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs)
{
global $conf, $hookmanager, $langs, $user;
@@ -99,7 +100,7 @@ class pdf_ban extends ModeleBankAccountDoc
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
@@ -119,7 +120,7 @@ class pdf_ban extends ModeleBankAccountDoc
$dir = $conf->bank->dir_output . "/" . $objectref;
$file = $dir . "/" . $objectref . ".pdf";
}
-
+
if (! file_exists($dir))
{
if (dol_mkdir($dir) < 0)
@@ -208,9 +209,9 @@ class pdf_ban extends ModeleBankAccountDoc
$pdf->SetXY($this->marge_gauche, $curY);
$pdf->MultiCell(200, 3, $outputlangs->trans("BAN").' : '.$object->account_number, 0, 'L');
-
-
-
+
+
+
// Show square
if ($pagenb == 1)
{
@@ -248,7 +249,7 @@ class pdf_ban extends ModeleBankAccountDoc
@chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file);
-
+
return 1; // Pas d'erreur
}
else
@@ -388,4 +389,3 @@ class pdf_ban extends ModeleBankAccountDoc
}
}
-
diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
index 2061b03d2ae..cc501124922 100644
--- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
+++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php
@@ -37,7 +37,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
{
var $emetteur; // Objet societe qui emet
var $version = 'dolibarr';
-
+
/**
* Constructor
*
@@ -46,7 +46,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "bank", "withdrawals", "companies"));
@@ -95,6 +95,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param null|array $moreparams More parameters
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
{
global $conf, $hookmanager, $langs, $user, $mysoc;
@@ -102,10 +103,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Translations
$outputlangs->loadLangs(array("main", "dict", "withdrawals", "companies", "projects", "bills"));
-
+
if (! empty($conf->bank->dir_output))
{
//$nblignes = count($object->lines); // This is set later with array of tasks
@@ -124,7 +125,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
else $dir = $conf->bank->dir_output . "/" . $objectref;
$file = $dir . "/" . $langs->transnoentitiesnoconv("SepaMandateShort").' '.$objectref . "-".dol_sanitizeFileName($object->rum).".pdf";
}
-
+
if (! file_exists($dir))
{
if (dol_mkdir($dir) < 0)
@@ -212,55 +213,55 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$nexY = $tab_top + 7;
$posY = $curY;
-
+
$pdf->SetFont('','', $default_font_size);
-
+
$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
$posY+=2;
-
+
$pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("RUMLong").' ('.$outputlangs->transnoentitiesnoconv("RUM").')'.' : '.$object->rum, 0, 'L');
-
+
$posY=$pdf->GetY();
$posY+=2;
$pdf->SetXY($this->marge_gauche, $posY);
$ics='';
if (! empty($conf->global->PRELEVEMENT_ICS)) $ics=$conf->global->PRELEVEMENT_ICS;
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").')'.' : '.$ics, 0, 'L');
-
+
$posY=$pdf->GetY();
$posY+=1;
$pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorName").' : '.$mysoc->name, 0, 'L');
-
+
$posY=$pdf->GetY();
$posY+=1;
$pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("Address").' : ', 0, 'L');
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $mysoc->getFullAddress(), 0, 'L');
-
+
$posY=$pdf->GetY();
$posY+=3;
-
+
$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
-
+
$pdf->SetFont('','', $default_font_size - 1);
-
+
$posY+=8;
$pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 8, $outputlangs->transnoentitiesnoconv("SEPALegalText", $mysoc->name, $mysoc->name), 0, 'L');
-
+
// Your data form
$posY=$pdf->GetY();
$posY+=8;
$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
$posY+=2;
-
+
$pdf->SetFont('','', $default_font_size);
-
+
$pdf->SetXY($this->marge_gauche, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFillForm"), 0, 'C');
-
+
$thirdparty=new Societe($this->db);
if ($object->socid > 0) $thirdparty->fetch($object->socid);
@@ -275,7 +276,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourName").' * : ', 0, 'L');
$pdf->SetXY(80, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $sepaname, 0, 'L');
-
+
$address = '______________________________________________';
if ($thirdparty->id > 0)
{
@@ -293,7 +294,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->SetXY(80, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $address, 0, 'L');
}
-
+
$ban = '__________________________________________________';
if (! empty($object->iban)) $ban = $object->iban;
$posY=$pdf->GetY();
@@ -302,7 +303,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourBAN").' * : ', 0, 'L');
$pdf->SetXY(80, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $ban, 0, 'L');
-
+
$bic = '__________________________________________________';
if (! empty($object->bic)) $bic = $object->bic;
$posY=$pdf->GetY();
@@ -311,8 +312,8 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("SEPAFormYourBIC").' * : ', 0, 'L');
$pdf->SetXY(80, $posY);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $bic, 0, 'L');
-
-
+
+
$posY=$pdf->GetY();
$posY+=1;
$pdf->SetXY($this->marge_gauche, $posY);
@@ -338,13 +339,13 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$txt = '('.$langs->transnoentitiesnoconv("PleaseCheckOne").')';
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $txt, 0, 'L');
}
-
+
$posY=$pdf->GetY();
$posY+=3;
$pdf->line($this->marge_gauche, $posY, $this->page_largeur - $this->marge_droite, $posY);
$posY+=3;
-
-
+
+
// Show square
if ($pagenb == 1)
{
@@ -362,10 +363,10 @@ class pdf_sepamandate extends ModeleBankAccountDoc
var_dump($heightforfreetext);
var_dump($heightforfooter);
var_dump($bottomlasttab);*/
-
+
// Affiche zone infos
$posy=$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
-
+
/*
* Pied de page
*/
@@ -391,7 +392,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
@chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file);
-
+
return 1; // Pas d'erreur
}
else
@@ -426,7 +427,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
}
-
+
/**
* Show miscellaneous information (payment mode, payment term, ...)
*
@@ -436,32 +437,33 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param Translate $outputlangs Langs object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
global $conf, $mysoc;
-
+
$default_font_size = pdf_getPDFFontSize($outputlangs);
-
+
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?1:$conf->global->PDF_DIFFSIZE_TITLE);
$posy+=$this->_signature_area($pdf, $object, $posy, $outputlangs);
-
+
$pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('','', $default_font_size);
$pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("PleaseReturnMandate", $mysoc->email).':', 0, 'L', 0);
$posy=$pdf->GetY()+2;
-
+
$pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('','', $default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 6, $mysoc->name, 0, 'L', 0);
$pdf->MultiCell(100, 6, $outputlangs->convToOutputCharset($mysoc->getFullAddress()), 0, 'L', 0);
$posy=$pdf->GetY()+2;
-
+
return $posy;
}
-
-
-
+
+
+
/**
* Show area for the customer to sign
*
@@ -471,21 +473,22 @@ class pdf_sepamandate extends ModeleBankAccountDoc
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _signature_area(&$pdf, $object, $posy, $outputlangs)
{
$default_font_size = pdf_getPDFFontSize($outputlangs);
$tab_top = $posy + 4;
$tab_hl = 4;
-
+
$posx = $this->marge_gauche;
$pdf->SetXY($posx, $tab_top + 0);
-
+
$pdf->SetFont('','', $default_font_size - 2);
-
+
$pdf->MultiCell(100, 3, $outputlangs->transnoentitiesnoconv("DateOfSignature"), 0, 'L', 0);
$pdf->MultiCell(100, 3, ' ');
$pdf->MultiCell(100, 3, '______________________', 0, 'L', 0);
-
+
$posx = 120;
$largcol = ($this->page_largeur - $this->marge_droite - $posx);
$useborder=0;
@@ -494,14 +497,14 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->SetFillColor(255,255,255);
$pdf->SetXY($posx, $tab_top + 0);
$pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentitiesnoconv("Signature"), 0, 'L', 1);
-
+
$pdf->SetXY($posx, $tab_top + $tab_hl);
$pdf->MultiCell($largcol, $tab_hl*3, '', 1, 'R');
-
+
return ($tab_hl*7);
}
-
-
+
+
/**
* Show top header of page.
*
@@ -612,4 +615,3 @@ class pdf_sepamandate extends ModeleBankAccountDoc
}
}
-
diff --git a/htdocs/core/modules/bank/modules_bank.php b/htdocs/core/modules/bank/modules_bank.php
index b0a121d7dc5..91ab575b7ca 100644
--- a/htdocs/core/modules/bank/modules_bank.php
+++ b/htdocs/core/modules/bank/modules_bank.php
@@ -40,18 +40,18 @@ abstract class ModeleBankAccountDoc extends CommonDocGenerator
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
- */
- static function liste_modeles($db,$maxfilenamelength=0)
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ static function liste_modeles($db, $maxfilenamelength=0)
{
global $conf;
- $type='bankaccount';
- $liste=array();
+ $type = 'bankaccount';
+ $list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $liste=getListOfModels($db,$type,$maxfilenamelength);
+ $list = getListOfModels($db, $type, $maxfilenamelength);
- return $liste;
+ return $list;
}
}
-
diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php
index 3e233eb1843..5453123ecff 100644
--- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php
+++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php
@@ -224,13 +224,14 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
/**
- * Return if a code is used (by other element)
+ * Return if a code is used (by other element)
*
- * @param DoliDB $db Handler acces base
- * @param string $code Code to check
- * @param Product $product Objet product
- * @return int 0 if available, <0 if KO
+ * @param DoliDB $db Handler acces base
+ * @param string $code Code to check
+ * @param Product $product Objet product
+ * @return int 0 if available, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_dispo($db, $code, $product)
{
$sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."product";
@@ -263,6 +264,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
* @param string $typefortest Type of barcode (ISBN, EAN, ...)
* @return int 0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_syntax($codefortest, $typefortest)
{
global $conf;
@@ -302,4 +304,3 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode
}
}
-
diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
index c159a7af925..464bd7eed05 100644
--- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
+++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php
@@ -44,7 +44,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Load traductions files requiredby by page
$langs->loadLangs(array("main", "bills"));
@@ -77,12 +77,13 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
/**
* Fonction to generate document on disk
*
- * @param RemiseCheque $object Object RemiseCheque
+ * @param RemiseCheque $object Object RemiseCheque
* @param string $_dir Directory
* @param string $number Number
* @param Translate $outputlangs Lang output object
* @return int 1=ok, 0=ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object, $_dir, $number, $outputlangs)
{
global $user,$conf,$langs,$hookmanager;
@@ -91,7 +92,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
$sav_charset_output=$outputlangs->charset_output;
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "companies", "bills", "products", "compta"));
@@ -191,7 +192,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
@chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file);
-
+
$outputlangs->charset_output=$sav_charset_output;
return 1; // Pas d'erreur
}
@@ -206,11 +207,12 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param Translate $outputlangs Object language for output
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Header(&$pdf, $page, $pages, $outputlangs)
{
global $langs;
$default_font_size = pdf_getPDFFontSize($outputlangs);
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("compta", "banks"));
@@ -312,6 +314,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param Translate $outputlangs Object lang
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Body(&$pdf, $pagenb, $pages, $outputlangs)
{
// x=10 - Num
@@ -384,7 +387,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
{
$newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray);
}
-
+
return pdf_pagefoot($pdf,$outputlangs,$newfreetext,$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php
index 680357ce9bb..ac30024c924 100644
--- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php
+++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php
@@ -142,6 +142,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
* @param string $objforref Object for number to search
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function chequereceipt_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
index 69ee2ff2b73..eba953d63a7 100644
--- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
+++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
@@ -131,10 +131,10 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
* @param string $objforref Object for number to search
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function chequereceipt_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
}
}
-
diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php
index bbf20761f5f..b51a70992df 100644
--- a/htdocs/core/modules/cheque/modules_chequereceipts.php
+++ b/htdocs/core/modules/cheque/modules_chequereceipts.php
@@ -115,7 +115,7 @@ abstract class ModeleNumRefChequeReceipts
/**
* \class ModeleChequeReceipts
- * \brief Classe mere des modeles de
+ * \brief Classe mere des modeles de
*/
abstract class ModeleChequeReceipts extends CommonDocGenerator
{
@@ -128,6 +128,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -209,4 +210,3 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
return -1;
}
}
-
diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
index 4c8b4ba2dc5..17146eaa9ab 100644
--- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
+++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php
@@ -188,6 +188,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -496,4 +497,3 @@ class doc_generic_order_odt extends ModelePDFCommandes
}
}
-
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index c3a5d143c48..40203247804 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -77,42 +77,42 @@ class pdf_einstein extends ModelePDFCommandes
* @public string
*/
public $version = 'dolibarr';
-
+
/**
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
@@ -213,6 +213,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object, $outputlangs, $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
{
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes;
@@ -652,6 +653,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
@@ -667,6 +669,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param Translate $outputlangs Langs object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@@ -854,6 +857,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -1443,4 +1447,3 @@ class pdf_einstein extends ModelePDFCommandes
}
}
-
diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php
index 918b338aa12..88fae0a3c53 100644
--- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php
@@ -75,4 +75,3 @@ class pdf_proforma extends pdf_einstein
}
}
-
diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php
index 9941811006b..1adbf255a9c 100644
--- a/htdocs/core/modules/commande/mod_commande_marbre.php
+++ b/htdocs/core/modules/commande/mod_commande_marbre.php
@@ -142,6 +142,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes
* @param string $objforref Object for number to search
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function commande_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php
index 2c8ae2ef3e9..f0d92237e00 100644
--- a/htdocs/core/modules/commande/mod_commande_saphir.php
+++ b/htdocs/core/modules/commande/mod_commande_saphir.php
@@ -139,10 +139,10 @@ class mod_commande_saphir extends ModeleNumRefCommandes
* @param string $objforref Object for number to search
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function commande_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
}
}
-
diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php
index aa6da728f56..4dffcdbc236 100644
--- a/htdocs/core/modules/commande/modules_commande.php
+++ b/htdocs/core/modules/commande/modules_commande.php
@@ -48,17 +48,18 @@ abstract class ModelePDFCommandes extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
- static function liste_modeles($db,$maxfilenamelength=0)
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ static function liste_modeles($db, $maxfilenamelength=0)
{
global $conf;
- $type='order';
- $liste=array();
+ $type = 'order';
+ $list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $liste=getListOfModels($db,$type,$maxfilenamelength);
+ $list = getListOfModels($db, $type, $maxfilenamelength);
- return $liste;
+ return $list;
}
}
@@ -146,4 +147,4 @@ abstract class ModeleNumRefCommandes
if ($this->version) return $this->version;
return $langs->trans("NotAvailable");
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
index cd96e880d27..6fa66409023 100644
--- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
+++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php
@@ -178,6 +178,7 @@ class doc_generic_contract_odt extends ModelePDFContract
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -479,4 +480,3 @@ class doc_generic_contract_odt extends ModelePDFContract
}
}
-
diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
index f43ec0907ca..fd4944fd335 100644
--- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php
+++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php
@@ -43,17 +43,17 @@ class pdf_strato extends ModelePDFContract
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
@@ -63,8 +63,8 @@ class pdf_strato extends ModelePDFContract
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
@@ -75,32 +75,32 @@ class pdf_strato extends ModelePDFContract
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
@@ -170,6 +170,7 @@ class pdf_strato extends ModelePDFContract
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$hookmanager,$mysoc;
@@ -177,7 +178,7 @@ class pdf_strato extends ModelePDFContract
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Translations
$outputlangs->loadLangs(array("main", "dict", "companies", "contracts"));
@@ -537,9 +538,9 @@ class pdf_strato extends ModelePDFContract
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
-
+
$default_font_size = pdf_getPDFFontSize($outputlangs);
-
+
// Translations
$outputlangs->loadLangs(array("main", "dict", "contract", "companies"));
@@ -721,4 +722,3 @@ class pdf_strato extends ModelePDFContract
}
}
-
diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php
index 54da8fc55c4..6f99672fe48 100644
--- a/htdocs/core/modules/contract/mod_contract_magre.php
+++ b/htdocs/core/modules/contract/mod_contract_magre.php
@@ -124,10 +124,10 @@ class mod_contract_magre extends ModelNumRefContracts
* @param Object $objforref contract object
* @return string Value if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function contract_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
}
}
-
diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php
index 5dcb8a72baa..4febe6bd9e2 100644
--- a/htdocs/core/modules/contract/mod_contract_serpis.php
+++ b/htdocs/core/modules/contract/mod_contract_serpis.php
@@ -139,6 +139,7 @@ class mod_contract_serpis extends ModelNumRefContracts
* @param Object $objforref contract object
* @return string Value if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function contract_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php
index 47a882b7b56..5fd1fee8ee5 100644
--- a/htdocs/core/modules/contract/modules_contract.php
+++ b/htdocs/core/modules/contract/modules_contract.php
@@ -47,6 +47,7 @@ abstract class ModelePDFContract extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php
index c9d2b4984ad..bc57ec97b8e 100644
--- a/htdocs/core/modules/dons/html_cerfafr.modules.php
+++ b/htdocs/core/modules/dons/html_cerfafr.modules.php
@@ -72,6 +72,7 @@ class html_cerfafr extends ModeleDon
* @param string $currency Currency code
* @return int >0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($don,$outputlangs,$currency='')
{
global $user,$conf,$langs,$mysoc;
@@ -278,6 +279,7 @@ class html_cerfafr extends ModeleDon
}
}
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function chiffre_en_lettre($montant, $devise1='', $devise2='')
{
if(empty($devise1)) $dev1='euros';
diff --git a/htdocs/core/modules/dons/modules_don.php b/htdocs/core/modules/dons/modules_don.php
index 4949cce94e1..b0bc1bdb96b 100644
--- a/htdocs/core/modules/dons/modules_don.php
+++ b/htdocs/core/modules/dons/modules_don.php
@@ -43,6 +43,7 @@ abstract class ModeleDon extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -138,4 +139,3 @@ abstract class ModeleNumRefDons
return $langs->trans("NotAvailable");
}
}
-
diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
index 9c45c135ac3..c172ced1b17 100644
--- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
+++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php
@@ -188,6 +188,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -537,4 +538,3 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
}
}
-
diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
index c4c665de56d..562ae61c14b 100644
--- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php
@@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
/**
- * Class to build sending documents with model Merou
+ * Class to build sending documents with model Merou
*/
class pdf_merou extends ModelePdfExpedition
{
@@ -41,17 +41,17 @@ class pdf_merou extends ModelePdfExpedition
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
@@ -61,8 +61,8 @@ class pdf_merou extends ModelePdfExpedition
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
@@ -73,37 +73,37 @@ class pdf_merou extends ModelePdfExpedition
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
@@ -153,6 +153,7 @@ class pdf_merou extends ModelePdfExpedition
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file(&$object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$conf,$langs,$mysoc,$hookmanager;
@@ -162,10 +163,10 @@ class pdf_merou extends ModelePdfExpedition
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Translations
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
-
+
if ($conf->expedition->dir_output)
{
$object->fetch_thirdparty();
@@ -331,7 +332,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->SetDrawColor(120,120,120);
$pdf->Rect(10+3, $curY, 3, 3);
$pdf->Rect(20+3, $curY, 3, 3);
-
+
//Insertion de la reference du produit
$pdf->SetXY(30, $curY);
$pdf->SetFont('','B', $default_font_size - 3);
@@ -424,7 +425,7 @@ class pdf_merou extends ModelePdfExpedition
@chmod($file, octdec($conf->global->MAIN_UMASK));
$this->result = array('fullpath'=>$file);
-
+
return 1;
}
else
@@ -456,7 +457,7 @@ class pdf_merou extends ModelePdfExpedition
{
global $langs;
$default_font_size = pdf_getPDFFontSize($outputlangs);
-
+
// Translations
$langs->loadLangs(array("main", "bills"));
diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
index aad7fd07c1b..46d05ea0a57 100644
--- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php
@@ -40,17 +40,17 @@ class pdf_rouget extends ModelePdfExpedition
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
@@ -60,8 +60,8 @@ class pdf_rouget extends ModelePdfExpedition
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
@@ -72,37 +72,37 @@ class pdf_rouget extends ModelePdfExpedition
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
@@ -184,6 +184,7 @@ class pdf_rouget extends ModelePdfExpedition
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$conf,$langs,$hookmanager;
@@ -193,7 +194,7 @@ class pdf_rouget extends ModelePdfExpedition
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Translations
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
@@ -661,6 +662,7 @@ class pdf_rouget extends ModelePdfExpedition
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -1100,4 +1102,3 @@ class pdf_rouget extends ModelePdfExpedition
}
}
-
diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php
index c002da1eee2..d756f9dd3c9 100644
--- a/htdocs/core/modules/expedition/mod_expedition_ribera.php
+++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php
@@ -128,10 +128,10 @@ class mod_expedition_ribera extends ModelNumRefExpedition
* @param Object $objforref Shipment object
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function expedition_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
}
}
-
diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php
index 826ba6665c4..47d51e3cde5 100644
--- a/htdocs/core/modules/expedition/mod_expedition_safor.php
+++ b/htdocs/core/modules/expedition/mod_expedition_safor.php
@@ -137,6 +137,7 @@ class mod_expedition_safor extends ModelNumRefExpedition
* @param Object $objforref Shipment object
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function expedition_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php
index f46fa33c5f1..e42045ca54f 100644
--- a/htdocs/core/modules/expedition/modules_expedition.php
+++ b/htdocs/core/modules/expedition/modules_expedition.php
@@ -46,6 +46,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
index 539830cdc71..0734fd501dd 100644
--- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
@@ -52,7 +52,7 @@ class pdf_standard extends ModeleExpenseReport
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
@@ -62,8 +62,8 @@ class pdf_standard extends ModeleExpenseReport
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
@@ -74,37 +74,37 @@ class pdf_standard extends ModeleExpenseReport
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
@@ -120,7 +120,7 @@ class pdf_standard extends ModeleExpenseReport
function __construct($db)
{
global $conf, $langs, $mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "trips", "projects"));
@@ -201,6 +201,7 @@ class pdf_standard extends ModeleExpenseReport
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
@@ -208,7 +209,7 @@ class pdf_standard extends ModeleExpenseReport
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Translations
$outputlangs->loadLangs(array("main", "trips", "projects", "dict"));
@@ -567,7 +568,7 @@ class pdf_standard extends ModeleExpenseReport
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs,$hookmanager;
-
+
// Translations
$outputlangs->loadLangs(array("main", "trips", "companies"));
@@ -919,4 +920,3 @@ class pdf_standard extends ModeleExpenseReport
}
}
-
diff --git a/htdocs/core/modules/expensereport/modules_expensereport.php b/htdocs/core/modules/expensereport/modules_expensereport.php
index e97766b38f6..6490570386c 100644
--- a/htdocs/core/modules/expensereport/modules_expensereport.php
+++ b/htdocs/core/modules/expensereport/modules_expensereport.php
@@ -28,11 +28,12 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
/**
* Return list of active generation modules
- *
+ *
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -61,6 +62,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
* @param int $hideref Hide ref
* @return int 0 if KO, 1 if OK
*/
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{
return $object->generateDocument($modele, $outputlangs, $hidedetails, $hidedesc, $hideref);
diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php
index 8d35ff63225..7a8e7c2fba1 100644
--- a/htdocs/core/modules/export/export_csv.modules.php
+++ b/htdocs/core/modules/export/export_csv.modules.php
@@ -149,6 +149,7 @@ class ExportCsv extends ModeleExports
* @param Translate $outputlangs Output language object
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function open_file($file,$outputlangs)
{
global $langs;
@@ -175,6 +176,7 @@ class ExportCsv extends ModeleExports
* @param Translate $outputlangs Output language object
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_header($outputlangs)
{
return 0;
@@ -190,6 +192,7 @@ class ExportCsv extends ModeleExports
* @param array $array_types Array with types of fields
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
{
global $conf;
@@ -224,6 +227,7 @@ class ExportCsv extends ModeleExports
* @param array $array_types Array with types of fields
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
{
global $conf;
@@ -258,7 +262,7 @@ class ExportCsv extends ModeleExports
$array = $array['options'];
$newvalue = $array[$newvalue];
}
-
+
fwrite($this->handle,$newvalue.$this->separator);
$this->col++;
}
@@ -273,6 +277,7 @@ class ExportCsv extends ModeleExports
* @param Translate $outputlangs Output language object
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_footer($outputlangs)
{
return 0;
@@ -283,6 +288,7 @@ class ExportCsv extends ModeleExports
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function close_file()
{
fclose($this->handle);
@@ -303,14 +309,14 @@ class ExportCsv extends ModeleExports
{
global $conf;
$addquote=0;
-
+
// Rule Dolibarr: No HTML
//print $charset.' '.$newvalue."\n";
//$newvalue=dol_string_nohtmltag($newvalue,0,$charset);
$newvalue=dol_htmlcleanlastbr($newvalue);
//print $charset.' '.$newvalue."\n";
-
+
// Rule 1 CSV: No CR, LF in cells (except if USE_STRICT_CSV_RULES is on, we can keep record as it is but we must add quotes)
$oldvalue=$newvalue;
$newvalue=str_replace("\r",'',$newvalue);
@@ -321,7 +327,7 @@ class ExportCsv extends ModeleExports
$newvalue=$oldvalue;
$addquote=1;
}
-
+
// Rule 2 CSV: If value contains ", we must escape with ", and add "
if (preg_match('/"/',$newvalue))
{
@@ -339,4 +345,3 @@ class ExportCsv extends ModeleExports
}
}
-
diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php
index 00d06e8511a..57618b5e504 100644
--- a/htdocs/core/modules/export/export_excel.modules.php
+++ b/htdocs/core/modules/export/export_excel.modules.php
@@ -65,7 +65,7 @@ class ExportExcel extends ModeleExports
$this->version='1.30'; // Driver version
$this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
-
+
if (empty($this->disabled))
{
// If driver use an external library, put its name here
@@ -167,6 +167,7 @@ class ExportExcel extends ModeleExports
* @param Translate $outputlangs Output language object
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function open_file($file,$outputlangs)
{
global $user,$conf,$langs;
@@ -235,6 +236,7 @@ class ExportExcel extends ModeleExports
* @param Translate $outputlangs Object lang to translate values
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_header($outputlangs)
{
//$outputlangs->charset_output='ISO-8859-1'; // Because Excel 5 format is ISO
@@ -252,6 +254,7 @@ class ExportExcel extends ModeleExports
* @param array $array_types Array with types of fields
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
{
global $conf;
@@ -307,6 +310,7 @@ class ExportExcel extends ModeleExports
* @param array $array_types Array with types of fields
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
{
global $conf;
@@ -329,14 +333,14 @@ class ExportExcel extends ModeleExports
$newvalue=$this->excel_clean($newvalue);
$typefield=isset($array_types[$code])?$array_types[$code]:'';
-
+
if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7))
{
$array = unserialize($typefield);
$array = $array['options'];
$newvalue = $array[$newvalue];
}
-
+
// Traduction newvalue
if (preg_match('/^\((.*)\)$/i',$newvalue,$reg))
{
@@ -422,6 +426,7 @@ class ExportExcel extends ModeleExports
* @param Translate $outputlangs Output language object
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_footer($outputlangs)
{
return 0;
@@ -433,6 +438,7 @@ class ExportExcel extends ModeleExports
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function close_file()
{
global $conf;
@@ -459,6 +465,7 @@ class ExportExcel extends ModeleExports
* @param string $newvalue String to clean
* @return string Value cleaned
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function excel_clean($newvalue)
{
// Rule Dolibarr: No HTML
@@ -490,4 +497,3 @@ class ExportExcel extends ModeleExports
return $letter;
}
}
-
diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php
index df9fd9d5705..49118a8f293 100644
--- a/htdocs/core/modules/export/export_excel2007.modules.php
+++ b/htdocs/core/modules/export/export_excel2007.modules.php
@@ -65,7 +65,7 @@ class ExportExcel2007 extends ExportExcel
$this->version='1.30'; // Driver version
$this->disabled = (in_array(constant('PHPEXCEL_PATH'),array('disabled','disabled/'))?1:0); // A condition to disable module (used for native debian packages)
-
+
if (empty($this->disabled))
{
// If driver use an external library, put its name here
@@ -85,7 +85,7 @@ class ExportExcel2007 extends ExportExcel
$this->version_lib='1.8.0'; // No way to get info from library
}
}
-
+
$this->row=0;
}
@@ -95,6 +95,7 @@ class ExportExcel2007 extends ExportExcel
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function close_file()
{
global $conf;
@@ -115,4 +116,3 @@ class ExportExcel2007 extends ExportExcel
}
}
-
diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php
index 2945c5095b8..0600841f8b5 100644
--- a/htdocs/core/modules/export/export_tsv.modules.php
+++ b/htdocs/core/modules/export/export_tsv.modules.php
@@ -143,7 +143,8 @@ class ExportTsv extends ModeleExports
* @param string $file Path of filename to generate
* @param Translate $outputlangs Output language object
* @return int <0 if KO, >=0 if OK
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function open_file($file,$outputlangs)
{
global $langs;
@@ -170,6 +171,7 @@ class ExportTsv extends ModeleExports
* @param Translate $outputlangs Output language object
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_header($outputlangs)
{
return 0;
@@ -185,6 +187,7 @@ class ExportTsv extends ModeleExports
* @param array $array_types Array with types of fields
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_title($array_export_fields_label,$array_selected_sorted,$outputlangs,$array_types)
{
foreach($array_selected_sorted as $code => $value)
@@ -208,6 +211,7 @@ class ExportTsv extends ModeleExports
* @param array $array_types Array with types of fields
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_record($array_selected_sorted,$objp,$outputlangs,$array_types)
{
global $conf;
@@ -226,14 +230,14 @@ class ExportTsv extends ModeleExports
if (preg_match('/^\((.*)\)$/i',$newvalue,$reg)) $newvalue=$outputlangs->transnoentities($reg[1]);
$newvalue=$this->tsv_clean($newvalue,$outputlangs->charset_output);
-
+
if (preg_match('/^Select:/i', $typefield, $reg) && $typefield = substr($typefield, 7))
{
$array = unserialize($typefield);
$array = $array['options'];
$newvalue = $array[$newvalue];
}
-
+
fwrite($this->handle,$newvalue.$this->separator);
$this->col++;
}
@@ -247,6 +251,7 @@ class ExportTsv extends ModeleExports
* @param Translate $outputlangs Output language object
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_footer($outputlangs)
{
return 0;
@@ -257,6 +262,7 @@ class ExportTsv extends ModeleExports
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function close_file()
{
fclose($this->handle);
@@ -270,6 +276,7 @@ class ExportTsv extends ModeleExports
* @param string $charset Input AND Output character set
* @return string Value cleaned
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function tsv_clean($newvalue, $charset)
{
// Rule Dolibarr: No HTML
@@ -289,4 +296,3 @@ class ExportTsv extends ModeleExports
}
}
-
diff --git a/htdocs/core/modules/export/modules_export.php b/htdocs/core/modules/export/modules_export.php
index 5d7e0ecac84..a5203d8cf73 100644
--- a/htdocs/core/modules/export/modules_export.php
+++ b/htdocs/core/modules/export/modules_export.php
@@ -46,6 +46,7 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates (same content than array this->driverlabel)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_modeles($db,$maxfilenamelength=0)
{
dol_syslog(get_class($this)."::liste_modeles");
@@ -161,5 +162,3 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
}
}
-
-
diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
index 21c25913543..8a3974a632d 100644
--- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
+++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php
@@ -187,6 +187,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -504,4 +505,3 @@ class doc_generic_invoice_odt extends ModelePDFFactures
}
}
-
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index f7e7ca1d40f..6ae35bca776 100644
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -71,8 +71,8 @@ class pdf_crabe extends ModelePDFFactures
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
@@ -83,37 +83,37 @@ class pdf_crabe extends ModelePDFFactures
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
@@ -228,6 +228,7 @@ class pdf_crabe extends ModelePDFFactures
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
@@ -782,6 +783,7 @@ class pdf_crabe extends ModelePDFFactures
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@@ -923,6 +925,7 @@ class pdf_crabe extends ModelePDFFactures
* @param Translate $outputlangs Langs object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@@ -1081,6 +1084,7 @@ class pdf_crabe extends ModelePDFFactures
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -1843,4 +1847,3 @@ class pdf_crabe extends ModelePDFFactures
}
}
-
diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php
index b5d9a2397cc..bcd21fff431 100644
--- a/htdocs/core/modules/facture/modules_facture.php
+++ b/htdocs/core/modules/facture/modules_facture.php
@@ -46,6 +46,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 551b9ded2cb..841355acd1d 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -52,7 +52,7 @@ class pdf_soleil extends ModelePDFFicheinter
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
@@ -62,8 +62,8 @@ class pdf_soleil extends ModelePDFFicheinter
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
@@ -74,37 +74,37 @@ class pdf_soleil extends ModelePDFFicheinter
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
@@ -162,6 +162,7 @@ class pdf_soleil extends ModelePDFFicheinter
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
@@ -169,7 +170,7 @@ class pdf_soleil extends ModelePDFFicheinter
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Translations
$outputlangs->loadLangs(array("main", "interventions", "dict", "companies"));
@@ -552,7 +553,7 @@ class pdf_soleil extends ModelePDFFicheinter
{
global $conf,$langs;
$default_font_size = pdf_getPDFFontSize($outputlangs);
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "interventions"));
@@ -732,4 +733,3 @@ class pdf_soleil extends ModelePDFFicheinter
}
}
-
diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php
index 7e60a6aed4b..43bf23b4731 100644
--- a/htdocs/core/modules/fichinter/mod_pacific.php
+++ b/htdocs/core/modules/fichinter/mod_pacific.php
@@ -144,4 +144,3 @@ class mod_pacific extends ModeleNumRefFicheinter
}
}
-
diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php
index 8bcb2990bdb..56b57485837 100644
--- a/htdocs/core/modules/fichinter/modules_fichinter.php
+++ b/htdocs/core/modules/fichinter/modules_fichinter.php
@@ -44,6 +44,7 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -153,6 +154,7 @@ abstract class ModeleNumRefFicheinter
* @param int $hideref Hide ref
* @return int 0 if KO, 1 if OK
*/
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{
global $conf,$langs,$user;
@@ -238,4 +240,3 @@ function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails=0, $
return 0;
}
}
-
diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php
index a00c3825f47..afd9d35387c 100644
--- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php
+++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php
@@ -125,6 +125,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
* @param Object $objforref Holiday object
* @return string Value if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function holiday_get_num($fuser, $objforref)
{
return $this->getNextValue($fuser, $objforref);
diff --git a/htdocs/core/modules/holiday/mod_holiday_madonna.php b/htdocs/core/modules/holiday/mod_holiday_madonna.php
index 3b77230f77f..b36200ef9d4 100644
--- a/htdocs/core/modules/holiday/mod_holiday_madonna.php
+++ b/htdocs/core/modules/holiday/mod_holiday_madonna.php
@@ -140,6 +140,7 @@ class mod_holiday_madonna extends ModelNumRefHolidays
* @param Object $objforref Holiday object
* @return string Value if OK, 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function holiday_get_num($fuser,$objforref)
{
return $this->getNextValue($fuser,$objforref);
diff --git a/htdocs/core/modules/holiday/modules_holiday.php b/htdocs/core/modules/holiday/modules_holiday.php
index 7e7865c87e8..8e7ee2880c8 100644
--- a/htdocs/core/modules/holiday/modules_holiday.php
+++ b/htdocs/core/modules/holiday/modules_holiday.php
@@ -48,17 +48,18 @@ abstract class ModelePDFHoliday extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
- $type='contract';
- $liste=array();
+ $type = 'contract';
+ $list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $liste=getListOfModels($db,$type,$maxfilenamelength);
+ $list = getListOfModels($db, $type, $maxfilenamelength);
- return $liste;
+ return $list;
}
}
diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php
index a6473eaeb8e..db604a5159e 100644
--- a/htdocs/core/modules/import/import_csv.modules.php
+++ b/htdocs/core/modules/import/import_csv.modules.php
@@ -96,6 +96,7 @@ class ImportCsv extends ModeleImports
* @param Translate $outputlangs Output language
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_header_example($outputlangs)
{
return '';
@@ -108,6 +109,7 @@ class ImportCsv extends ModeleImports
* @param array $headerlinefields Array of fields name
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_title_example($outputlangs,$headerlinefields)
{
$s=join($this->separator,array_map('cleansep',$headerlinefields));
@@ -121,6 +123,7 @@ class ImportCsv extends ModeleImports
* @param array $contentlinevalues Array of lines
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_record_example($outputlangs,$contentlinevalues)
{
$s=join($this->separator,array_map('cleansep',$contentlinevalues));
@@ -133,6 +136,7 @@ class ImportCsv extends ModeleImports
* @param Translate $outputlangs Output language
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_footer_example($outputlangs)
{
return '';
@@ -146,6 +150,7 @@ class ImportCsv extends ModeleImports
* @param string $file Path of filename
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_open_file($file)
{
global $langs;
@@ -177,6 +182,7 @@ class ImportCsv extends ModeleImports
* @param string $file Path of filename
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_get_nb_of_lines($file)
{
return dol_count_nb_of_line($file);
@@ -188,6 +194,7 @@ class ImportCsv extends ModeleImports
*
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_read_header()
{
return 0;
@@ -199,6 +206,7 @@ class ImportCsv extends ModeleImports
*
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_read_record()
{
global $conf;
@@ -254,6 +262,7 @@ class ImportCsv extends ModeleImports
*
* @return integer
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_close_file()
{
fclose($this->handle);
@@ -272,6 +281,7 @@ class ImportCsv extends ModeleImports
* @param array $updatekeys Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor.
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys)
{
global $langs,$conf,$user;
@@ -629,8 +639,8 @@ class ImportCsv extends ModeleImports
}
} else {
// We have a last INSERT ID. Check if we have a row referencing this foreign key.
- // This is required when updating table with some extrafields. When inserting a record in parent table, we can make
- // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record
+ // This is required when updating table with some extrafields. When inserting a record in parent table, we can make
+ // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record
// may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid.
$sqlSelect = 'SELECT rowid FROM '.$tablename;
@@ -752,5 +762,3 @@ function cleansep($value)
{
return str_replace(array(',',';'),'/',$value);
};
-
-
diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php
index 7f222f523ca..75e9e0c5c7b 100644
--- a/htdocs/core/modules/import/import_xlsx.modules.php
+++ b/htdocs/core/modules/import/import_xlsx.modules.php
@@ -102,6 +102,7 @@ class ImportXlsx extends ModeleImports
* @param Translate $outputlangs Output language
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_header_example($outputlangs)
{
global $user,$conf,$langs;
@@ -134,6 +135,7 @@ class ImportXlsx extends ModeleImports
* @param array $headerlinefields Array of fields name
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_title_example($outputlangs,$headerlinefields)
{
global $conf;
@@ -158,6 +160,7 @@ class ImportXlsx extends ModeleImports
* @param array $contentlinevalues Array of lines
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_record_example($outputlangs,$contentlinevalues)
{
$col = 0;
@@ -176,6 +179,7 @@ class ImportXlsx extends ModeleImports
* @param Translate $outputlangs Output language
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_footer_example($outputlangs)
{
// return te file content as a string
@@ -198,6 +202,7 @@ class ImportXlsx extends ModeleImports
* @param string $file Path of filename
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_open_file($file)
{
global $langs;
@@ -220,6 +225,7 @@ class ImportXlsx extends ModeleImports
* @param string $file Path of filename
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_get_nb_of_lines($file)
{
$reader = new PHPExcel_Reader_Excel2007();
@@ -239,6 +245,7 @@ class ImportXlsx extends ModeleImports
*
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_read_header()
{
// This is not called by the import code !!!
@@ -256,6 +263,7 @@ class ImportXlsx extends ModeleImports
*
* @return Array Array of field values. Data are UTF8 encoded. [fieldpos] => (['val']=>val, ['type']=>-1=null,0=blank,1=not empty string)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_read_record()
{
global $conf;
@@ -279,6 +287,7 @@ class ImportXlsx extends ModeleImports
*
* @return integer
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_close_file()
{
$this->workbook->disconnectWorksheets();
@@ -297,7 +306,8 @@ class ImportXlsx extends ModeleImports
* @param array $updatekeys Array of keys to use to try to do an update first before insert. This field are defined into the module descriptor.
* @return int <0 if KO, >0 if OK
*/
- // What is this doing here ? it is common to all imports, is should be in the parent class
+ // What is this doing here ? it is common to all imports, is should be in the parent class
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function import_insert($arrayrecord,$array_match_file_to_database,$objimport,$maxfields,$importid,$updatekeys)
{
global $langs,$conf,$user;
@@ -653,8 +663,8 @@ class ImportXlsx extends ModeleImports
}
} else {
// We have a last INSERT ID. Check if we have a row referencing this foreign key.
- // This is required when updating table with some extrafields. When inserting a record in parent table, we can make
- // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record
+ // This is required when updating table with some extrafields. When inserting a record in parent table, we can make
+ // a direct insert into subtable extrafields, but when me wake an update, the insertid is defined and the child record
// may already exists. So we rescan the extrafield table to be know if record exists or not for the rowid.
$sqlSelect = 'SELECT rowid FROM '.$tablename;
diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php
index 548bb128193..40f78540dc8 100644
--- a/htdocs/core/modules/import/modules_import.php
+++ b/htdocs/core/modules/import/modules_import.php
@@ -138,6 +138,7 @@ class ModeleImports
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_modeles($db,$maxfilenamelength=0)
{
dol_syslog(get_class($this)."::liste_modeles");
@@ -248,4 +249,3 @@ class ModeleImports
}
}
-
diff --git a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
index f3329fa9b18..9906d2c1660 100644
--- a/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
+++ b/htdocs/core/modules/livraison/doc/pdf_typhon.modules.php
@@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
/**
- * Class to build Delivery Order documents with typhon model
+ * Class to build Delivery Order documents with typhon model
*/
class pdf_typhon extends ModelePDFDeliveryOrder
{
@@ -43,69 +43,69 @@ class pdf_typhon extends ModelePDFDeliveryOrder
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
public $type;
-
+
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
-
+
/**
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
@@ -120,7 +120,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "bills", "sendings", "companies"));
@@ -185,6 +185,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -192,7 +193,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Translations
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "sendings", "deliveries"));
@@ -638,6 +639,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
* @param Translate $outputlangs Langs object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -953,4 +955,3 @@ class pdf_typhon extends ModelePDFDeliveryOrder
}
}
-
diff --git a/htdocs/core/modules/livraison/mod_livraison_jade.php b/htdocs/core/modules/livraison/mod_livraison_jade.php
index 228b73aad8b..c09ef660dff 100644
--- a/htdocs/core/modules/livraison/mod_livraison_jade.php
+++ b/htdocs/core/modules/livraison/mod_livraison_jade.php
@@ -149,6 +149,7 @@ class mod_livraison_jade extends ModeleNumRefDeliveryOrder
* @param Object $object Object livraison
* @return string Texte descripif
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function livraison_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$object);
diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php
index 1192656bf8d..ed36e396182 100644
--- a/htdocs/core/modules/livraison/mod_livraison_saphir.php
+++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php
@@ -146,10 +146,10 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
* @param Object $object Objet livraison
* @return string Texte descripif
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function livraison_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$object);
}
}
-
diff --git a/htdocs/core/modules/livraison/modules_livraison.php b/htdocs/core/modules/livraison/modules_livraison.php
index a433f42930d..9c15b337f9f 100644
--- a/htdocs/core/modules/livraison/modules_livraison.php
+++ b/htdocs/core/modules/livraison/modules_livraison.php
@@ -45,6 +45,7 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php
index 78aab1a5bd7..b02c943cda0 100644
--- a/htdocs/core/modules/mailings/advthirdparties.modules.php
+++ b/htdocs/core/modules/mailings/advthirdparties.modules.php
@@ -57,6 +57,7 @@ class mailing_advthirdparties extends MailingTargets
* @param array $contactid Array of contact id to add
* @return int <0 if error, number of emails added if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target_spec($mailing_id,$socid,$type_of_target, $contactid)
{
global $conf, $langs;
diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php
index 90d81dca4a5..5b2ccd047fe 100644
--- a/htdocs/core/modules/mailings/contacts1.modules.php
+++ b/htdocs/core/modules/mailings/contacts1.modules.php
@@ -331,6 +331,7 @@ class mailing_contacts1 extends MailingTargets
* @param array $filtersarray Optional filter data (deprecated)
* @return int <0 si erreur, nb ajout si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
global $conf, $langs;
@@ -448,4 +449,3 @@ class mailing_contacts1 extends MailingTargets
}
}
-
diff --git a/htdocs/core/modules/mailings/example.modules.php b/htdocs/core/modules/mailings/example.modules.php
index 548510f81a0..3fa9b2687cf 100644
--- a/htdocs/core/modules/mailings/example.modules.php
+++ b/htdocs/core/modules/mailings/example.modules.php
@@ -32,9 +32,9 @@ class mailing_example extends MailingTargets
var $desc='Put here a description';
// CHANGE THIS: Set to 1 if selector is available for admin users only
var $require_admin=0;
- // CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector
+ // CHANGE THIS: Add a tooltip language key to add a tooltip help icon after the email target selector
var $tooltip='MyTooltipLangKey';
-
+
var $require_module=array();
var $picto='';
var $db;
@@ -59,6 +59,7 @@ class mailing_example extends MailingTargets
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
* @return int <0 if error, number of emails added if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
$target = array();
@@ -144,4 +145,3 @@ class mailing_example extends MailingTargets
}
}
-
diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php
index f71b6b925f0..ace612356c8 100644
--- a/htdocs/core/modules/mailings/fraise.modules.php
+++ b/htdocs/core/modules/mailings/fraise.modules.php
@@ -223,6 +223,7 @@ class mailing_fraise extends MailingTargets
* @param array $filtersarray Param to filter sql request. Deprecated. Should use $_POST instead.
* @return int < 0 si erreur, nb ajout si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
// Deprecation warning
diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php
index 1a97f3502b7..3cd509cd8cb 100644
--- a/htdocs/core/modules/mailings/modules_mailings.php
+++ b/htdocs/core/modules/mailings/modules_mailings.php
@@ -34,7 +34,7 @@ class MailingTargets // This can't be abstract as it is used for some method
var $db;
var $error;
var $tooltip='';
-
+
/**
* Constructor
@@ -54,7 +54,7 @@ class MailingTargets // This can't be abstract as it is used for some method
function getDesc()
{
global $langs, $form;
-
+
$langs->load("mails");
$transstring="MailingModuleDesc".$this->name;
$s='';
@@ -115,6 +115,7 @@ class MailingTargets // This can't be abstract as it is used for some method
* @param int $mailing_id Id of emailing
* @return int < 0 si erreur, nb destinataires si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_nb($mailing_id)
{
// Mise a jour nombre de destinataire dans table des mailings
@@ -148,6 +149,7 @@ class MailingTargets // This can't be abstract as it is used for some method
* @param array $cibles Array with targets
* @return int < 0 si erreur, nb ajout si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id, $cibles)
{
global $conf;
@@ -230,6 +232,7 @@ class MailingTargets // This can't be abstract as it is used for some method
* @param int $mailing_id Id of emailing
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function clear_target($mailing_id)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles";
@@ -244,4 +247,3 @@ class MailingTargets // This can't be abstract as it is used for some method
}
}
-
diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php
index 5824f456365..2dc2cae5048 100644
--- a/htdocs/core/modules/mailings/pomme.modules.php
+++ b/htdocs/core/modules/mailings/pomme.modules.php
@@ -118,7 +118,7 @@ class mailing_pomme extends MailingTargets
$s.='';
$s.='';
$s.='';
-
+
$s.=' ';
$s.=$langs->trans("Employee").': ';
$s.='';
-
+
return $s;
}
@@ -150,13 +150,14 @@ class mailing_pomme extends MailingTargets
* @param array $filtersarray Requete sql de selection des destinataires
* @return int < 0 si erreur, nb ajout si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
// Deprecation warning
if ($filtersarray) {
dol_syslog(__METHOD__ . ": filtersarray parameter is deprecated", LOG_WARNING);
}
-
+
global $conf, $langs;
$langs->load("companies");
@@ -169,10 +170,10 @@ class mailing_pomme extends MailingTargets
$sql.= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test
$sql.= " AND u.entity IN (0,".$conf->entity.")";
$sql.= " AND u.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
- if (isset($_POST["filter"]) && $_POST["filter"] == '1') $sql.= " AND u.statut=1";
- if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND u.statut=0";
- if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '1') $sql.= " AND u.employee=1";
- if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '0') $sql.= " AND u.employee=0";
+ if (isset($_POST["filter"]) && $_POST["filter"] == '1') $sql.= " AND u.statut=1";
+ if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND u.statut=0";
+ if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '1') $sql.= " AND u.employee=1";
+ if (isset($_POST["filteremployee"]) && $_POST["filteremployee"] == '0') $sql.= " AND u.employee=0";
$sql.= " ORDER BY u.email";
// Stocke destinataires dans cibles
@@ -222,4 +223,3 @@ class mailing_pomme extends MailingTargets
}
}
-
diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php
index 57a69475000..8c86ea6d1a9 100644
--- a/htdocs/core/modules/mailings/thirdparties.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties.modules.php
@@ -55,6 +55,7 @@ class mailing_thirdparties extends MailingTargets
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
* @return int <0 if error, number of emails added if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
global $conf, $langs;
@@ -321,4 +322,3 @@ class mailing_thirdparties extends MailingTargets
}
}
-
diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
index 08473f3cb6d..b4592591f9a 100644
--- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
+++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
@@ -80,6 +80,7 @@ class mailing_thirdparties_services_expired extends MailingTargets
* @param array $filtersarray If you used the formFilter function. Empty otherwise.
* @return int <0 if error, number of emails added if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
$target = array();
@@ -238,4 +239,3 @@ class mailing_thirdparties_services_expired extends MailingTargets
}
}
-
diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php
index 152322c2899..141b334ef21 100644
--- a/htdocs/core/modules/mailings/xinputfile.modules.php
+++ b/htdocs/core/modules/mailings/xinputfile.modules.php
@@ -117,6 +117,7 @@ class mailing_xinputfile extends MailingTargets
* @param array $filtersarray Requete sql de selection des destinataires
* @return int < 0 si erreur, nb ajout si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
global $conf,$langs,$_FILES;
@@ -222,4 +223,3 @@ class mailing_xinputfile extends MailingTargets
}
}
-
diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php
index 794de3d9294..dbbdba7efa3 100644
--- a/htdocs/core/modules/mailings/xinputuser.modules.php
+++ b/htdocs/core/modules/mailings/xinputuser.modules.php
@@ -37,7 +37,7 @@ class mailing_xinputuser extends MailingTargets
var $require_admin=0; // Module mailing actif pour user admin ou non
var $picto='generic';
var $tooltip='UseFormatInputEmailToTarget';
-
+
/**
* Constructor
@@ -115,6 +115,7 @@ class mailing_xinputuser extends MailingTargets
* @param array $filtersarray Requete sql de selection des destinataires
* @return int < 0 si erreur, nb ajout si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
global $conf,$langs,$_FILES;
@@ -161,4 +162,3 @@ class mailing_xinputuser extends MailingTargets
}
}
-
diff --git a/htdocs/core/modules/member/doc/pdf_standard.class.php b/htdocs/core/modules/member/doc/pdf_standard.class.php
index 49acce1e2d6..85d61432dc4 100644
--- a/htdocs/core/modules/member/doc/pdf_standard.class.php
+++ b/htdocs/core/modules/member/doc/pdf_standard.class.php
@@ -61,6 +61,7 @@ class pdf_standard extends CommonStickerGenerator
* @param string $photo Photo (full path to image file used as replacement for key __PHOTOS__ into left, right, header or footer text)
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Add_PDF_card(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$idmember=0,$photo='')
{
global $db,$mysoc,$conf,$langs;
@@ -244,6 +245,7 @@ class pdf_standard extends CommonStickerGenerator
* @param int $nooutput 1=Generate only file on disk and do not return it on response
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object, $outputlangs, $srctemplatepath, $mode='member', $nooutput=0)
{
global $user,$conf,$langs,$mysoc,$_Avery_Labels;
@@ -323,7 +325,7 @@ class pdf_standard extends CommonStickerGenerator
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "admin", "members"));
diff --git a/htdocs/core/modules/member/modules_cards.php b/htdocs/core/modules/member/modules_cards.php
index f7ef8b94590..9ecbff756aa 100644
--- a/htdocs/core/modules/member/modules_cards.php
+++ b/htdocs/core/modules/member/modules_cards.php
@@ -44,6 +44,7 @@ class ModelePDFCards
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -70,22 +71,23 @@ class ModelePDFCards
* @param string $template pdf generenate document class to use default 'standard'
* @return int <0 if KO, >0 if OK
*/
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $outputdir='', $template='standard')
{
global $conf,$langs;
$langs->load("members");
$error=0;
-
+
// Increase limit for PDF build
$err=error_reporting();
error_reporting(0);
@set_time_limit(120);
error_reporting($err);
-
+
$code='';
$srctemplatepath='';
-
+
// Positionne le modele sur le nom du modele a utiliser
if (! dol_strlen($modele))
{
@@ -108,7 +110,7 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o
$srctemplatepath=$tmp[1];
}
else $srctemplatepath=$code;
-
+
// Search template files
$file=''; $classname=''; $filefound=0;
$dirmodels=array('/');
@@ -118,7 +120,7 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o
foreach(array('doc','pdf') as $prefix)
{
$file = $prefix."_".$template.".class.php";
-
+
// On verifie l'emplacement du modele
$file=dol_buildpath($reldir."core/modules/member/doc/".$file,0);
if (file_exists($file))
@@ -130,8 +132,8 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o
}
if ($filefound) break;
}
-
-
+
+
// Charge le modele
if ($filefound)
{
@@ -163,4 +165,3 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o
}
-
diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php
index a09ad2355e4..ab87cbbf60e 100644
--- a/htdocs/core/modules/payment/mod_payment_ant.php
+++ b/htdocs/core/modules/payment/mod_payment_ant.php
@@ -131,10 +131,10 @@ class mod_payment_ant extends ModeleNumRefPayments
* @param string $objforref Object for number to search
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function commande_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
}
}
-
diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php
index 8fc05b6cdd8..951b71a0d56 100644
--- a/htdocs/core/modules/payment/mod_payment_cicada.php
+++ b/htdocs/core/modules/payment/mod_payment_cicada.php
@@ -142,6 +142,7 @@ class mod_payment_cicada extends ModeleNumRefPayments
* @param string $objforref Object for number to search
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function payment_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php
index 4a6560b47fa..856b380c659 100644
--- a/htdocs/core/modules/printing/modules_printing.php
+++ b/htdocs/core/modules/printing/modules_printing.php
@@ -83,4 +83,3 @@ class PrintingDriver
}
}
-
diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php
index 7cda95174c2..f5591e66e9b 100644
--- a/htdocs/core/modules/printing/printgcp.modules.php
+++ b/htdocs/core/modules/printing/printgcp.modules.php
@@ -220,6 +220,7 @@ class printing_printgcp extends PrintingDriver
*
* @return array list of printers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function getlist_available_printers()
{
// Token storage
@@ -287,6 +288,7 @@ class printing_printgcp extends PrintingDriver
* @param string $subdir subdir for file
* @return int 0 if OK, >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function print_file($file, $module, $subdir='')
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -403,6 +405,7 @@ class printing_printgcp extends PrintingDriver
*
* @return int 0 if OK, >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_jobs()
{
global $conf, $db, $langs, $bc;
diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php
index 94d14426b55..b725a6a3965 100644
--- a/htdocs/core/modules/printing/printipp.modules.php
+++ b/htdocs/core/modules/printing/printipp.modules.php
@@ -75,6 +75,7 @@ class printing_printipp extends PrintingDriver
*
* @return int 0 if OK, >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function print_file($file, $module, $subdir='')
{
global $conf, $user;
@@ -197,6 +198,7 @@ class printing_printipp extends PrintingDriver
*
* @return array list of printers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function getlist_available_printers()
{
global $conf,$db;
@@ -217,6 +219,7 @@ class printing_printipp extends PrintingDriver
* @param string $uri URI
* @return array List of attributes
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_printer_detail($uri)
{
global $conf,$db;
@@ -240,6 +243,7 @@ class printing_printipp extends PrintingDriver
*
* @return int 0 if OK, >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_jobs($module)
{
global $conf, $db, $bc;
diff --git a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
index d76b397ace8..7577d4820a8 100644
--- a/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
+++ b/htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php
@@ -44,7 +44,7 @@ class pdf_standardlabel extends CommonStickerGenerator
function addSticker(&$pdf,$outputlangs,$param) {
// use this method in future refactoring
}
-
+
/**
* Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)
* - %LOGO% is replace with company logo
@@ -59,6 +59,7 @@ class pdf_standardlabel extends CommonStickerGenerator
* @param string $photo Photo (full path to image file used as replacement for key %PHOTOS% into left, right, header or footer text)
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Add_PDF_label(&$pdf,$textleft,$header,$footer,$outputlangs,$textright='',$photo='')
{
global $mysoc, $conf, $langs;
@@ -234,6 +235,7 @@ class pdf_standardlabel extends CommonStickerGenerator
* @param string $filename Short file name of PDF output file
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='',$filename='tmp_address_sheet.pdf')
{
global $user,$conf,$langs,$mysoc,$_Avery_Labels;
@@ -254,7 +256,7 @@ class pdf_standardlabel extends CommonStickerGenerator
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "admin"));
diff --git a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php
index e527c8faaca..0aadcb2baf8 100644
--- a/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php
+++ b/htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php
@@ -50,7 +50,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
'fontsize' => 8,
'stretchtext' => 4
);
-
+
// set style for 2d barcode
private $_style2d = array(
'border' => false,
@@ -61,24 +61,24 @@ class pdf_tcpdflabel extends CommonStickerGenerator
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
-
+
private $_align2d = 'N';
-
+
private $_xres = 0.4;
-
+
/**
* write barcode to pdf
- *
+ *
* @param PDF $pdf PDF reference
* @param string $code code to print
* @param string $encoding type of barcode
* @param boolean $is2d true if 2d barcode
- * @param int $x x position in user units
+ * @param int $x x position in user units
* @param int $y y position in user units
* @param int $w width in user units
* @param int $h height in user units
- */
- private function writeBarcode(&$pdf, $code, $encoding, $is2d, $x, $y, $w, $h)
+ */
+ private function writeBarcode(&$pdf, $code, $encoding, $is2d, $x, $y, $w, $h)
{
if ($is2d) {
$pdf->write2DBarcode($code, $encoding, $x, $y, $w, $h, $this->_style2d, $this->_align2d);
@@ -86,7 +86,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
$pdf->write1DBarcode($code, $encoding, $x, $y, $w, $h, $this->_xres, $this->_style1d);
}
}
-
+
/**
* Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)
*
@@ -95,10 +95,10 @@ class pdf_tcpdflabel extends CommonStickerGenerator
* @param array $param Associative array containing label content and optional parameters
* @return void
*/
- function addSticker(&$pdf,$outputlangs,$param)
+ function addSticker(&$pdf,$outputlangs,$param)
{
global $mysoc,$conf;
-
+
$textleft = $param['textleft'];
$header = $param['textheader'];
$footer = $param['textfooter'];
@@ -106,8 +106,8 @@ class pdf_tcpdflabel extends CommonStickerGenerator
$code = $param['code'];
$encoding = $param['encoding'];
$is2d = $param['is2d'];
-
-
+
+
// We are in a new page, then we must add a page
if (($this->_COUNTX ==0) && ($this->_COUNTY==0) and (!$this->_First==1)) {
@@ -132,7 +132,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
}
}
- $xleft = 2;
+ $xleft = 2;
$ytop = 2;
// Top
@@ -154,7 +154,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
$heighttouse = $maxheighttouse;
$logoHeight = $heighttouse;
$logoWidth = $heighttouse;
-
+
//var_dump($this->_Width.'x'.$this->_Height.' with border and scale '.$imgscale.' => max '.$maxwidthtouse.'x'.$maxheighttouse.' => We use '.$widthtouse.'x'.$heighttouse);exit;
// Center
@@ -162,7 +162,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
{
// Output left area
if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, 0, $logoHeight);
- else if ($code && !empty($encoding))
+ else if ($code && !empty($encoding))
{
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
}
@@ -177,7 +177,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
if (($textleft == '%LOGO%' || $textleft == '%PHOTO%' || $textleft == '%BARCODE%') && !strstr($textright, '%') ) // left part logo/barcode right part text
{
if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, $widthtouse/2, 0);
- else if ($code && !empty($encoding))
+ else if ($code && !empty($encoding))
{
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse/2, $heighttouse);
}
@@ -187,7 +187,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
else if (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) // right part logo/barcode left part text
{
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+($widthtouse/2), $_PosY+$ytop, $widthtouse/2, 0);
- else if ($code && !empty($encoding))
+ else if ($code && !empty($encoding))
{
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+($widthtouse/2), $_PosY+$ytop, $widthtouse/2, $heighttouse);
}
@@ -203,7 +203,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
} else {
$pdf->SetXY($_PosX+$xleft+$logoWidth+1, $_PosY+$ytop);
$pdf->MultiCell($widthtouse-$logoWidth1-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textright),0,'R');
- }
+ }
}
else if ($textright == '%LOGO%') // right part logo left part text/barcode
{
@@ -214,7 +214,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
} else {
$pdf->SetXY($_PosX+$xleft, $_PosY+$ytop);
$pdf->MultiCell($widthtouse-$logoWidth-1, $this->_Line_Height, $outputlangs->convToOutputCharset($textleft),0,'L');
- }
+ }
}
else // text on halft left and text on half right
{
@@ -228,7 +228,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
{
// Output right area
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, 0, $logoHeight);
- else if ($code && !empty($encoding))
+ else if ($code && !empty($encoding))
{
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$this->_Width-$widthtouse-$xleft, $_PosY+$ytop, $widthtouse, $heighttouse);
}
@@ -275,6 +275,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
* @param string $filename Short file name of PDF output file
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir='',$filename='tmp_address_sheet.pdf')
{
global $user,$conf,$langs,$mysoc,$_Avery_Labels;
@@ -295,7 +296,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "admin"));
diff --git a/htdocs/core/modules/printsheet/modules_labels.php b/htdocs/core/modules/printsheet/modules_labels.php
index bac32ec45d2..8149ea03a1b 100644
--- a/htdocs/core/modules/printsheet/modules_labels.php
+++ b/htdocs/core/modules/printsheet/modules_labels.php
@@ -44,6 +44,7 @@ class ModelePDFLabels
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -71,6 +72,7 @@ class ModelePDFLabels
* @param string $filename Short file name of PDF output file
* @return int <0 if KO, >0 if OK
*/
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outputdir='', $template='standardlabel', $filename='tmp_address_sheet.pdf')
{
global $conf,$langs;
@@ -111,7 +113,7 @@ function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outp
else $srctemplatepath=$code;
dol_syslog("modele=".$modele." outputdir=".$outputdir." template=".$template." code=".$code." srctemplatepath=".$srctemplatepath." filename=".$filename, LOG_DEBUG);
-
+
// Search template files
$file=''; $classname=''; $filefound=0;
$dirmodels=array('/');
@@ -164,4 +166,3 @@ function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outp
}
-
diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
index c447639cfe1..6fc3b477603 100644
--- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
+++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php
@@ -202,6 +202,7 @@ class doc_generic_product_odt extends ModelePDFProduct
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $product,$langs,$conf,$mysoc,$hookmanager,$user;
@@ -501,4 +502,3 @@ class doc_generic_product_odt extends ModelePDFProduct
}
}
-
diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php
index 7e53bab7133..269aa4bd8ca 100644
--- a/htdocs/core/modules/product/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php
@@ -87,7 +87,7 @@ class pdf_standard extends ModelePDFProduct
public function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Load traductions files requiredby by page
$langs->loadLangs(array("main", "companies"));
@@ -128,6 +128,7 @@ class pdf_standard extends ModelePDFProduct
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
@@ -135,7 +136,7 @@ class pdf_standard extends ModelePDFProduct
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
@@ -682,7 +683,7 @@ class pdf_standard extends ModelePDFProduct
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
{
global $conf,$langs,$hookmanager;
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders"));
@@ -836,4 +837,3 @@ class pdf_standard extends ModelePDFProduct
}
}
-
diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php
index 32941ca1ec9..a7dfdfc9fac 100644
--- a/htdocs/core/modules/product/mod_codeproduct_elephant.php
+++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php
@@ -203,6 +203,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
*
* @return int 0 or 1
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_prefixIsUsed()
{
global $conf;
@@ -281,6 +282,7 @@ class mod_codeproduct_elephant extends ModeleProductCode
* @param Product $product Objet product
* @return int 0 if available, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_dispo($db, $code, $product)
{
$sql = "SELECT ref FROM ".MAIN_DB_PREFIX."product";
@@ -307,4 +309,3 @@ class mod_codeproduct_elephant extends ModeleProductCode
}
}
-
diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php
index 83fc444f258..8b0495be89f 100644
--- a/htdocs/core/modules/product/modules_product.class.php
+++ b/htdocs/core/modules/product/modules_product.class.php
@@ -42,7 +42,8 @@ abstract class ModelePDFProduct extends CommonDocGenerator
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -140,6 +141,7 @@ abstract class ModeleProductCode
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
$liste=array();
@@ -236,10 +238,10 @@ abstract class ModeleProductCode
*
* @return int 0=no, 1=yes
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_prefixIsUsed()
{
return 0;
}
}
-
diff --git a/htdocs/core/modules/product_batch/modules_product_batch.class.php b/htdocs/core/modules/product_batch/modules_product_batch.class.php
index 94818d17531..b51f735467e 100644
--- a/htdocs/core/modules/product_batch/modules_product_batch.class.php
+++ b/htdocs/core/modules/product_batch/modules_product_batch.class.php
@@ -24,7 +24,7 @@
* \class ModeleProductCode
* \brief Parent class for product code generators
*/
-
+
/**
* \file htdocs/core/modules/contract/modules_contract.php
* \ingroup contract
@@ -32,7 +32,7 @@
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
-
+
/**
* Parent class to manage intervention document templates
*/
@@ -44,20 +44,20 @@ abstract class ModelePDFProductBatch extends CommonDocGenerator
/**
* Return list of active generation modules
*
- * @param DoliDB $db Database handler
+ * @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
- */
- static function liste_modeles($db,$maxfilenamelength=0)
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ static function liste_modeles($db, $maxfilenamelength=0)
{
global $conf;
$type='product_batch';
- $liste=array();
+ $list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $liste=getListOfModels($db,$type,$maxfilenamelength);
- return $liste;
+ $list = getListOfModels($db, $type, $maxfilenamelength);
+ return $list;
}
}
-
diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
index d936c01139f..3c8ea0ea151 100644
--- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
+++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php
@@ -111,6 +111,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @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;
@@ -147,6 +148,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_tasks($task,$outputlangs)
{
global $conf;
@@ -186,6 +188,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_project_contacts($contact,$outputlangs)
{
global $conf;
@@ -242,6 +245,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_project_file($file,$outputlangs)
{
global $conf;
@@ -260,6 +264,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_project_reference($refdetail,$outputlangs)
{
global $conf;
@@ -282,6 +287,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_tasksressource($taskressource,$outputlangs)
{
global $conf;
@@ -304,6 +310,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_taskstime($tasktime,$outputlangs)
{
global $conf;
@@ -328,6 +335,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_task_file($file,$outputlangs)
{
global $conf;
@@ -437,6 +445,7 @@ class doc_generic_project_odt extends ModelePDFProjects
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php
index 229aec99beb..4dea22de614 100644
--- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php
@@ -42,69 +42,69 @@ class pdf_baleine extends ModelePDFProjects
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
public $type;
-
+
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
-
+
/**
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
@@ -119,7 +119,7 @@ class pdf_baleine extends ModelePDFProjects
function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "projects", "companies"));
@@ -172,6 +172,7 @@ class pdf_baleine extends ModelePDFProjects
* @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs)
{
global $conf, $hookmanager, $langs, $user;
@@ -179,7 +180,7 @@ class pdf_baleine extends ModelePDFProjects
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
index b487c211376..475dd3d75e8 100644
--- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
@@ -64,7 +64,7 @@ class pdf_beluga extends ModelePDFProjects
function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "projects", "companies"));
@@ -117,6 +117,7 @@ class pdf_beluga extends ModelePDFProjects
* @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs)
{
global $conf, $hookmanager, $langs, $user;
@@ -126,7 +127,7 @@ class pdf_beluga extends ModelePDFProjects
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
@@ -253,7 +254,7 @@ class pdf_beluga extends ModelePDFProjects
$iniY = $tab_top + $heightoftitleline + 1;
$curY = $tab_top + $heightoftitleline + 1;
$nexY = $tab_top + $heightoftitleline + 1;
-
+
$listofreferent=array(
'propal'=>array(
'name'=>"Proposals",
@@ -368,8 +369,8 @@ class pdf_beluga extends ModelePDFProjects
//var_dump("$key, $tablename, $datefieldname, $dates, $datee");
$elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee);
-
- if ($key == 'agenda')
+
+ if ($key == 'agenda')
{
// var_dump($elementarray);
}
@@ -378,11 +379,11 @@ class pdf_beluga extends ModelePDFProjects
if ($num >= 0)
{
$nexY = $pdf->GetY() + 5;
-
+
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
-
+
$pdf->SetXY($this->posxref, $curY);
$pdf->MultiCell($this->posxstatut - $this->posxref, 3, $outputlangs->transnoentities($title), 0, 'L');
@@ -418,7 +419,7 @@ class pdf_beluga extends ModelePDFProjects
$num = count($elementarray);
// Loop on each lines
- for ($i = 0; $i < $num; $i ++)
+ for ($i = 0; $i < $num; $i ++)
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
@@ -496,10 +497,10 @@ class pdf_beluga extends ModelePDFProjects
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
$pdf->MultiCell(0, 3, ''); // Set interline to 3
$pdf->SetTextColor(0,0,0);
-
+
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
$curY = $tab_top_newpage + $heightoftitleline + 1;
-
+
// Label
$pdf->SetXY($this->posxref, $curY);
$posybefore=$pdf->GetY();
@@ -557,7 +558,7 @@ class pdf_beluga extends ModelePDFProjects
{
$pdf->MultiCell($this->posxamountht - $this->posxsociety, 3, (is_object($element->thirdparty)?$element->thirdparty->name:''), 1, 'L');
}
-
+
// Amount without tax
if (empty($value['disableamount'])) {
$pdf->SetXY($this->posxamountht, $curY);
@@ -610,7 +611,7 @@ class pdf_beluga extends ModelePDFProjects
$curY = $nexY;
}
}
-
+
$nexY+=2; // Passe espace entre les lignes
// Detect if some page were added automatically and output _tableau for past pages
@@ -775,7 +776,7 @@ class pdf_beluga extends ModelePDFProjects
$pdf->SetXY($posx,$posy);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : " . $object->thirdparty->getFullName($outputlangs), '', 'R');
}
-
+
$pdf->SetTextColor(0,0,60);
}
diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php
index 6bcfe287b70..89aeefc5fab 100644
--- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php
@@ -47,7 +47,7 @@ class pdf_timespent extends ModelePDFProjects
function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "projects", "companies"));
@@ -100,6 +100,7 @@ class pdf_timespent extends ModelePDFProjects
* @param Translate $outputlangs Lang output object
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs)
{
global $conf, $hookmanager, $langs, $user;
@@ -107,7 +108,7 @@ class pdf_timespent extends ModelePDFProjects
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
@@ -602,4 +603,3 @@ class pdf_timespent extends ModelePDFProjects
}
}
-
diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php
index 05256a3e61f..1f4656f5ebe 100644
--- a/htdocs/core/modules/project/mod_project_simple.php
+++ b/htdocs/core/modules/project/mod_project_simple.php
@@ -147,9 +147,9 @@ class mod_project_simple extends ModeleNumRefProjects
* @param Project $project Object project
* @return string Next not used reference
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function project_get_num($objsoc=0,$project='')
{
return $this->getNextValue($objsoc,$project);
}
}
-
diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php
index e76ed349b46..6be53915136 100644
--- a/htdocs/core/modules/project/mod_project_universal.php
+++ b/htdocs/core/modules/project/mod_project_universal.php
@@ -134,9 +134,9 @@ class mod_project_universal extends ModeleNumRefProjects
* @param Project $project Object project
* @return string Next not used reference
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function project_get_num($objsoc=0,$project='')
{
return $this->getNextValue($objsoc,$project);
}
}
-
diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php
index 5f7ef3d5756..3f7c1526f9e 100644
--- a/htdocs/core/modules/project/modules_project.php
+++ b/htdocs/core/modules/project/modules_project.php
@@ -37,10 +37,11 @@ abstract class ModelePDFProjects extends CommonDocGenerator
/**
* Return list of active generation modules
*
- * @param DoliDB $db Database handler
+ * @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
index 5f7ff754a65..a01e6fdfeac 100644
--- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
+++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php
@@ -112,6 +112,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @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;
@@ -154,6 +155,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_tasks($task,$outputlangs)
{
global $conf;
@@ -183,6 +185,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_project_contacts($contact,$outputlangs)
{
global $conf;
@@ -206,6 +209,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_project_file($file,$outputlangs)
{
global $conf;
@@ -224,6 +228,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_project_reference($refdetail,$outputlangs)
{
global $conf;
@@ -246,6 +251,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_tasksressource($taskressource,$outputlangs)
{
global $conf;
@@ -268,6 +274,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_taskstime($tasktime,$outputlangs)
{
global $conf;
@@ -291,6 +298,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_substitutionarray_task_file($file,$outputlangs)
{
global $conf;
@@ -400,6 +408,7 @@ class doc_generic_task_odt extends ModelePDFTask
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php
index 1a0aa3e3445..85f361f4bc2 100644
--- a/htdocs/core/modules/project/task/mod_task_simple.php
+++ b/htdocs/core/modules/project/task/mod_task_simple.php
@@ -147,9 +147,9 @@ class mod_task_simple extends ModeleNumRefTask
* @param Task $object Object task
* @return string Next not used reference
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function task_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$object);
}
}
-
diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php
index d89acb22b06..cc3175be159 100644
--- a/htdocs/core/modules/project/task/mod_task_universal.php
+++ b/htdocs/core/modules/project/task/mod_task_universal.php
@@ -134,9 +134,9 @@ class mod_task_universal extends ModeleNumRefTask
* @param Task $object Object task
* @return string Next not used reference
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function project_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$object);
}
}
-
diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php
index 7d14ae12a3e..b08c083b4c1 100644
--- a/htdocs/core/modules/project/task/modules_task.php
+++ b/htdocs/core/modules/project/task/modules_task.php
@@ -41,8 +41,9 @@ abstract class ModelePDFTask extends CommonDocGenerator
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
- */
- static function liste_modeles($db,$maxfilenamelength=0)
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
index 24477a67cc5..2f388392329 100644
--- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
+++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php
@@ -218,6 +218,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -525,4 +526,3 @@ class doc_generic_proposal_odt extends ModelePDFPropales
}
}
-
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index bf78f7edae6..bef150b1e79 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -44,79 +44,79 @@ class pdf_azur extends ModelePDFPropales
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
-
+
/**
* @var string document type
*/
public $type;
-
+
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
-
+
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
-
+
/**
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Objet societe qui emet
*/
- public $emetteur;
+ public $emetteur;
/**
@@ -127,7 +127,7 @@ class pdf_azur extends ModelePDFPropales
function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "bills"));
@@ -212,6 +212,7 @@ class pdf_azur extends ModelePDFPropales
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
@@ -219,7 +220,7 @@ class pdf_azur extends ModelePDFPropales
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "propal", "products"));
@@ -837,6 +838,7 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
@@ -852,6 +854,7 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Langs object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@@ -1032,6 +1035,7 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -1432,7 +1436,7 @@ class pdf_azur extends ModelePDFPropales
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "propal", "companies", "bills"));
@@ -1665,6 +1669,7 @@ class pdf_azur extends ModelePDFPropales
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _signature_area(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@@ -1691,4 +1696,3 @@ class pdf_azur extends ModelePDFPropales
return ($tab_hl*7);
}
}
-
diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php
index c2d52923e4f..d65ce8316d4 100644
--- a/htdocs/core/modules/propale/modules_propale.php
+++ b/htdocs/core/modules/propale/modules_propale.php
@@ -46,6 +46,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php
index a645b105610..62584af5bbf 100644
--- a/htdocs/core/modules/rapport/pdf_paiement.class.php
+++ b/htdocs/core/modules/rapport/pdf_paiement.class.php
@@ -93,6 +93,7 @@ class pdf_paiement
* @param string $outputlangs Lang output object
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($_dir, $month, $year, $outputlangs)
{
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
@@ -415,6 +416,7 @@ class pdf_paiement
* @param Translate $outputlangs Object langs
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Body(&$pdf, $page, $lines, $outputlangs)
{
global $langs;
@@ -495,4 +497,3 @@ class pdf_paiement
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $langs->transnoentities('Total')." : ".price($total), 0, 'R', 0);
}
}
-
diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
index 6aa4267d827..c0baf2d4c30 100644
--- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
+++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php
@@ -83,7 +83,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
function info($langs)
{
global $conf,$langs;
-
+
// Load traductions files requiredby by page
$langs->loadLangs(array("companies", "errors"));
@@ -175,6 +175,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -197,7 +198,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
if (! is_object($outputlangs)) $outputlangs=$langs;
$sav_charset_output=$outputlangs->charset_output;
$outputlangs->charset_output='UTF-8';
-
+
// Load translation files required by the page
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
@@ -430,4 +431,3 @@ class doc_generic_odt extends ModeleThirdPartyDoc
}
}
-
diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php
index 993bb2ed2b3..63dc9839b02 100644
--- a/htdocs/core/modules/societe/mod_codeclient_elephant.php
+++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php
@@ -221,6 +221,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
*
* @return int 0 or 1
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_prefixIsUsed()
{
global $conf;
@@ -300,6 +301,7 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if available, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_dispo($db, $code, $soc, $type=0)
{
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe";
@@ -327,4 +329,3 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
}
}
-
diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php
index f4d9e5b4b33..dfced8a2f23 100644
--- a/htdocs/core/modules/societe/mod_codeclient_monkey.php
+++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php
@@ -219,6 +219,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
* @param int $type 0 = customer/prospect , 1 = supplier
* @return int 0 if available, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_dispo($db, $code, $soc, $type=0)
{
global $conf, $mc;
@@ -255,6 +256,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
* @param string $code Code a verifier
* @return int 0 si OK, <0 si KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_syntax($code)
{
$res = 0;
@@ -271,4 +273,3 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode
}
}
-
diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php
index c237be0f91c..baf1978ceae 100644
--- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php
+++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php
@@ -115,6 +115,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
* @param string $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_code($db, $societe, $type='')
{
global $conf;
@@ -212,4 +213,3 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
}
}
}
-
diff --git a/htdocs/core/modules/societe/mod_codecompta_panicum.php b/htdocs/core/modules/societe/mod_codecompta_panicum.php
index 15099eb0538..1e990b42d69 100644
--- a/htdocs/core/modules/societe/mod_codecompta_panicum.php
+++ b/htdocs/core/modules/societe/mod_codecompta_panicum.php
@@ -75,6 +75,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
* @param int $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_code($db, $societe, $type='')
{
$this->code='';
@@ -87,4 +88,3 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
return 0; // return ok
}
}
-
diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php
index 0ed5eace2e2..ccb9006df02 100644
--- a/htdocs/core/modules/societe/modules_societe.class.php
+++ b/htdocs/core/modules/societe/modules_societe.class.php
@@ -42,6 +42,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -139,12 +140,13 @@ abstract class ModeleThirdPartyCode
}
/**
- * Renvoi la liste des modeles de numéroation
+ * Renvoie la liste des modeles de numérotation
*
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
$liste=array();
@@ -239,8 +241,9 @@ abstract class ModeleThirdPartyCode
/**
* Check if mask/numbering use prefix
*
- * @return int 0=no, 1=yes
- */
+ * @return int 0=no, 1=yes
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function verif_prefixIsUsed()
{
return 0;
@@ -353,6 +356,7 @@ abstract class ModeleAccountancyCode
* @param int $type 'customer' or 'supplier'
* @return int >=0 if OK, <0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_code($db, $societe, $type='')
{
global $langs;
@@ -378,6 +382,7 @@ abstract class ModeleAccountancyCode
* @deprecated Use the new function generateDocument of Facture class
* @see Societe::generateDocument()
*/
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function thirdparty_doc_create(DoliDB $db, Societe $object, $message, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
{
dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
index 4b4a902cb96..662d3d60485 100644
--- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
+++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php
@@ -202,6 +202,7 @@ class doc_generic_stock_odt extends ModelePDFStock
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $stock,$langs,$conf,$mysoc,$hookmanager,$user;
@@ -501,4 +502,3 @@ class doc_generic_stock_odt extends ModelePDFStock
}
}
-
diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
index 66ad1413dcd..9d83cf811cd 100644
--- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php
@@ -87,7 +87,7 @@ class pdf_standard extends ModelePDFStock
public function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Load traductions files requiredby by page
$langs->loadLangs(array("main", "companies"));
@@ -114,12 +114,12 @@ class pdf_standard extends ModelePDFStock
// Recupere emetteur
$this->emetteur=$mysoc;
if (! $this->emetteur->country_code) $this->emetteur->country_code=substr($langs->defaultlang,-2); // By default if not defined
-
+
// Define position of columns
$this->wref = 15;
$this->posxdesc=$this->marge_gauche+1;
$this->posxlabel=$this->posxdesc+$this->wref;
- $this->posxtva=80;
+ $this->posxtva=80;
$this->posxqty=95;
$this->posxup=115;
$this->posxunit=135;
@@ -157,6 +157,7 @@ class pdf_standard extends ModelePDFStock
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
@@ -164,7 +165,7 @@ class pdf_standard extends ModelePDFStock
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
@@ -188,7 +189,7 @@ class pdf_standard extends ModelePDFStock
$stockFournisseur = new ProductFournisseur($this->db);
$supplierprices = $stockFournisseur->list_product_fournisseur_price($object->id);
$object->supplierprices = $supplierprices;
-
+
$productstatic=new Product($db);
if (! file_exists($dir))
@@ -268,8 +269,8 @@ class pdf_standard extends ModelePDFStock
/* Affichage de la liste des produits de l'entrepot */
/* */
/* ************************************************************************** */
-
- $nexY+=5;
+
+ $nexY+=5;
$nexY = $pdf->GetY();
$nexY+=10;
@@ -311,7 +312,7 @@ class pdf_standard extends ModelePDFStock
if ($objtp->label != '') $objp->produit = $objtp->label;
}
}
-
+
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
@@ -319,7 +320,7 @@ class pdf_standard extends ModelePDFStock
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $heightforfooter+$heightforfreetext+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
-
+
// Description of product line
$curX = $this->posxdesc-1;
@@ -372,13 +373,13 @@ class pdf_standard extends ModelePDFStock
}
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
-
+
$productstatic->id=$objp->rowid;
$productstatic->ref = $objp->ref;
$productstatic->label = $objp->produit;
$productstatic->type=$objp->type;
$productstatic->entity=$objp->entity;
- $productstatic->status_batch=$objp->tobatch;
+ $productstatic->status_batch=$objp->tobatch;
// Ref.
$pdf->SetXY($this->posxdesc, $curY);
@@ -391,12 +392,12 @@ class pdf_standard extends ModelePDFStock
// Quantity
$valtoshow=price2num($objp->value, 'MS');
$towrite = (empty($valtoshow)?'0':$valtoshow);
-
+
$pdf->SetXY($this->posxqty, $curY);
- $pdf->MultiCell($this->posxup-$this->posxqty-0.8, 3, $towrite, 0, 'R');
-
+ $pdf->MultiCell($this->posxup-$this->posxqty-0.8, 3, $towrite, 0, 'R');
+
$totalunit+=$objp->value;
-
+
$pdf->SetXY($this->posxup, $curY);
$pdf->MultiCell($this->posxunit-$this->posxup-0.8, 3, price(price2num($objp->ppmp,'MU'), 0, $outputlangs), 0, 'R');
@@ -429,7 +430,7 @@ class pdf_standard extends ModelePDFStock
}
$nexY+=2; // Passe espace entre les lignes
-
+
// Detect if some page were added automatically and output _tableau for past pages
while ($pagenb < $pageposafter)
{
@@ -466,20 +467,20 @@ class pdf_standard extends ModelePDFStock
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
}
}
-
+
$db->free($resql);
-
+
/**
* footer table
*/
$nexY = $pdf->GetY();
$nexY+=2;
- $curY = $nexY;
-
- $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
+ $curY = $nexY;
+
+ $pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
$pdf->line($this->marge_gauche, $curY-1, $this->page_largeur-$this->marge_droite, $curY-1);
$pdf->SetLineStyle(array('dash'=>0));
-
+
$pdf->SetFont('','B',$default_font_size-1);
$pdf->SetTextColor(0,0,120);
@@ -487,7 +488,7 @@ class pdf_standard extends ModelePDFStock
$pdf->SetXY($this->posxdesc, $curY);
$pdf->MultiCell($this->wref, 3, $langs->trans("Total"), 0, 'L');
- // Quantity
+ // Quantity
$valtoshow=price2num($totalunit, 'MS');
$towrite = empty($valtoshow)?'0':$valtoshow;
@@ -736,8 +737,8 @@ class pdf_standard extends ModelePDFStock
}
}
*/
- $tab_top = $tab_top_newpage+21;
-
+ $tab_top = $tab_top_newpage+21;
+
// Show square
if ($pagenb == 1)
{
@@ -749,7 +750,7 @@ class pdf_standard extends ModelePDFStock
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code);
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
}
-
+
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
// Affiche zone infos
@@ -836,21 +837,21 @@ class pdf_standard extends ModelePDFStock
// Output Rect
//$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect prend une longueur en 3eme param et 4eme param
-
+
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
- $pdf->SetDrawColor(220,26,26);
+ $pdf->SetDrawColor(220,26,26);
$pdf->line($this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_droite, $tab_top);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetDrawColor(128,128,128);
$pdf->SetTextColor(0,0,120);
-
+
if (empty($hidetop))
{
//$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5); // line prend une position y en 2eme param et 4eme param
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
$pdf->MultiCell($this->wref,3, $outputlangs->transnoentities("Ref"),'','L');
}
-
+
//$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height);
if (empty($hidetop))
{
@@ -860,7 +861,7 @@ class pdf_standard extends ModelePDFStock
//$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
if (empty($hidetop))
- {
+ {
$pdf->SetXY($this->posxqty-1, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxqty-1,2, $outputlangs->transnoentities("Units"),'','C');
}
@@ -873,7 +874,7 @@ class pdf_standard extends ModelePDFStock
}
//$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
- if (empty($hidetop))
+ if (empty($hidetop))
{
$pdf->SetXY($this->posxunit - 1, $tab_top + 1);
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '',
@@ -887,18 +888,18 @@ class pdf_standard extends ModelePDFStock
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("SellPriceMin"),'','C');
}
- //$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
+ //$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
if (empty($hidetop))
{
$pdf->SetXY($this->postotalht-1, $tab_top+1);
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$this->postotalht,2, $outputlangs->transnoentities("EstimatedStockValueSellShort"),'','C');
}
-
- $pdf->SetDrawColor(220,26,26);
+
+ $pdf->SetDrawColor(220,26,26);
$pdf->SetLineStyle(array('dash'=>'0','color'=>array(220,26,26)));
- $pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11);
+ $pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11);
$pdf->SetLineStyle(array('dash'=>0));
-
+
}
/**
@@ -914,7 +915,7 @@ class pdf_standard extends ModelePDFStock
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
{
global $conf,$langs,$db,$hookmanager;
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
@@ -961,7 +962,7 @@ class pdf_standard extends ModelePDFStock
$text=$this->emetteur->name;
$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
}
-
+
$pdf->SetFont('','B', $default_font_size + 3);
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
@@ -981,22 +982,22 @@ class pdf_standard extends ModelePDFStock
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("LocationSummary").' :', '', 'R');
-
+
$posy+=4;
$pdf->SetXY($posx-50,$posy);
$pdf->MultiCell(150, 3, $object->lieu, '', 'R');
-
-
+
+
// Parent entrepot
$posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ParentWarehouse").' :', '', 'R');
-
+
$posy+=4;
$pdf->SetXY($posx-50,$posy);
$e = new Entrepot($db);
- if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0)
+ if(!empty($object->fk_parent) && $e->fetch($object->fk_parent) > 0)
{
$pdf->MultiCell(150, 3, $e->libelle, '', 'R');
}
@@ -1004,14 +1005,14 @@ class pdf_standard extends ModelePDFStock
{
$pdf->MultiCell(150, 3, $outputlangs->transnoentities("None"), '', 'R');
}
-
+
// Description
$nexY = $pdf->GetY();
$nexY+=5;
$pdf->SetXY($posx,$posy);
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, ''.$outputlangs->transnoentities("Description").' : '.nl2br($object->description), 0, 1);
$nexY = $pdf->GetY();
-
+
$calcproductsunique=$object->nb_different_products();
$calcproducts=$object->nb_products();
@@ -1023,12 +1024,12 @@ class pdf_standard extends ModelePDFStock
$valtoshow=price2num($calcproducts['nb'], 'MS');
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, ''.$outputlangs->transnoentities("NumberOfProducts").' : '.(empty($valtoshow)?'0':$valtoshow), 0, 1);
$nexY = $pdf->GetY();
-
+
// Value
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, ''.$outputlangs->transnoentities("EstimatedStockValueShort").' : '. price((empty($calcproducts['value'])?'0':price2num($calcproducts['value'],'MT')), 0, $langs, 0, -1, -1, $conf->currency), 0, 1);
$nexY = $pdf->GetY();
-
-
+
+
// Last movement
$sql = "SELECT max(m.datem) as datem";
$sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m";
@@ -1056,7 +1057,7 @@ class pdf_standard extends ModelePDFStock
$pdf->writeHTMLCell(190, 2, $this->marge_gauche, $nexY, ''.$outputlangs->transnoentities("LastMovement").' : '.$toWrite, 0, 1);
$nexY = $pdf->GetY();
-
+
/*if ($object->ref_client)
{
$posy+=5;
@@ -1147,4 +1148,3 @@ class pdf_standard extends ModelePDFStock
}
}
-
diff --git a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
index 5f8a62a90c6..52ed64946d9 100644
--- a/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
+++ b/htdocs/core/modules/stock/doc/pdf_stdmovement.modules.php
@@ -88,7 +88,7 @@ class pdf_stdmovement extends ModelePDFMovement
public function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Load traductions files requiredby by page
$langs->loadLangs(array("main", "companies"));
@@ -160,6 +160,7 @@ class pdf_stdmovement extends ModelePDFMovement
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager;
@@ -167,7 +168,7 @@ class pdf_stdmovement extends ModelePDFMovement
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "stocks", "orders", "deliveries"));
@@ -916,7 +917,7 @@ class pdf_stdmovement extends ModelePDFMovement
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey="")
{
global $conf,$langs,$db,$hookmanager;
-
+
// Load traductions files requiredby by page
$outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders", "stocks"));
@@ -1149,4 +1150,3 @@ class pdf_stdmovement extends ModelePDFMovement
}
}
-
diff --git a/htdocs/core/modules/stock/modules_movement.php b/htdocs/core/modules/stock/modules_movement.php
index 806f500dab7..f7882246739 100644
--- a/htdocs/core/modules/stock/modules_movement.php
+++ b/htdocs/core/modules/stock/modules_movement.php
@@ -40,6 +40,7 @@ abstract class ModelePDFMovement extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -50,4 +51,4 @@ abstract class ModelePDFMovement extends CommonDocGenerator
$liste=getListOfModels($db,$type,$maxfilenamelength);
return $liste;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/stock/modules_stock.php b/htdocs/core/modules/stock/modules_stock.php
index a0740b50f54..279ff5b21fe 100644
--- a/htdocs/core/modules/stock/modules_stock.php
+++ b/htdocs/core/modules/stock/modules_stock.php
@@ -33,6 +33,7 @@ abstract class ModelePDFStock extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php
index 7762d8ce6a5..e57ffd2ec0b 100644
--- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php
+++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php
@@ -44,17 +44,18 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
*/
- static function liste_modeles($db,$maxfilenamelength=0)
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ static function liste_modeles($db, $maxfilenamelength=0)
{
global $conf;
- $type='invoice_supplier';
- $liste=array();
+ $type = 'invoice_supplier';
+ $list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $liste=getListOfModels($db,$type,$maxfilenamelength);
+ $list = getListOfModels($db, $type, $maxfilenamelength);
- return $liste;
+ return $list;
}
}
diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
index d14a9bdcdc8..6356720a31a 100644
--- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
@@ -40,75 +40,75 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
public $type;
-
+
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
-
+
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
-
+
/**
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Objet societe qui emet
*/
- public $emetteur;
-
+ public $emetteur;
+
/**
@@ -192,7 +192,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* @param int $hidedesc Do not show desc
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager,$nblignes;
@@ -615,6 +616,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -935,6 +937,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@@ -1249,4 +1252,3 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
}
}
-
diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php
index a39e7d004be..1f0593e3083 100644
--- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php
+++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php
@@ -150,9 +150,9 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
* @param Object $object Object
* @return string Texte descripif
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function commande_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$object);
}
}
-
diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php
index 37b8adab22e..b757c71d9c0 100644
--- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php
+++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php
@@ -134,9 +134,9 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
* @param Object $object Object
* @return string Texte descripif
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function commande_get_num($objsoc=0,$object='')
{
return $this->getNextValue($objsoc,$object);
}
}
-
diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php
index 4bd262d67fb..f5c2fb2381c 100644
--- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php
+++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php
@@ -47,6 +47,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
index 9294ff1a47e..e4f6fda8e48 100644
--- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
@@ -44,17 +44,17 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
@@ -65,48 +65,48 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
-
+
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
-
+
/**
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Objet societe qui emet
@@ -207,6 +207,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs='',$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$hookmanager,$mysoc,$nblignes;
@@ -713,6 +714,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
@@ -728,6 +730,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* @param Translate $outputlangs Langs object
* @return integer
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@@ -783,15 +786,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
/**
- * Show total to pay
+ * Show total to pay
*
- * @param PDF $pdf Object PDF
+ * @param PDF $pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -1373,4 +1377,3 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
}
}
-
diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
index bda0170397d..0c75e8c4832 100644
--- a/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
+++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php
@@ -42,17 +42,17 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
@@ -62,54 +62,54 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
-
+
/**
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
public $marge_basse;
-
+
/**
* Issuer
* @var Societe
*/
- public $emetteur;
+ public $emetteur;
/**
@@ -120,7 +120,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
function __construct($db)
{
global $conf,$langs,$mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "bills"));
@@ -186,7 +186,8 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param int $hidedesc Do not show desc
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object, $outputlangs='', $srctemplatepath='', $hidedetails=0, $hidedesc=0, $hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -521,6 +522,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_cheque(&$pdf, $object, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -814,4 +816,3 @@ class pdf_standard extends ModelePDFSuppliersPayments
}
}
-
diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php
index 97c7b077b22..f7f97d075d5 100644
--- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php
+++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php
@@ -131,10 +131,10 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
* @param string $objforref Object for number to search
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function commande_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
}
}
-
diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php
index 9b0012ec089..e4d6b82b8a0 100644
--- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php
+++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php
@@ -142,6 +142,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments
* @param string $objforref Object for number to search
* @return string Next free value
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function payment_get_num($objsoc,$objforref)
{
return $this->getNextValue($objsoc,$objforref);
diff --git a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php
index 56c5bd94ae0..7e4c954817e 100644
--- a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php
+++ b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php
@@ -31,7 +31,8 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of numbers
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
index a8497416501..26972ef31e6 100644
--- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php
@@ -218,6 +218,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -516,4 +517,3 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
}
}
-
diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
index 5f971cab2d1..6f07f64a7c5 100644
--- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
+++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php
@@ -42,17 +42,17 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @var DoliDb Database handler
*/
public $db;
-
+
/**
* @var string model name
*/
public $name;
-
+
/**
* @var string model description (short text)
*/
public $description;
-
+
/**
* @var string document type
*/
@@ -62,8 +62,8 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @var array() Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4)
*/
- public $phpmin = array(5, 4);
-
+ public $phpmin = array(5, 4);
+
/**
* Dolibarr version of the loaded document
* @public string
@@ -74,32 +74,32 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @var int page_largeur
*/
public $page_largeur;
-
+
/**
* @var int page_hauteur
*/
public $page_hauteur;
-
+
/**
* @var array format
*/
public $format;
-
+
/**
* @var int marge_gauche
*/
public $marge_gauche;
-
+
/**
* @var int marge_droite
*/
public $marge_droite;
-
+
/**
* @var int marge_haute
*/
public $marge_haute;
-
+
/**
* @var int marge_basse
*/
@@ -120,7 +120,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
public function __construct($db)
{
global $conf, $langs, $mysoc;
-
+
// Translations
$langs->loadLangs(array("main", "bills"));
@@ -160,7 +160,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->posxdesc=$this->marge_gauche+1;
$this->posxdiscount=162;
$this->postotalht=174;
-
+
if ($conf->global->PRODUCT_USE_UNITS)
{
$this->posxtva=101;
@@ -172,7 +172,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$this->posxup=126;
$this->posxqty=145;
}
-
+
if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) || ! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) $this->posxup=$this->posxtva;
$this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images
if ($this->page_largeur < 210) // To work with US executive format
@@ -204,6 +204,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath='',$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$db,$hookmanager,$nblignes;
@@ -211,7 +212,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
if (! is_object($outputlangs)) $outputlangs=$langs;
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
+
// Translations
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal"));
@@ -375,7 +376,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
{
$tab_top -= 2;
- $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
+ $substitutionarray=pdf_getSubstitutionArray($outputlangs, null, $object);
complete_substitutions_array($substitutionarray, $outputlangs, $object);
$notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs);
@@ -524,7 +525,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
{
$pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R');
}
-
+
// Unit
if($conf->global->PRODUCT_USE_UNITS)
{
@@ -705,6 +706,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
@@ -720,6 +722,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @param Translate $outputlangs Langs object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
global $conf;
@@ -887,6 +890,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
global $conf,$mysoc;
@@ -1232,7 +1236,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
}
}
-
+
if($conf->global->PRODUCT_USE_UNITS) {
$pdf->line($this->posxunit - 1, $tab_top, $this->posxunit - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
@@ -1274,7 +1278,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
global $conf,$langs;
-
+
// Translations
$outputlangs->loadLangs(array("main", "bills", "supplier_proposal", "companies"));
@@ -1496,4 +1500,3 @@ class pdf_aurore extends ModelePDFSupplierProposal
}
}
-
diff --git a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php
index b324a1b03a8..46a5a095511 100644
--- a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php
+++ b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php
@@ -46,6 +46,7 @@ abstract class ModelePDFSupplierProposal extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
index a2c15780e35..ada697b1209 100644
--- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
+++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
@@ -201,6 +201,7 @@ class doc_generic_user_odt extends ModelePDFUser
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -409,7 +410,7 @@ class doc_generic_user_odt extends ModelePDFUser
$odfHandler=null; // Destroy object
$this->result = array('fullpath'=>$file);
-
+
return 1; // Success
}
else
@@ -422,7 +423,8 @@ class doc_generic_user_odt extends ModelePDFUser
return -1;
}
- function get_substitutionarray_object($object,$outputlangs,$array_key='object') {
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
+ function get_substitutionarray_object($object,$outputlangs, $array_key='object') {
$array_other=array();
foreach($object as $key => $value) {
if (!is_array($value) && !is_object($value)) {
@@ -433,4 +435,3 @@ class doc_generic_user_odt extends ModelePDFUser
}
}
-
diff --git a/htdocs/core/modules/user/modules_user.class.php b/htdocs/core/modules/user/modules_user.class.php
index 3e94ece9372..f0d18535dac 100644
--- a/htdocs/core/modules/user/modules_user.class.php
+++ b/htdocs/core/modules/user/modules_user.class.php
@@ -24,7 +24,7 @@
* \class ModeleProductCode
* \brief Parent class for product code generators
*/
-
+
/**
* \file htdocs/core/modules/contract/modules_contract.php
* \ingroup contract
@@ -32,7 +32,7 @@
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
-
+
/**
* Parent class to manage intervention document templates
*/
@@ -48,6 +48,7 @@ abstract class ModelePDFUser extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
@@ -59,4 +60,4 @@ abstract class ModelePDFUser extends CommonDocGenerator
$liste=getListOfModels($db,$type,$maxfilenamelength);
return $liste;
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
index 443981907e0..c7e501dcfc8 100644
--- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
+++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php
@@ -203,6 +203,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
* @param int $hideref Do not show ref
* @return int 1 if OK, <=0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function write_file($object,$outputlangs,$srctemplatepath,$hidedetails=0,$hidedesc=0,$hideref=0)
{
global $user,$langs,$conf,$mysoc,$hookmanager;
@@ -512,4 +513,3 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
}
}
-
diff --git a/htdocs/core/modules/usergroup/modules_usergroup.class.php b/htdocs/core/modules/usergroup/modules_usergroup.class.php
index 26edb08d57c..a2c4dcde5de 100644
--- a/htdocs/core/modules/usergroup/modules_usergroup.class.php
+++ b/htdocs/core/modules/usergroup/modules_usergroup.class.php
@@ -24,7 +24,7 @@
* \class ModeleProductCode
* \brief Parent class for product code generators
*/
-
+
/**
* \file htdocs/core/modules/contract/modules_contract.php
* \ingroup contract
@@ -32,7 +32,7 @@
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
-
+
/**
* Parent class to manage intervention document templates
*/
@@ -48,15 +48,16 @@ abstract class ModelePDFUserGroup extends CommonDocGenerator
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function liste_modeles($db,$maxfilenamelength=0)
{
global $conf;
- $type='group';
- $liste=array();
+ $type = 'group';
+ $list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
- $liste=getListOfModels($db,$type,$maxfilenamelength);
- return $liste;
+ $list = getListOfModels($db, $type, $maxfilenamelength);
+ return $list;
}
}
\ No newline at end of file
diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php
index 3ccf27ee676..7a10f5c6021 100644
--- a/htdocs/cron/class/cronjob.class.php
+++ b/htdocs/cron/class/cronjob.class.php
@@ -372,6 +372,7 @@ class Cronjob extends CommonObject
* @param int $processing Processing or not
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_all($sortorder='DESC', $sortfield='t.rowid', $limit=0, $offset=0, $status=1, $filter='', $processing=-1)
{
global $langs;
@@ -919,6 +920,7 @@ class Cronjob extends CommonObject
* @param string $userlogin User login
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function run_jobs($userlogin)
{
global $langs, $conf;
@@ -1188,6 +1190,7 @@ class Cronjob extends CommonObject
* @param timestamp $now Date returned by dol_now()
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function reprogram_jobs($userlogin, $now)
{
dol_syslog(get_class($this)."::reprogram_jobs userlogin:$userlogin", LOG_DEBUG);
@@ -1275,6 +1278,7 @@ class Cronjob 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($status,$mode=0)
{
global $langs;
diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php
index 2fa0ee44178..8a20ae29eea 100644
--- a/htdocs/don/class/don.class.php
+++ b/htdocs/don/class/don.class.php
@@ -95,6 +95,7 @@ class Don 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)
{
if (empty($this->labelstatut) || empty($this->labelstatushort))
@@ -694,6 +695,7 @@ class Don extends CommonObject
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function valid_promesse($id, $userid, $notrigger=0)
{
global $langs, $user;
@@ -743,6 +745,7 @@ class Don extends CommonObject
* @param int $modepayment mode of payment
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_paid($id, $modepayment=0)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = 2";
@@ -777,6 +780,7 @@ class Don extends CommonObject
* @param int $id id of donation
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_cancel($id)
{
$sql = "UPDATE ".MAIN_DB_PREFIX."don SET fk_statut = -1 WHERE rowid = ".$id;
@@ -806,6 +810,7 @@ class Don extends CommonObject
* @param string $param 1=promesses de dons validees , 2=xxx, 3=encaisses
* @return int Summ of donations
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function sum_donations($param)
{
global $conf;
@@ -832,6 +837,7 @@ class Don extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf;
diff --git a/htdocs/don/class/donstats.class.php b/htdocs/don/class/donstats.class.php
index dfe74b7f691..c7e2db2e7a4 100644
--- a/htdocs/don/class/donstats.class.php
+++ b/htdocs/don/class/donstats.class.php
@@ -131,4 +131,4 @@ class DonationStats extends Stats
return $this->_getAllByYear($sql);
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php
index 8d31c292155..e2f7ad18feb 100644
--- a/htdocs/don/class/paymentdonation.class.php
+++ b/htdocs/don/class/paymentdonation.class.php
@@ -452,6 +452,7 @@ class PaymentDonation 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;
@@ -576,6 +577,7 @@ class PaymentDonation 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."payment_donation SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id;
diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php
index a3669f909e9..18ee35c8884 100644
--- a/htdocs/ecm/class/ecmdirectory.class.php
+++ b/htdocs/ecm/class/ecmdirectory.class.php
@@ -495,6 +495,7 @@ class EcmDirectory // extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_motherof()
{
global $conf;
@@ -544,6 +545,7 @@ class EcmDirectory // 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, 5=Long label + Picto
* @return string Label of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
static function LibStatut($status,$mode=0)
{
global $langs;
@@ -570,6 +572,7 @@ class EcmDirectory // extends CommonObject
* @param int $force Force reload of full arbo even if already loaded in cache $this->cats
* @return array Tableau de array
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_full_arbo($force=0)
{
global $conf;
@@ -659,6 +662,7 @@ class EcmDirectory // 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=0)
{
// Define fullpath
@@ -746,6 +750,7 @@ class EcmDirectory // extends 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;
diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php
index df76bac3e9b..2ef219c27ee 100644
--- a/htdocs/ecm/class/ecmfiles.class.php
+++ b/htdocs/ecm/class/ecmfiles.class.php
@@ -342,7 +342,7 @@ class EcmFiles extends CommonObject
else {
$sql .= ' AND t.rowid = '.$this->db->escape($id); // rowid already unique
}
-
+
$this->db->plimit(1); // When we search on src or on hash of content (hashforfile) to solve hash conflict when several files has same content, we take first one only
$this->db->order('t.rowid', 'ASC');
@@ -789,6 +789,7 @@ class EcmFiles 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, 5=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/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index 448b13f43fa..b70c59b1b52 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -380,6 +380,7 @@ class Expedition extends CommonObject
* @param array $array_options extrafields array
* @return int <0 if KO, line_id if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_line($entrepot_id, $origin_line_id, $qty,$array_options=0)
{
$expeditionline = new ExpeditionLigne($this->db);
@@ -404,6 +405,7 @@ class Expedition extends CommonObject
* @param array $array_options extrafields array
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_line_batch($line_ext,$array_options=0)
{
$error = 0;
@@ -799,6 +801,7 @@ class Expedition extends CommonObject
* @param User $user User
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_delivery($user)
{
global $conf;
@@ -907,6 +910,7 @@ class Expedition extends CommonObject
* @param array $array_options extrafields array
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function addline_batch($dbatch,$array_options=0)
{
global $conf,$langs;
@@ -1293,6 +1297,7 @@ class Expedition extends CommonObject
*
* @return int >0 if OK, Otherwise if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
global $conf, $mysoc;
@@ -1581,6 +1586,7 @@ class Expedition 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 of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode)
{
global $langs;
@@ -1704,6 +1710,7 @@ class Expedition extends CommonObject
* @param timestamp $date_livraison Date de livraison
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison)
{
if ($user->rights->expedition->creer)
@@ -1736,6 +1743,7 @@ class Expedition extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_delivery_methods()
{
global $langs;
@@ -1763,6 +1771,7 @@ class Expedition extends CommonObject
* @param id $id only this carrier, all if none
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_delivery_methods($id='')
{
global $langs;
@@ -1798,6 +1807,7 @@ class Expedition extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_delivery_method($id='')
{
if ($id=='')
@@ -1826,6 +1836,7 @@ class Expedition extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function activ_delivery_method($id)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'c_shipment_mode SET active=1';
@@ -1842,6 +1853,7 @@ class Expedition extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function disable_delivery_method($id)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'c_shipment_mode SET active=0';
@@ -1858,6 +1870,7 @@ class Expedition extends CommonObject
* @param string $value Value
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function GetUrlTrackingStatus($value='')
{
if (! empty($this->shipping_method_id))
@@ -2042,6 +2055,7 @@ class Expedition extends CommonObject
*
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_billed()
{
global $user;
@@ -2728,4 +2742,3 @@ class ExpeditionLigne extends CommonObjectLine
}
}
}
-
diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php
index b7c81c4d33a..2668bce4e3b 100644
--- a/htdocs/expensereport/class/expensereport.class.php
+++ b/htdocs/expensereport/class/expensereport.class.php
@@ -547,6 +547,7 @@ class ExpenseReport extends CommonObject
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_paid($id, $fuser, $notrigger = 0)
{
$error = 0;
@@ -617,6 +618,7 @@ class ExpenseReport 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($status,$mode=0)
{
global $langs;
@@ -791,6 +793,7 @@ class ExpenseReport extends CommonObject
* @param User $user User
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_line_by_project($projectid,$user='')
{
global $conf,$db,$langs;
@@ -946,6 +949,7 @@ class ExpenseReport extends CommonObject
*
* @return int <0 if OK, >0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$this->lines=array();
@@ -1190,6 +1194,7 @@ class ExpenseReport extends CommonObject
* @param User $fuser User
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_save_from_refuse($fuser)
{
global $conf,$langs;
@@ -1362,6 +1367,7 @@ class ExpenseReport extends CommonObject
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_unpaid($fuser, $notrigger = 0)
{
$error = 0;
@@ -1422,6 +1428,7 @@ class ExpenseReport extends CommonObject
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_cancel($fuser,$detail, $notrigger=0)
{
$error = 0;
@@ -1605,6 +1612,7 @@ class ExpenseReport extends CommonObject
* @param string $ligne_total_tva Amount of all taxes
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_totaux_add($ligne_total_ht,$ligne_total_tva)
{
$this->total_ht = $this->total_ht + $ligne_total_ht;
@@ -1633,6 +1641,7 @@ class ExpenseReport extends CommonObject
* @param string $ligne_total_tva Amount of all taxes
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_totaux_del($ligne_total_ht,$ligne_total_tva)
{
$this->total_ht = $this->total_ht - $ligne_total_ht;
@@ -2051,6 +2060,7 @@ class ExpenseReport extends CommonObject
* @param Date $date_fin End date
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function periode_existe($fuser, $date_debut, $date_fin)
{
$sql = "SELECT rowid, date_debut, date_fin";
@@ -2105,6 +2115,7 @@ class ExpenseReport extends CommonObject
*
* @return array Array of user ids
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_users_approver_expensereport()
{
$users_validator=array();
@@ -2210,6 +2221,7 @@ class ExpenseReport extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf;
@@ -2246,6 +2258,7 @@ class ExpenseReport extends CommonObject
* @param string $option 'topay' or 'toapprove'
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user, $option='topay')
{
global $conf, $langs;
@@ -2681,6 +2694,7 @@ class ExpenseReportLine
* @param int $useshortlabel Use short labels
* @return string HTML select with status
*/
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempty=1, $useshortlabel=0)
{
global $db, $langs;
@@ -2716,6 +2730,7 @@ function select_expensereport_statut($selected='',$htmlname='fk_statut',$useempt
* @param int $active 1=Active only, 0=Unactive only, -1=All
* @return string Select html
*/
+// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_type_fees_id($selected='',$htmlname='type',$showempty=0, $active=1)
{
global $db,$langs,$user;
diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php
index 781b22d27e7..43ff275e9b0 100644
--- a/htdocs/expensereport/class/paymentexpensereport.class.php
+++ b/htdocs/expensereport/class/paymentexpensereport.class.php
@@ -47,9 +47,9 @@ class PaymentExpenseReport extends CommonObject
var $fk_bank;
var $fk_user_creat;
var $fk_user_modif;
- //Unknow field
- var $chid;
- var $total;
+ //Unknow field
+ var $chid;
+ var $total;
/**
* Constructor
@@ -450,6 +450,7 @@ class PaymentExpenseReport 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;
@@ -604,6 +605,7 @@ class PaymentExpenseReport 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."payment_expensereport SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id;
diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php
index 050318944d6..102552854b6 100644
--- a/htdocs/exports/class/export.class.php
+++ b/htdocs/exports/class/export.class.php
@@ -74,6 +74,7 @@ class Export
* @param string $filter Load a particular dataset only
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_arrays($user,$filter='')
{
global $langs,$conf,$mysoc;
@@ -213,6 +214,7 @@ class Export
* @param array $array_filterValue Filter records on array of value for fields
* @return string SQL String. Example "select s.rowid as r_rowid, s.status as s_status from ..."
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_sql($indice, $array_selected, $array_filterValue)
{
// Build the sql request
@@ -274,6 +276,7 @@ class Export
* @param string $ValueField Value of the field for filter. Must not be ''
* @return string sql string of then field ex : "field='xxx'>"
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_filterQuery($TypeField, $NameField, $ValueField)
{
//print $TypeField." ".$NameField." ".$ValueField;
@@ -367,6 +370,7 @@ class Export
* @param string $ValueField Initial value of the field to filter
* @return string html string of the input field ex : ""
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_filterField($TypeField, $NameField, $ValueField)
{
global $conf,$langs;
@@ -520,6 +524,7 @@ class Export
* @param string $sqlquery If set, transmit the sql request for select (otherwise, sql request is generated from arrays)
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_file($user, $model, $datatoexport, $array_selected, $array_filterValue, $sqlquery = '')
{
global $conf,$langs;
@@ -823,6 +828,7 @@ class Export
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_export_model()
{
global $conf, $langs;
@@ -873,4 +879,3 @@ class Export
}
}
-
diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php
index d14419f49b0..a30a8b302ac 100644
--- a/htdocs/fichinter/class/fichinter.class.php
+++ b/htdocs/fichinter/class/fichinter.class.php
@@ -98,6 +98,7 @@ class Fichinter extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $user;
@@ -628,6 +629,7 @@ class Fichinter 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)
{
// Init/load array of translation of status
@@ -970,6 +972,7 @@ class Fichinter extends CommonObject
* @param date $date_delivery date of delivery
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_delivery($user, $date_delivery)
{
global $conf;
@@ -1002,6 +1005,7 @@ class Fichinter extends CommonObject
* @param string $description description
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_description($user, $description)
{
global $conf;
@@ -1035,6 +1039,7 @@ class Fichinter extends CommonObject
* @param int $contractid Description
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_contrat($user, $contractid)
{
global $conf;
@@ -1241,6 +1246,7 @@ class Fichinter extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$this->lines = array();
@@ -1537,6 +1543,7 @@ class FichinterLigne extends CommonObjectLine
*
* @return int <0 si ko, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total()
{
global $conf;
@@ -1640,4 +1647,3 @@ class FichinterLigne extends CommonObjectLine
}
}
-
diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php
index ba486e066cc..27cbf0f8bb5 100644
--- a/htdocs/fourn/class/fournisseur.class.php
+++ b/htdocs/fourn/class/fournisseur.class.php
@@ -107,6 +107,7 @@ class Fournisseur extends Societe
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf, $user;
@@ -151,6 +152,7 @@ class Fournisseur extends Societe
* @param string $name Category name
* @return int <0 if KO, 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function CreateCategory($user, $name)
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (label,visible,type)";
@@ -177,6 +179,7 @@ class Fournisseur extends Societe
*
* @return array Array of suppliers
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function ListArray()
{
global $conf;
@@ -209,4 +212,3 @@ class Fournisseur extends Societe
}
}
-
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index dfceb8d4e73..ea319666eb3 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -198,7 +198,7 @@ class CommandeFournisseur extends CommonOrder
* @param string $ref Ref of object
* @return int >0 if OK, <0 if KO, 0 if not found
*/
- public function fetch($id,$ref='')
+ public function fetch($id, $ref='')
{
global $conf;
@@ -331,6 +331,7 @@ class CommandeFournisseur 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)
{
//$result=$this->fetch_lines();
@@ -572,6 +573,7 @@ class CommandeFournisseur extends CommonOrder
* @param int $billed 1=Billed
* @return string Label of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0,$billed=0)
{
global $conf, $langs;
@@ -1034,6 +1036,7 @@ class CommandeFournisseur extends CommonOrder
* @param int $idwarehouse Id warehouse to use for stock change (not used for supplier orders).
* @return int >0 if Ok, <0 if Ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Cancel($user, $idwarehouse=-1)
{
global $langs,$conf;
@@ -1096,6 +1099,7 @@ class CommandeFournisseur extends CommonOrder
* @param string $comment Comment
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
public function commande($user, $date, $methode, $comment='')
{
global $langs;
@@ -1950,6 +1954,7 @@ class CommandeFournisseur extends CommonOrder
*
* @return 0 if Ok, <0 if Ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_methodes_commande()
{
$sql = "SELECT rowid, libelle";
@@ -2039,6 +2044,7 @@ class CommandeFournisseur extends CommonOrder
* @param string $comment Comment
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function Livraison($user, $date, $type, $comment)
{
global $conf, $langs;
@@ -2154,6 +2160,7 @@ class CommandeFournisseur 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_livraison($user, $date_livraison, $notrigger=0)
{
if ($user->rights->fournisseur->commande->creer)
@@ -2218,6 +2225,7 @@ class CommandeFournisseur 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_id_projet($user, $id_projet, $notrigger=0)
{
if ($user->rights->fournisseur->commande->creer)
@@ -2674,6 +2682,7 @@ class CommandeFournisseur extends CommonOrder
*
* @return int <0 si ko, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf, $user;
@@ -2716,6 +2725,7 @@ class CommandeFournisseur extends CommonOrder
* @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;
@@ -2812,7 +2822,7 @@ class CommandeFournisseur extends CommonOrder
* @param int $hidedetails Hide details of lines
* @param int $hidedesc Hide description
* @param int $hideref Hide ref
- * @param null|array $moreparams Array to provide more information
+ * @param null|array $moreparams Array to provide more information
* @return int 0 if KO, 1 if OK
*/
public function generateDocument($modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $moreparams=null)
@@ -3475,4 +3485,3 @@ class CommandeFournisseurLigne extends CommonOrderLine
}
}
}
-
diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
index 910115d8822..5bf92bf24f1 100644
--- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
@@ -467,6 +467,7 @@ class CommandeFournisseurDispatch 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 of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php
index 8ce8b796892..8cbd871c8f7 100644
--- a/htdocs/fourn/class/fournisseur.facture.class.php
+++ b/htdocs/fourn/class/fournisseur.facture.class.php
@@ -11,7 +11,7 @@
* Copyright (C) 2015 Bahfir Abbes
* Copyright (C) 2015 Ferran Marcet
* Copyright (C) 2016 Alexandre Spangaro
- * Copyright (C) 2018 Nicolas ZABOURI
+ * Copyright (C) 2018 Nicolas ZABOURI
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -659,8 +659,9 @@ class FactureFournisseur extends CommonInvoice
/**
* Load this->lines
*
- * @return int 1 si ok, < 0 si erreur
+ * @return int 1 si ok, < 0 si erreur
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx';
@@ -883,6 +884,7 @@ class FactureFournisseur 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;
@@ -1136,6 +1138,7 @@ class FactureFournisseur extends CommonInvoice
* @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet. Not implementd yet.
* @return int <0 si ko, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_paid($user, $close_code='', $close_note='')
{
global $conf,$langs;
@@ -1184,6 +1187,7 @@ class FactureFournisseur extends CommonInvoice
* @param User $user Object user that change status
* @return int <0 si ok, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_unpaid($user)
{
global $conf,$langs;
@@ -1394,6 +1398,7 @@ class FactureFournisseur 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;
@@ -1952,9 +1957,10 @@ class FactureFournisseur extends CommonInvoice
* Renvoi liste des factures remplacables
* Statut validee ou abandonnee pour raison autre + non payee + aucun paiement + pas deja remplacee
*
- * @param int $socid Id societe
+ * @param int $socid Id societe
* @return array Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_replacable_supplier_invoices($socid=0)
{
global $conf;
@@ -2002,6 +2008,7 @@ class FactureFournisseur extends CommonInvoice
* @param int $socid Id societe
* @return array Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_qualified_avoir_supplier_invoices($socid=0)
{
global $conf;
@@ -2050,6 +2057,7 @@ class FactureFournisseur 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;
@@ -2344,7 +2352,8 @@ class FactureFournisseur extends CommonInvoice
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
*
* @return int <0 if KO, >0 if OK
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf, $user;
@@ -2748,10 +2757,10 @@ class SupplierInvoiceLine extends CommonObjectLine
$this->rang = $obj->rang;
$this->fk_unit = $obj->fk_unit;
- $this->multicurrency_subprice = $obj->multicurrency_subprice;
- $this->multicurrency_total_ht = $obj->multicurrency_total_ht;
- $this->multicurrency_total_tva = $obj->multicurrency_total_tva;
- $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
+ $this->multicurrency_subprice = $obj->multicurrency_subprice;
+ $this->multicurrency_total_ht = $obj->multicurrency_total_ht;
+ $this->multicurrency_total_tva = $obj->multicurrency_total_tva;
+ $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
$this->fetch_optionals();
@@ -3066,6 +3075,7 @@ class SupplierInvoiceLine extends CommonObjectLine
*
* @return int <0 si ko, >0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total()
{
$this->db->begin();
diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php
index e7b3a292df1..6cb1ff2bb27 100644
--- a/htdocs/fourn/class/fournisseur.product.class.php
+++ b/htdocs/fourn/class/fournisseur.product.class.php
@@ -99,6 +99,7 @@ class ProductFournisseur extends Product
* @param int $id_fourn Supplier Id
* @return int < 0 if error, > 0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function remove_fournisseur($id_fourn)
{
$ok=1;
@@ -135,6 +136,7 @@ class ProductFournisseur extends Product
* @param int $rowid Line id of price
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function remove_product_fournisseur_price($rowid)
{
global $conf, $user;
@@ -163,10 +165,10 @@ class ProductFournisseur extends Product
}
}
- if (empty($error)){
+ if (empty($error)) {
$this->db->commit();
return 1;
- }else{
+ } else {
$this->db->rollback();
return -1;
}
@@ -200,6 +202,7 @@ class ProductFournisseur extends Product
* @param string $desc_fourn Custom description for product_fourn_price
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0, $supplier_reputation='', $localtaxes_array=array(), $newdefaultvatcode='', $multicurrency_buyprice=0, $multicurrency_price_base_type='HT',$multicurrency_tx=1,$multicurrency_code='', $desc_fourn='')
{
global $conf, $langs;
@@ -435,6 +438,7 @@ class ProductFournisseur extends Product
* @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead
* @return int < 0 if KO, 0 if OK but not found, > 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_product_fournisseur_price($rowid, $ignore_expression = 0)
{
global $conf;
@@ -525,6 +529,7 @@ class ProductFournisseur extends Product
* @param int $offset Offset
* @return array Array of Products with new properties to define supplier price
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_product_fournisseur_price($prodid, $sortfield='', $sortorder='', $limit=0, $offset=0)
{
global $conf;
@@ -623,6 +628,7 @@ class ProductFournisseur extends Product
* @param int $socid get min price for specific supplier
* @return int <0 if KO, 0=Not found of no product id provided, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function find_min_price_product_fournisseur($prodid, $qty=0, $socid=0)
{
global $conf;
@@ -813,6 +819,7 @@ class ProductFournisseur extends Product
* to display in table format.
* @return string String with supplier price
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function display_price_product_fournisseur($showunitprice=1,$showsuptitle=1,$maxlen=0,$notooltip=0, $productFournList=array())
{
global $langs;
diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php
index 49a24acf72b..6de1453044f 100644
--- a/htdocs/fourn/class/paiementfourn.class.php
+++ b/htdocs/fourn/class/paiementfourn.class.php
@@ -504,6 +504,7 @@ class PaiementFourn extends Paiement
* @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;
@@ -762,11 +763,12 @@ class PaiementFourn extends Paiement
/**
- * 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)
{
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php
index c8b64790061..51a547fb940 100644
--- a/htdocs/holiday/class/holiday.class.php
+++ b/htdocs/holiday/class/holiday.class.php
@@ -418,7 +418,7 @@ class Holiday extends CommonObject
}
else
{
- // SQL Error
+ // SQL Error
$this->error="Error ".$this->db->lasterror();
return -1;
}
@@ -542,7 +542,7 @@ class Holiday extends CommonObject
}
else
{
- // SQL Error
+ // SQL Error
$this->error="Error ".$this->db->lasterror();
return -1;
}
@@ -921,6 +921,7 @@ class Holiday extends CommonObject
* @param date $startdate Date holiday should start
* @return string Label
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut, $mode=0, $startdate='')
{
global $langs;
@@ -1576,6 +1577,7 @@ class Holiday extends CommonObject
*
* @return array Array of user ids
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_users_approver_holiday()
{
$users_validator=array();
diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php
index 8a99788d040..b219c1b4a59 100644
--- a/htdocs/hrm/class/establishment.class.php
+++ b/htdocs/hrm/class/establishment.class.php
@@ -34,7 +34,7 @@ class Establishment extends CommonObject
public $fk_element = 'fk_establishment';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto='building';
-
+
public $id;
public $ref;
public $rowid;
@@ -208,7 +208,7 @@ class Establishment extends CommonObject
$this->country_id = $obj->country_id;
$this->country_code = $obj->country_code;
- $this->country = $obj->country;
+ $this->country = $obj->country;
return 1;
}
@@ -264,6 +264,7 @@ class Establishment 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($status,$mode=0)
{
global $langs;
@@ -386,7 +387,7 @@ class Establishment extends CommonObject
return '';
}
-
+
/**
* Initialise object with example values
* Id must be 0 if object instance is a specimen
@@ -397,5 +398,5 @@ class Establishment extends CommonObject
{
$this->id = 0;
$this->ref = 'DEAAA';
- }
+ }
}
diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php
index f8754193515..bb7143f8dc6 100644
--- a/htdocs/imports/class/import.class.php
+++ b/htdocs/imports/class/import.class.php
@@ -65,6 +65,7 @@ class Import
* @param string $filter Load a particular dataset only. Index will start to 0.
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_arrays($user,$filter='')
{
global $langs,$conf;
@@ -186,6 +187,7 @@ class Import
* @param string $datatoimport Dataset to import
* @return string <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_example_file($model, $headerlinefields, $contentlinevalues,$datatoimport)
{
global $conf,$langs;
diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php
index 46b3c113ff2..1911b40a30e 100644
--- a/htdocs/livraison/class/livraison.class.php
+++ b/htdocs/livraison/class/livraison.class.php
@@ -221,6 +221,7 @@ class Livraison extends CommonObject
* @param string $description Description
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_line($origin_id, $qty, $fk_product, $description)
{
$error = 0;
@@ -490,6 +491,7 @@ class Livraison extends CommonObject
* @param int $sending_id Id de l'expedition qui sert de modele
* @return integer
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_from_sending($user, $sending_id)
{
$expedition = new Expedition($this->db);
@@ -535,6 +537,7 @@ class Livraison extends CommonObject
* @param array $array_options extrafields array
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_line($id, $array_options=0)
{
global $conf;
@@ -730,6 +733,7 @@ class Livraison extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$this->lines = array();
@@ -801,6 +805,7 @@ class Livraison 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)
{
global $langs;
@@ -972,6 +977,7 @@ class Livraison extends CommonObject
* @param timestamp $date_livraison Date de livraison
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison)
{
if ($user->rights->expedition->creer)
diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php
index 7843694585f..789a3367d79 100644
--- a/htdocs/loan/class/loan.class.php
+++ b/htdocs/loan/class/loan.class.php
@@ -332,6 +332,7 @@ class Loan 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."loan SET";
@@ -366,6 +367,7 @@ class Loan extends CommonObject
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @return string Label
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0,$alreadypaid=-1)
{
global $langs;
diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php
index a430f79366e..811143602e0 100644
--- a/htdocs/loan/class/loanschedule.class.php
+++ b/htdocs/loan/class/loanschedule.class.php
@@ -367,6 +367,7 @@ class LoanSchedule extends CommonObject
}
}
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function calc_mens($capital,$rate,$nbterm)
{
$result='';
@@ -452,6 +453,7 @@ class LoanSchedule extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function trans_paiment()
{
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
@@ -540,4 +542,3 @@ class LoanSchedule extends CommonObject
return $result;
}
}
-
diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php
index 595aead109e..975f091fdcc 100644
--- a/htdocs/loan/class/paymentloan.class.php
+++ b/htdocs/loan/class/paymentloan.class.php
@@ -209,8 +209,8 @@ class PaymentLoan extends CommonObject
$this->type_code = $obj->type_code;
$this->type_libelle = $obj->type_libelle;
- $this->bank_account = $obj->fk_account;
- $this->bank_line = $obj->fk_bank;
+ $this->bank_account = $obj->fk_account;
+ $this->bank_line = $obj->fk_bank;
}
$this->db->free($resql);
@@ -250,7 +250,6 @@ class PaymentLoan extends CommonObject
if (isset($this->fk_user_modif)) $this->fk_user_modif=trim($this->fk_user_modif);
// Check parameters
- // Put here code to add control on parameters values
// Update request
$sql = "UPDATE ".MAIN_DB_PREFIX."payment_loan SET";
@@ -478,6 +477,7 @@ class PaymentLoan 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."payment_loan SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id;
diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php
index f7ae2608da5..8782e683f8a 100644
--- a/htdocs/mailmanspip/class/mailmanspip.class.php
+++ b/htdocs/mailmanspip/class/mailmanspip.class.php
@@ -169,6 +169,7 @@ class MailmanSpip
* @param Adherent $object Object with data (->firstname, ->lastname, ->email and ->login)
* @return int =0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_spip($object)
{
dol_syslog(get_class($this)."::add_to_spip");
@@ -211,6 +212,7 @@ class MailmanSpip
* @param Adherent $object Object with data (->login)
* @return int =0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_to_spip($object)
{
dol_syslog(get_class($this)."::del_to_spip");
@@ -250,6 +252,7 @@ class MailmanSpip
* @param object $object Object with data (->login)
* @return int 1=exists, 0=does not exists, -1=error
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_in_spip($object)
{
if ($this->isSpipEnabled())
@@ -301,6 +304,7 @@ class MailmanSpip
* @param array $listes To force mailing-list (string separated with ,)
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_mailman($object,$listes='')
{
global $conf,$langs,$user;
@@ -373,6 +377,7 @@ class MailmanSpip
* @param array $listes To force mailing-list (string separated with ,)
* @return int <0 if KO, >=0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_to_mailman($object,$listes='')
{
global $conf,$langs,$user;
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index c6cd6fae901..22e1fb1940d 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -366,6 +366,7 @@ class MyObject 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
function LibStatut($status, $mode=0)
{
if (empty($this->labelstatus))
diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
index cd8612cb7d1..dd9cbc80c0e 100644
--- a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
+++ b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php
@@ -95,6 +95,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
* @param array $filtersarray Requete sql de selection des destinataires
* @return int <0 if error, number of emails added if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_target($mailing_id,$filtersarray=array())
{
$target = array();
@@ -197,4 +198,3 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets
}
}
-
diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php
index 8169cd9961f..075d90cf63c 100644
--- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php
+++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php
@@ -74,7 +74,7 @@ class modMyModule extends DolibarrModules
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'
$this->version = '1.0';
-
+
//Url to the file with your last numberversion of this module
$this->url_last_version = 'http://www.example.com/versionmodule.txt';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
@@ -89,19 +89,19 @@ class modMyModule extends DolibarrModules
// for specific path of parts (eg: /mymodule/core/modules/barcode)
// for specific css file (eg: /mymodule/css/mymodule.css.php)
$this->module_parts = array(
- 'triggers' => 1, // Set this to 1 if module has its own trigger directory (core/triggers)
- 'login' => 0, // Set this to 1 if module has its own login method file (core/login)
- 'substitutions' => 1, // Set this to 1 if module has its own substitution function file (core/substitutions)
- 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus)
- 'theme' => 0, // Set this to 1 if module has its own theme directory (theme)
- 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
- 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
- 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
- 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
- 'js' => array('/mymodule/js/mymodule.js.php'), // Set this to relative path of js file if module must load a js on all pages
- 'hooks' => array('data'=>array('hookcontext1','hookcontext2'), 'entity'=>'0'), // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
- 'moduleforexternal' => 0 // Set this to 1 if feature of module are opened to external users
- );
+ 'triggers' => 1, // Set this to 1 if module has its own trigger directory (core/triggers)
+ 'login' => 0, // Set this to 1 if module has its own login method file (core/login)
+ 'substitutions' => 1, // Set this to 1 if module has its own substitution function file (core/substitutions)
+ 'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus)
+ 'theme' => 0, // Set this to 1 if module has its own theme directory (theme)
+ 'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
+ 'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
+ 'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
+ 'css' => array('/mymodule/css/mymodule.css.php'), // Set this to relative path of css file if module has its own css file
+ 'js' => array('/mymodule/js/mymodule.js.php'), // Set this to relative path of js file if module must load a js on all pages
+ 'hooks' => array('data'=>array('hookcontext1','hookcontext2'), 'entity'=>'0'), // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
+ 'moduleforexternal' => 0 // Set this to 1 if feature of module are opened to external users
+ );
// Data directories to create when module is enabled.
// Example: this->dirs = array("/mymodule/temp","/mymodule/subdir");
diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php
index d80bac70b79..09fa55768bf 100644
--- a/htdocs/opensurvey/class/opensurveysondage.class.php
+++ b/htdocs/opensurvey/class/opensurveysondage.class.php
@@ -464,6 +464,7 @@ class Opensurveysondage extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines()
{
$ret=array();
@@ -621,6 +622,7 @@ class Opensurveysondage 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($status,$mode)
{
global $langs, $conf;
diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php
index a6a182fc64f..b6c036825c8 100644
--- a/htdocs/product/canvas/product/actions_card_product.class.php
+++ b/htdocs/product/canvas/product/actions_card_product.class.php
@@ -72,6 +72,7 @@ class ActionsCardProduct
* @param string $ref Ref of object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id=0, $ref='')
{
global $limit, $offset, $sortfield, $sortorder;
@@ -304,6 +305,7 @@ class ActionsCardProduct
* @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;
@@ -433,4 +435,3 @@ class ActionsCardProduct
}
}
-
diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php
index 108c6ccb748..4f418517c6b 100644
--- a/htdocs/product/canvas/service/actions_card_service.class.php
+++ b/htdocs/product/canvas/service/actions_card_service.class.php
@@ -71,6 +71,7 @@ class ActionsCardService
* @param string $ref Ref of object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id=0, $ref='')
{
global $limit, $offset, $sortfield, $sortorder;
@@ -282,6 +283,7 @@ class ActionsCardService
* @param string $sortorder Sort order ('ASC' or 'DESC')
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{
global $conf;
@@ -365,4 +367,3 @@ class ActionsCardService
}
}
-
diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php
index 6ae31645a50..3fa1ada3b15 100644
--- a/htdocs/product/class/html.formproduct.class.php
+++ b/htdocs/product/class/html.formproduct.class.php
@@ -167,6 +167,7 @@ class FormProduct
* @param String $final_label full label with all parents, separated by ' >> ' (completed on each call)
* @return String full label with all parents, separated by ' >> '
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function get_parent_path($tab, $final_label='') {
if(empty($final_label)) $final_label = $tab['label'];
@@ -284,6 +285,7 @@ class FormProduct
* @param int $adddefault Add empty unit called "Default"
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_measuring_units($name='measuring_units', $measuring_style='', $default='0', $adddefault=0)
{
print $this->load_measuring_units($name, $measuring_style, $default, $adddefault);
@@ -299,6 +301,7 @@ class FormProduct
* @param int $adddefault Add empty unit called "Default"
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_measuring_units($name='measuring_units', $measuring_style='', $default='0', $adddefault=0)
{
global $langs,$conf,$mysoc;
@@ -483,4 +486,4 @@ class FormProduct
}
}
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index d19f8f86732..bc5d609c48a 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -688,13 +688,14 @@ class Product extends CommonObject
/**
* Check barcode
*
- * @param string $valuetotest Value to test
+ * @param string $valuetotest Value to test
* @param string $typefortest Type of barcode (ISBN, EAN, ...)
* @return int 0 if OK
* -1 ErrorBadBarCodeSyntax
* -2 ErrorBarCodeRequired
* -3 ErrorBarCodeAlreadyUsed
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function check_barcode($valuetotest,$typefortest)
{
global $conf;
@@ -1445,6 +1446,7 @@ class Product extends CommonObject
* @param int $level price level to change
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _log_price($user,$level=0)
{
global $conf;
@@ -1483,6 +1485,7 @@ class Product extends CommonObject
* @param int $rowid Line id to delete
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function log_price_delete($user, $rowid)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_price_by_qty";
@@ -1516,6 +1519,7 @@ class Product extends CommonObject
* @param int $fk_soc If of supplier
* @return int <-1 if KO, -1 if qty not enough, 0 if OK but nothing found, id_product if OK and found. May also initialize some properties like (->ref_supplier, buyprice, fourn_pu, vatrate_supplier...)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_buyprice($prodfournprice, $qty, $product_id=0, $fourn_ref='', $fk_soc=0)
{
global $conf;
@@ -2211,6 +2215,7 @@ class Product extends CommonObject
* @param int $socid Id societe
* @return array Tableau des stats
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_propale($socid=0)
{
global $conf;
@@ -2254,6 +2259,7 @@ class Product extends CommonObject
* @param int $socid Id thirdparty
* @return array Tableau des stats
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_proposal_supplier($socid=0)
{
global $conf;
@@ -2299,6 +2305,7 @@ class Product extends CommonObject
* @param int $forVirtualStock Ignore rights filter for virtual stock calculation.
* @return array Array of stats (nb=nb of order, qty=qty ordered)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_commande($socid=0,$filtrestatut='', $forVirtualStock = 0)
{
global $conf,$user;
@@ -2395,6 +2402,7 @@ class Product extends CommonObject
* @param int $forVirtualStock Ignore rights filter for virtual stock calculation.
* @return array Tableau des stats
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_commande_fournisseur($socid=0,$filtrestatut='', $forVirtualStock = 0)
{
global $conf,$user;
@@ -2438,6 +2446,7 @@ class Product extends CommonObject
* @param int $forVirtualStock Ignore rights filter for virtual stock calculation.
* @return array Tableau des stats
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_sending($socid=0,$filtrestatut='', $forVirtualStock = 0)
{
global $conf,$user;
@@ -2485,6 +2494,7 @@ class Product extends CommonObject
* @param int $forVirtualStock Ignore rights filter for virtual stock calculation.
* @return array Tableau des stats
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_reception($socid=0,$filtrestatut='', $forVirtualStock = 0)
{
global $conf,$user;
@@ -2526,6 +2536,7 @@ class Product extends CommonObject
* @param int $socid Id societe
* @return array Tableau des stats
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_contrat($socid=0)
{
global $conf;
@@ -2568,6 +2579,7 @@ class Product extends CommonObject
* @param int $socid Id societe
* @return array Tableau des stats
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_facture($socid=0)
{
global $conf;
@@ -2610,6 +2622,7 @@ class Product extends CommonObject
* @param int $socid Id societe
* @return array Tableau des stats
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stats_facture_fournisseur($socid=0)
{
global $conf;
@@ -2654,6 +2667,7 @@ class Product extends CommonObject
* @param int $year Year (0=current year)
* @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _get_stats($sql, $mode, $year=0)
{
$resql = $this->db->query($sql);
@@ -2720,6 +2734,7 @@ class Product extends CommonObject
* @param string $morefilter More sql filters
* @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_nb_vente($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='')
{
global $conf;
@@ -2756,6 +2771,7 @@ class Product extends CommonObject
* @param string $morefilter More sql filters
* @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_nb_achat($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='')
{
global $conf;
@@ -2791,6 +2807,7 @@ class Product extends CommonObject
* @param string $morefilter More sql filters
* @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_nb_propal($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='')
{
global $conf;
@@ -2826,6 +2843,7 @@ class Product extends CommonObject
* @param string $morefilter More sql filters
* @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_nb_propalsupplier($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='')
{
global $conf;
@@ -2861,6 +2879,7 @@ class Product extends CommonObject
* @param string $morefilter More sql filters
* @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_nb_order($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='')
{
global $conf, $user;
@@ -2895,6 +2914,7 @@ class Product extends CommonObject
* @param string $morefilter More sql filters
* @return array <0 if KO, result[month]=array(valuex,valuey) where month is 0 to 11
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_nb_ordersupplier($socid, $mode, $filteronproducttype=-1, $year=0, $morefilter='')
{
global $conf, $user;
@@ -2928,6 +2948,7 @@ class Product extends CommonObject
* @param int $incdec 1=Increase/decrease stock of child when parent stock increase/decrease
* @return int < 0 if KO, > 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_sousproduit($id_pere, $id_fils, $qty, $incdec=1)
{
// Clean parameters
@@ -2984,6 +3005,7 @@ class Product extends CommonObject
* @param int $incdec 1=Increase/decrease stock of child when parent stock increase/decrease
* @return int < 0 if KO, > 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_sousproduit($id_pere, $id_fils, $qty, $incdec=1)
{
// Clean parameters
@@ -3016,6 +3038,7 @@ class Product extends CommonObject
* @param int $fk_child Id du produit a ne plus lie
* @return int < 0 if KO, > 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_sousproduit($fk_parent, $fk_child)
{
if (! is_numeric($fk_parent)) $fk_parent=0;
@@ -3042,6 +3065,7 @@ class Product extends CommonObject
* @param int $fk_child Id du produit lie
* @return int < 0 si erreur, > 0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_sousproduit($fk_parent, $fk_child)
{
$sql = "SELECT fk_product_pere, qty, incdec";
@@ -3085,6 +3109,7 @@ class Product extends CommonObject
* @param float $quantity Quantity minimum for price
* @return int < 0 if KO, 0 if link already exists for this product, > 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_fournisseur($user, $id_fourn, $ref_fourn, $quantity)
{
global $conf;
@@ -3184,6 +3209,7 @@ class Product extends CommonObject
*
* @return array Tableau des id de fournisseur
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_suppliers()
{
global $conf;
@@ -3218,6 +3244,7 @@ class Product extends CommonObject
* @param int $toId Id product target
* @return nt < 0 if KO, > 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function clone_price($fromId, $toId)
{
$this->db->begin();
@@ -3246,6 +3273,7 @@ class Product extends CommonObject
* @param int $toId Product id
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function clone_associations($fromId, $toId)
{
$this->db->begin();
@@ -3272,6 +3300,7 @@ class Product extends CommonObject
* @param int $toId Id produit cible
* @return int < 0 si erreur, > 0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function clone_fournisseurs($fromId, $toId)
{
$this->db->begin();
@@ -3323,6 +3352,7 @@ class Product extends CommonObject
* @param int $id_parent Id parent
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_prod_arbo($prod, $compl_path="", $multiply=1, $level=1, $id_parent=0)
{
global $conf,$langs;
@@ -3378,6 +3408,7 @@ class Product extends CommonObject
* @param int $multiply Because each sublevel must be multiplicated by parent nb
* @return array $this->res
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_arbo_each_prod($multiply=1)
{
$this->res = array();
@@ -3527,6 +3558,7 @@ class Product extends CommonObject
*
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_sousproduits_arbo()
{
$parent=array();
@@ -3730,6 +3762,7 @@ class Product extends CommonObject
* @param int $type 0=Status "to sell", 1=Status "to buy", 2=Status "to Batch"
* @return string Label of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status,$mode=0,$type=0)
{
global $conf, $langs;
@@ -3830,6 +3863,7 @@ class Product extends CommonObject
* @param int $origin_id Origin id of element
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function correct_stock($user, $id_entrepot, $nbpiece, $movement, $label='', $price=0, $inventorycode='', $origin_element='', $origin_id=null)
{
if ($id_entrepot)
@@ -3878,6 +3912,7 @@ class Product extends CommonObject
* @param int $origin_id Origin id of element
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function correct_stock_batch($user, $id_entrepot, $nbpiece, $movement, $label='', $price=0, $dlc='', $dluo='',$lot='', $inventorycode='', $origin_element='', $origin_id=null)
{
if ($id_entrepot)
@@ -3923,6 +3958,7 @@ class Product extends CommonObject
* @return int < 0 if KO, > 0 if OK
* @see load_virtual_stock, getBatchInfo
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_stock($option='')
{
global $conf;
@@ -3996,6 +4032,7 @@ class Product extends CommonObject
* @return int < 0 if KO, > 0 if OK
* @see load_stock, getBatchInfo
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_virtual_stock()
{
global $conf;
@@ -4095,6 +4132,7 @@ class Product extends CommonObject
* @param string $file Array of file info of file to upload: array('name'=>..., 'tmp_name'=>...)
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_photo($sdir, $file)
{
global $conf;
@@ -4135,6 +4173,7 @@ class Product extends CommonObject
* @param string $sdir Directory to scan
* @return boolean True if at least one photo is available, False if not
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_photo_available($sdir)
{
include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php';
@@ -4172,6 +4211,7 @@ class Product 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';
@@ -4226,6 +4266,7 @@ class Product extends CommonObject
* @param string $file Chemin de l'image
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_photo($file)
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
@@ -4261,6 +4302,7 @@ class Product extends CommonObject
* @param string $file Path to file
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_image_size($file)
{
$file_osencoded=dol_osencode($file);
@@ -4274,6 +4316,7 @@ class Product extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf, $user, $hookmanager;
@@ -4339,6 +4382,7 @@ class Product extends CommonObject
* @param string $type Barcode type (ean, isbn, ...)
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_barcode($object,$type='')
{
global $conf;
@@ -4466,6 +4510,7 @@ class Product extends CommonObject
*
* @return int Minimum recommanded price that is higher price among all suppliers * PRODUCT_MINIMUM_RECOMMENDED_PRICE
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function min_recommended_price()
{
global $conf;
diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php
index fdff7b1fe6d..e1eddde724d 100644
--- a/htdocs/product/class/productcustomerprice.class.php
+++ b/htdocs/product/class/productcustomerprice.class.php
@@ -304,6 +304,7 @@ class Productcustomerprice extends CommonObject
* @param array $filter Filter for select
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_all($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = array())
{
global $langs;
@@ -342,7 +343,7 @@ class Productcustomerprice extends CommonObject
$sql .= " AND prod.rowid=t.fk_product ";
$sql .= " AND prod.entity IN (" . getEntity('product') . ")";
$sql .= " AND t.entity IN (" . getEntity('productprice') . ")";
-
+
// Manage filter
if (count($filter) > 0) {
foreach ( $filter as $key => $value ) {
@@ -417,6 +418,7 @@ class Productcustomerprice extends CommonObject
* @param array $filter Filter for sql request
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_all_log($sortorder, $sortfield, $limit, $offset, $filter = array())
{
global $langs;
diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php
index 92c6ffadca4..c82cbf279aa 100644
--- a/htdocs/product/class/propalmergepdfproduct.class.php
+++ b/htdocs/product/class/propalmergepdfproduct.class.php
@@ -223,6 +223,7 @@ class Propalmergepdfproduct extends CommonObject
* @param string $lang Lang string code
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_by_product($product_id, $lang='')
{
global $langs,$conf;
@@ -313,9 +314,6 @@ class Propalmergepdfproduct extends CommonObject
if (isset($this->fk_user_mod)) $this->fk_user_mod=trim($this->fk_user_mod);
if (isset($this->lang)) $this->lang=trim($this->lang);
-
-
-
// Check parameters
// Put here code to add a control on parameters values
@@ -440,6 +438,7 @@ class Propalmergepdfproduct extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_by_product($user, $product_id, $lang_id='', $notrigger=0)
{
global $conf, $langs;
@@ -501,6 +500,7 @@ class Propalmergepdfproduct extends CommonObject
* @param User $user User that deletes
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function delete_by_file($user)
{
global $conf, $langs;
diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php
index 5ce3068c144..b3f47b4a224 100644
--- a/htdocs/product/dynamic_price/class/price_expression.class.php
+++ b/htdocs/product/dynamic_price/class/price_expression.class.php
@@ -127,7 +127,7 @@ class PriceExpression
$this->error='ErrorWrongParameters';
return -1;
}
-
+
$sql = "SELECT title, expression";
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
$sql.= " WHERE rowid = ".$id;
@@ -161,6 +161,7 @@ class PriceExpression
*
* @return array Array of price expressions
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_price_expression()
{
$sql = "SELECT rowid, title, expression";
@@ -199,6 +200,7 @@ class PriceExpression
* @param String $title Title of expression
* @return int < 0 if KO, 0 if OK but not found, > 0 rowid
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function find_title($title)
{
$sql = "SELECT rowid";
@@ -299,7 +301,7 @@ class PriceExpression
$error=0;
$rowid = $this->id;
-
+
$this->db->begin();
if (! $error)
diff --git a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php
index f4595062098..d68c7e5318c 100644
--- a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php
+++ b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php
@@ -538,6 +538,7 @@ class PriceGlobalVariableUpdater
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_next_update($next_update, $user=0, $notrigger=0)
{
$error=0;
@@ -582,6 +583,7 @@ class PriceGlobalVariableUpdater
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_status($last_status, $user=0, $notrigger=0)
{
$error=0;
diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php
index 867a30faaeb..3249671d173 100644
--- a/htdocs/product/dynamic_price/class/price_parser.class.php
+++ b/htdocs/product/dynamic_price/class/price_parser.class.php
@@ -335,4 +335,4 @@ class PriceParser
));
return $this->parseExpression($product, $expression, $extra_values);
}
-}
\ No newline at end of file
+}
diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php
index dc4f600b529..66411a0f978 100644
--- a/htdocs/product/inventory/class/inventory.class.php
+++ b/htdocs/product/inventory/class/inventory.class.php
@@ -76,7 +76,7 @@ class Inventory extends CommonObject
*/
public $fields=array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>'Id',),
- 'ref' => array('type'=>'varchar(64)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>'Reference of object', 'css'=>'maxwidth200'),
+ 'ref' => array('type'=>'varchar(64)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>'Reference of object', 'css'=>'maxwidth200'),
'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,),
'title' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>25, 'css'=>'minwidth300'),
'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'Warehouse', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'index'=>1, 'help'=>'LinkToThirparty'),
@@ -340,6 +340,7 @@ class Inventory 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, 5=Long 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/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php
index 039918ea66c..c99ac259bd3 100644
--- a/htdocs/product/stock/class/entrepot.class.php
+++ b/htdocs/product/stock/class/entrepot.class.php
@@ -416,6 +416,7 @@ class Entrepot extends CommonObject
* @param int $status Status
* @return array Array list of warehouses
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function list_array($status=1)
{
$liste = array();
@@ -446,6 +447,7 @@ class Entrepot extends CommonObject
*
* @return Array Array('nb'=>Nb, 'value'=>Value)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function nb_different_products()
{
$ret=array();
@@ -478,6 +480,7 @@ class Entrepot extends CommonObject
*
* @return Array Array('nb'=>Nb, 'value'=>Value)
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function nb_products()
{
$ret=array();
@@ -524,6 +527,7 @@ class Entrepot 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 of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
@@ -648,6 +652,7 @@ class Entrepot extends CommonObject
*
* @return string String full path to current warehouse separated by " >> "
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_full_arbo()
{
global $user,$langs,$conf;
@@ -690,6 +695,7 @@ class Entrepot extends CommonObject
* @param array() $TChildWarehouses array which will contain all children (param by reference)
* @return array() $TChildWarehouses array which will contain all children
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_children_warehouses($id, &$TChildWarehouses) {
$sql = 'SELECT rowid
@@ -707,7 +713,7 @@ class Entrepot extends CommonObject
return $TChildWarehouses;
}
-
+
/**
* Create object on disk
*
diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php
index 41c00b7361c..151a625fdc6 100644
--- a/htdocs/product/stock/class/mouvementstock.class.php
+++ b/htdocs/product/stock/class/mouvementstock.class.php
@@ -864,6 +864,7 @@ class MouvementStock extends CommonObject
* @param int $origintype Type origin
* @return string
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_origin($fk_origin, $origintype)
{
$origin='';
@@ -1016,6 +1017,7 @@ class MouvementStock 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($mode=0)
{
global $langs;
diff --git a/htdocs/product/stock/class/productlot.class.php b/htdocs/product/stock/class/productlot.class.php
index 8370e8ce080..6332c401ac1 100644
--- a/htdocs/product/stock/class/productlot.class.php
+++ b/htdocs/product/stock/class/productlot.class.php
@@ -166,7 +166,7 @@ class Productlot extends CommonObject
$error++;
}
}
-
+
if (! $error && ! $notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action to call a trigger.
@@ -234,7 +234,7 @@ class Productlot extends CommonObject
//$this->ref = $obj->fk_product.'_'.$obj->batch;
$this->batch = $obj->batch;
- $this->entity = (!empty($obj->entity)?$obj->entity:$conf->entity); // Prevent "null" entity
+ $this->entity = (!empty($obj->entity)?$obj->entity:$conf->entity); // Prevent "null" entity
$this->fk_product = $obj->fk_product;
$this->eatby = $this->db->jdate($obj->eatby);
$this->sellby = $this->db->jdate($obj->sellby);
@@ -300,7 +300,7 @@ class Productlot extends CommonObject
// Check parameters
// Put here code to add a control on parameters values
-
+
if (empty($this->oldcopy))
{
$org=new self($this->db);
@@ -340,7 +340,7 @@ class Productlot extends CommonObject
$error++;
}
}
-
+
if (!$error && !$notrigger) {
// Uncomment this and change MYOBJECT to your own tag if you
// want this action calls a trigger.
@@ -481,6 +481,7 @@ class Productlot 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 of status
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=0)
{
global $langs;
@@ -582,4 +583,3 @@ class Productlot extends CommonObject
}
}
-
diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php
index cbca4e5854d..2c1c22fcce2 100644
--- a/htdocs/product/stock/class/productstockentrepot.class.php
+++ b/htdocs/product/stock/class/productstockentrepot.class.php
@@ -523,6 +523,7 @@ class ProductStockEntrepot 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($status,$mode=0)
{
global $langs;
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index e117dc3eb39..68d7080521a 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -480,6 +480,7 @@ class Project extends CommonObject
* @param int $socid To filter on a particular third party
* @return array List of projects
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array($socid='')
{
global $conf;
@@ -526,6 +527,7 @@ class Project extends CommonObject
* @param string $projectkey Equivalent key to fk_projet for actual type
* @return mixed Array list of object ids linked to project, < 0 or string if error
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_element_list($type, $tablename, $datefieldname='', $dates='', $datee='', $projectkey='fk_projet')
{
$elements = array();
@@ -877,6 +879,7 @@ class Project 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;
@@ -1548,7 +1551,8 @@ class Project extends CommonObject
* @param string $tableName Table of the element to update
* @param int $elementSelectId Key-rowid of the line of the element to update
* @return int 1 if OK or < 0 if KO
- */
+ */
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_element($tableName, $elementSelectId)
{
$sql="UPDATE ".MAIN_DB_PREFIX.$tableName;
@@ -1582,6 +1586,7 @@ class Project extends CommonObject
* @param int $elementSelectId Key-rowid of the line of the element to update
* @return int 1 if OK or < 0 if KO
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function remove_element($tableName, $elementSelectId)
{
$sql="UPDATE ".MAIN_DB_PREFIX.$tableName;
@@ -1712,6 +1717,7 @@ class Project 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;
@@ -1795,6 +1801,7 @@ class Project extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $user;
@@ -1972,4 +1979,3 @@ class Project extends CommonObject
}
}
-
diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php
index 46f04b08932..52f1facb548 100644
--- a/htdocs/projet/class/task.class.php
+++ b/htdocs/projet/class/task.class.php
@@ -1706,6 +1706,7 @@ class Task extends CommonObject
* @param integer $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)
{
// list of Statut of the task
@@ -1822,6 +1823,7 @@ class Task 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;
@@ -1894,6 +1896,7 @@ class Task extends CommonObject
*
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $user;
diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php
index 515f08f6053..ca6df17965e 100644
--- a/htdocs/resource/class/dolresource.class.php
+++ b/htdocs/resource/class/dolresource.class.php
@@ -332,6 +332,7 @@ class Dolresource extends CommonObject
* @param int $id id object
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_element_resource($id)
{
global $langs;
@@ -480,6 +481,7 @@ class Dolresource extends CommonObject
* @param array $filter filter output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_all($sortorder, $sortfield, $limit, $offset, $filter='')
{
global $conf;
@@ -576,6 +578,7 @@ class Dolresource extends CommonObject
* @param array $filter filter output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_all_resources($sortorder, $sortfield, $limit, $offset, $filter='')
{
global $conf;
@@ -654,6 +657,7 @@ class Dolresource extends CommonObject
* @param array $filter filter output
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_all_used($sortorder, $sortfield, $limit, $offset=1, $filter='')
{
global $conf;
@@ -730,6 +734,7 @@ class Dolresource extends CommonObject
* @deprecated, remplaced by hook getElementResources
* @see getElementResources()
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_all_available() {
global $conf;
@@ -749,6 +754,7 @@ class Dolresource extends CommonObject
* @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_element_resource($user=null, $notrigger=0)
{
global $conf, $langs;
@@ -875,6 +881,7 @@ class Dolresource extends CommonObject
*
* @return int Nb lignes chargees, 0 si deja chargees, <0 si ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_cache_code_type_resource()
{
global $langs;
@@ -963,6 +970,7 @@ class Dolresource 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, 5=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/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php
index ed667fad8ab..6002b0c1f44 100644
--- a/htdocs/resource/class/html.formresource.class.php
+++ b/htdocs/resource/class/html.formresource.class.php
@@ -69,6 +69,7 @@ class FormResource
* @param int $limit Limit number of answers
* @return string HTML string with
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_resource_list($selected='',$htmlname='fk_resource',$filter='',$showempty=0, $showtype=0, $forcecombo=0, $event=array(), $filterkey='', $outputmode=0, $limit=20)
{
global $conf,$user,$langs;
@@ -149,17 +150,18 @@ class FormResource
}
/**
- * Return html list of tickets type
+ * Return html list of tickets type
*
- * @param string $selected Id du type pre-selectionne
- * @param string $htmlname Nom de la zone select
- * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
- * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
- * @param int $empty 1=peut etre vide, 0 sinon
- * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
- * @param int $maxlength Max length of label
- * @return void
+ * @param string $selected Id du type pre-selectionne
+ * @param string $htmlname Nom de la zone select
+ * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
+ * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
+ * @param int $empty 1=peut etre vide, 0 sinon
+ * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
+ * @param int $maxlength Max length of label
+ * @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function select_types_resource($selected='',$htmlname='type_resource',$filtertype='',$format=0, $empty=0, $noadmininfo=0,$maxlength=0)
{
global $langs,$user;
@@ -203,7 +205,4 @@ class FormResource
if ($user->admin && ! $noadmininfo) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
}
-
-
}
-
diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php
index 37082f4140b..74616ec7d5b 100644
--- a/htdocs/societe/canvas/actions_card_common.class.php
+++ b/htdocs/societe/canvas/actions_card_common.class.php
@@ -67,6 +67,7 @@ abstract class ActionsCardCommon
* @param string $ref Ref of object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id=0, $ref='')
{
global $conf, $langs, $user, $mysoc, $canvas;
@@ -364,6 +365,7 @@ abstract class ActionsCardCommon
* @param string $action Action string
* @return string HTML output
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function assign_post($action)
{
global $langs, $mysoc;
diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php
index 419a5ecb73e..2718e7e8d3c 100644
--- a/htdocs/societe/canvas/company/actions_card_company.class.php
+++ b/htdocs/societe/canvas/company/actions_card_company.class.php
@@ -75,6 +75,7 @@ class ActionsCardCompany extends ActionsCardCommon
* @param string $ref Ref of object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id=0, $ref='')
{
global $conf, $langs, $user, $mysoc;
@@ -220,4 +221,3 @@ class ActionsCardCompany extends ActionsCardCommon
}
}
-
diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php
index 78064004e37..380ee3513a8 100644
--- a/htdocs/societe/canvas/individual/actions_card_individual.class.php
+++ b/htdocs/societe/canvas/individual/actions_card_individual.class.php
@@ -92,6 +92,7 @@ class ActionsCardIndividual extends ActionsCardCommon
* @param string $ref Ref of object
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id=0, $ref='')
{
global $conf, $langs;
@@ -136,4 +137,3 @@ class ActionsCardIndividual extends ActionsCardCommon
}
}
-
diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php
index 43e46008910..599b48153ad 100644
--- a/htdocs/societe/class/address.class.php
+++ b/htdocs/societe/class/address.class.php
@@ -238,6 +238,7 @@ class Address
* @param User $user Objet de l'utilisateur
* @return int >0 si ok, <0 si ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_lines($socid, $user=null)
{
global $langs, $conf;
@@ -331,6 +332,7 @@ class Address
* @param User $user Objet de l'utilisateur
* @return int >0 si ok, <0 si ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_address($id, $user=null)
{
global $langs;
diff --git a/htdocs/societe/class/client.class.php b/htdocs/societe/class/client.class.php
index 59eea72c2c7..26fd6d4e2cd 100644
--- a/htdocs/societe/class/client.class.php
+++ b/htdocs/societe/class/client.class.php
@@ -52,6 +52,7 @@ class Client extends Societe
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $user;
diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php
index 4403d5b8fde..cc40a697cad 100644
--- a/htdocs/societe/class/companypaymentmode.class.php
+++ b/htdocs/societe/class/companypaymentmode.class.php
@@ -18,7 +18,7 @@
/**
* \file class/companypaymentmode.class.php
- * \ingroup monmodule
+ * \ingroup company
* \brief This file is a CRUD class file for CompanyPaymentMode (Create/Read/Update/Delete)
*/
@@ -455,6 +455,7 @@ class CompanyPaymentMode 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/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index c70d0a1a3e2..0289c5aa745 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -569,6 +569,7 @@ class Societe extends CommonObject
* @param User $user Object user
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_individual(User $user)
{
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
@@ -1579,6 +1580,7 @@ class Societe extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_as_client()
{
if ($this->id)
@@ -1608,6 +1610,7 @@ class Societe extends CommonObject
* @param User $user Utilisateur qui definie la remise
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_client($remise, $note, User $user)
{
global $conf, $langs;
@@ -1669,6 +1672,7 @@ class Societe extends CommonObject
* @param User $user Utilisateur qui definie la remise
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_supplier($remise, $note, User $user)
{
global $conf, $langs;
@@ -1732,6 +1736,7 @@ class Societe extends CommonObject
* @param int $discount_type 0 => customer discount, 1 => supplier discount
* @return int <0 if KO, id of discount record if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_except($remise, User $user, $desc, $tva_tx=0, $discount_type=0)
{
global $langs;
@@ -1873,6 +1878,7 @@ class Societe extends CommonObject
* @param User $user Use making change
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_price_level($price_level, User $user)
{
if ($this->id)
@@ -1910,13 +1916,14 @@ class Societe extends CommonObject
* @param int $commid Id of user
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_commercial(User $user, $commid)
{
$error=0;
-
-
-
-
+
+
+
+
if ($this->id > 0 && $commid > 0)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_commerciaux";
@@ -1934,7 +1941,7 @@ class Societe extends CommonObject
}
else {
$this->context=array('commercial_modified'=>$commid);
-
+
$result=$this->call_trigger('COMPANY_LINK_SALE_REPRESENTATIVE',$user);
if ($result < 0) $error++;
}
@@ -1948,14 +1955,15 @@ class Societe extends CommonObject
* @param int $commid Id of user
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_commercial(User $user, $commid)
{
$error=0;
$this->context=array('commercial_modified'=>$commid);
-
+
$result=$this->call_trigger('COMPANY_UNLINK_SALE_REPRESENTATIVE',$user);
if ($result < 0) $error++;
-
+
if ($this->id > 0 && $commid > 0)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_commerciaux ";
@@ -2168,6 +2176,7 @@ class Societe 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($statut,$mode=0)
{
global $langs;
@@ -2216,6 +2225,7 @@ class Societe extends CommonObject
* @param int $addthirdparty 1=Add also a record for thirdparty email
* @return array Array of contacts emails
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function thirdparty_and_contact_email_array($addthirdparty=0)
{
global $langs;
@@ -2235,6 +2245,7 @@ class Societe extends CommonObject
*
* @return array Array of contacts emails
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function thirdparty_and_contact_phone_array()
{
global $langs;
@@ -2257,6 +2268,7 @@ class Societe extends CommonObject
* @param int $hidedisabled 1=Hide contact if disabled
* @return array Array of contacts emails or mobile. Example: array(id=>'Name ')
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function contact_property_array($mode='email', $hidedisabled=0)
{
global $langs;
@@ -2323,6 +2335,7 @@ class Societe extends CommonObject
*
* @return array tableau des contacts
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function contact_array()
{
$contacts = array();
@@ -2355,6 +2368,7 @@ class Societe extends CommonObject
*
* @return array $contacts tableau des contacts
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function contact_array_objects()
{
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
@@ -2392,6 +2406,7 @@ class Societe extends CommonObject
* @param string $mode 'email' or 'mobile'
* @return string Email of contact with format: "Full name "
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function contact_get_property($rowid,$mode)
{
$contact_property='';
@@ -2430,6 +2445,7 @@ class Societe extends CommonObject
* @param string $mode 'label' or 'rum' or 'format'
* @return string Bank number
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function display_rib($mode='label')
{
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
@@ -2465,6 +2481,7 @@ class Societe extends CommonObject
*
* @return array|int 0 if KO, Array of CompanyBanckAccount if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_all_rib()
{
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
@@ -2496,6 +2513,7 @@ class Societe extends CommonObject
* @param int $type Should be 0 to say customer
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_codeclient($objsoc=0,$type=0)
{
global $conf;
@@ -2526,6 +2544,7 @@ class Societe extends CommonObject
* @param int $type Should be 1 to say supplier
* @return void
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_codefournisseur($objsoc=0,$type=1)
{
global $conf;
@@ -2553,6 +2572,7 @@ class Societe extends CommonObject
*
* @return int 0=No, 1=Yes
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function codeclient_modifiable()
{
global $conf;
@@ -2587,6 +2607,7 @@ class Societe extends CommonObject
*
* @return int 0=No, 1=Yes
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function codefournisseur_modifiable()
{
global $conf;
@@ -2625,6 +2646,7 @@ class Societe extends CommonObject
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function check_codeclient()
{
global $conf;
@@ -2660,6 +2682,7 @@ class Societe extends CommonObject
* -3 ErrorCustomerCodeAlreadyUsed
* -4 ErrorPrefixRequired
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function check_codefournisseur()
{
global $conf;
@@ -2694,6 +2717,7 @@ class Societe extends CommonObject
* @param string $type Type of thirdparty ('customer' or 'supplier')
* @return string Code compta si ok, 0 si aucun, <0 si ko
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_codecompta($type)
{
global $conf;
@@ -2742,6 +2766,7 @@ class Societe extends CommonObject
* @param int $id Id of thirdparty to set or '' to remove
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_parent($id)
{
if ($this->id)
@@ -2770,6 +2795,7 @@ class Societe extends CommonObject
* @param int $idprof 1,2,3,4,5,6 (Exemple: 1=siren,2=siret,3=naf,4=rcs/rm,5=idprof5,6=idprof6)
* @return boolean true , false
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function id_prof_verifiable($idprof)
{
global $conf;
@@ -2809,6 +2835,7 @@ class Societe extends CommonObject
* @param int $socid Id of thirdparty to exclude (if update)
* @return boolean True if exists, False if not
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function id_prof_exists($idprof, $value, $socid=0)
{
$field = $idprof;
@@ -2867,6 +2894,7 @@ class Societe extends CommonObject
* @return int <=0 if KO, >0 if OK
* TODO better to have this in a lib than into a business class
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function id_prof_check($idprof,$soc)
{
global $conf;
@@ -3016,6 +3044,7 @@ class Societe extends CommonObject
* @return string Url or empty string if no URL known
* TODO better in a lib than into business class
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function id_prof_url($idprof,$thirdparty)
{
global $conf,$langs,$hookmanager;
@@ -3065,6 +3094,7 @@ class Societe extends CommonObject
*
* @return bool true si la societe a des projets, false sinon
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function has_projects()
{
$sql = 'SELECT COUNT(*) as numproj FROM '.MAIN_DB_PREFIX.'projet WHERE fk_soc = ' . $this->id;
@@ -3166,6 +3196,7 @@ class Societe extends CommonObject
*
* @return int 0 if success, <> 0 if error
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LoadSupplierCateg()
{
$this->SupplierCategories = array();
@@ -3194,6 +3225,7 @@ class Societe extends CommonObject
* @param int $categorie_id Id of category
* @return int 0 if success, <> 0 if error
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function AddFournisseurInCategory($categorie_id)
{
if ($categorie_id > 0 && $this->id > 0)
@@ -3219,6 +3251,7 @@ class Societe extends CommonObject
* @param string $socalias Alias name of third party to force
* @return int <0 if KO, id of created account if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_from_member(Adherent $member, $socname='', $socalias='')
{
global $user,$langs;
@@ -3493,6 +3526,7 @@ class Societe extends CommonObject
* @param int $fk_prospectlevel Prospect level
* @return string label of level
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibProspLevel($fk_prospectlevel)
{
global $langs;
@@ -3514,6 +3548,7 @@ class Societe extends CommonObject
* @return int <0 if KO, >0 if OK
* @deprecated Use update function instead
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_prospect_level(User $user)
{
return $this->update($this->id, $user);
@@ -3539,6 +3574,7 @@ class Societe extends CommonObject
* @param string $label Label to use for status for added status
* @return string Libelle du statut
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibProspCommStatut($statut, $mode=0, $label='')
{
global $langs;
@@ -3591,6 +3627,7 @@ class Societe extends CommonObject
* @return int <0 if KO, >0 if OK
* @deprecated Use update function instead
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_OutstandingBill(User $user)
{
return $this->update($this->id, $user);
@@ -3755,6 +3792,7 @@ class Societe extends CommonObject
* @return int Amount in debt for thirdparty
* @deprecated
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_OutstandingBill()
{
/* Accurate value of remain to pay is to sum remaintopay for each invoice
@@ -3808,6 +3846,7 @@ class Societe extends CommonObject
* @param int $statut Id statut
* @return string Libelle du statut
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibCustProspStatut($statut)
{
global $langs;
diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php
index 7340a319534..3fc3082e5bf 100644
--- a/htdocs/societe/class/societeaccount.class.php
+++ b/htdocs/societe/class/societeaccount.class.php
@@ -398,6 +398,7 @@ class SocieteAccount 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/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php
index c3b6e4b3338..e37092b28e5 100644
--- a/htdocs/supplier_proposal/class/supplier_proposal.class.php
+++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php
@@ -207,6 +207,7 @@ class SupplierProposal extends CommonObject
* 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)
{
global $conf, $mysoc;
@@ -256,6 +257,7 @@ class SupplierProposal 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;
@@ -1071,6 +1073,7 @@ class SupplierProposal 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)
{
$this->products=$this->lines;
@@ -1500,6 +1503,7 @@ class SupplierProposal extends CommonObject
* @param int $date_livraison Delivery date
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_date_livraison($user, $date_livraison)
{
if (! empty($user->rights->supplier_proposal->creer))
@@ -1529,6 +1533,7 @@ class SupplierProposal extends CommonObject
* @param double $remise Amount discount
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_percent($user, $remise)
{
$remise=trim($remise)?trim($remise):0;
@@ -1562,6 +1567,7 @@ class SupplierProposal extends CommonObject
* @param double $remise Amount discount
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_remise_absolue($user, $remise)
{
$remise=trim($remise)?trim($remise):0;
@@ -1831,6 +1837,7 @@ class SupplierProposal extends CommonObject
* @param User $user Object user that modify
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_draft($user)
{
global $conf,$langs;
@@ -1864,6 +1871,7 @@ class SupplierProposal 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.datec', $sortorder='DESC')
{
global $conf,$user;
@@ -2120,8 +2128,9 @@ class SupplierProposal extends CommonObject
*
* @param int $statut id statut
* @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
+ * @return string Label
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$mode=1)
{
// Init/load array of translation of status
@@ -2163,8 +2172,9 @@ class SupplierProposal extends CommonObject
*
* @param User $user Object user
* @param int $mode "opened" for askprice to close, "signed" for proposal to invoice
- * @return int <0 if KO, >0 if OK
+ * @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user,$mode)
{
global $conf, $user, $langs;
@@ -2323,6 +2333,7 @@ class SupplierProposal extends CommonObject
*
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf, $user;
@@ -3152,6 +3163,7 @@ class SupplierProposalLine extends CommonObjectLine
*
* @return int <0 if ko, >0 if ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_total()
{
$this->db->begin();
@@ -3180,4 +3192,3 @@ class SupplierProposalLine extends CommonObjectLine
}
}
-
diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php
index f49325a5bc5..75d2fc5c68d 100644
--- a/htdocs/ticket/class/actions_ticket.class.php
+++ b/htdocs/ticket/class/actions_ticket.class.php
@@ -1295,6 +1295,7 @@ class ActionsTicket
* @param int $fieldid Id
* @return int 0
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_previous_next_ref($filter, $fieldid)
{
$this->getInstanceDao();
diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php
index 4430ae3e0f0..1d6593d62ef 100644
--- a/htdocs/ticket/class/ticket.class.php
+++ b/htdocs/ticket/class/ticket.class.php
@@ -1166,6 +1166,7 @@ class Ticket 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;
@@ -2445,6 +2446,7 @@ class Ticket extends CommonObject
* @param string $sdir Directory to scan
* @return boolean True if at least one photo is available, False if not
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function is_photo_available($sdir)
{
include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 6205d42e1cf..11f85b64382 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -1177,6 +1177,7 @@ class User extends CommonObject
* @param string $password Password to force
* @return int <0 if error, if OK returns id of created user
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_from_contact($contact,$login='',$password='')
{
global $conf,$user,$langs;
@@ -1254,6 +1255,7 @@ class User extends CommonObject
* @param string $login Login to force
* @return int <0 if KO, if OK, return id of created account
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function create_from_member($member,$login='')
{
global $conf,$user,$langs;
@@ -1325,6 +1327,7 @@ class User extends CommonObject
*
* @return integer erreur <0, si ok renvoi le nbre de droits par defaut positionnes
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function set_default_rights()
{
global $conf;
@@ -1655,6 +1658,7 @@ class User extends CommonObject
*
* @return <0 si echec, >=0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_last_login_date()
{
$now=dol_now();
@@ -1822,6 +1826,7 @@ class User extends CommonObject
* @param int $changelater 0=Send clear passwod into email, 1=Change password only after clicking on confirm email. @TODO Add method 2 = Send link to reset password
* @return int < 0 si erreur, > 0 si ok
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function send_password($user, $password='', $changelater=0)
{
global $conf,$langs;
@@ -1933,6 +1938,7 @@ class User extends CommonObject
*
* @return <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_clicktodial()
{
$sql = "SELECT url, login, pass, poste ";
@@ -1969,6 +1975,7 @@ class User extends CommonObject
*
* @return integer
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_clicktodial()
{
$this->db->begin();
@@ -2011,6 +2018,7 @@ class User extends CommonObject
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function SetInGroup($group, $entity, $notrigger=0)
{
global $conf, $langs, $user;
@@ -2071,6 +2079,7 @@ class User extends CommonObject
* @param int $notrigger Disable triggers
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function RemoveFromGroup($group, $entity, $notrigger=0)
{
global $conf,$langs,$user;
@@ -2304,13 +2313,13 @@ class User extends CommonObject
//Check user's rights to see an other user
if((!$user->rights->user->user->lire && $this->id !=$user->id)) $option='nolink';
-
+
if ($option == 'xxx')
{
$linkstart = '';
$linkend='';
}
-
+
if ($option == 'nolink')
{
$linkstart = '';
@@ -2342,6 +2351,7 @@ class User 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;
@@ -2390,6 +2400,7 @@ class User extends CommonObject
* 2=Return key only (RDN) (uid=qqq)
* @return string DN
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0)
{
global $conf;
@@ -2405,6 +2416,7 @@ class User extends CommonObject
*
* @return array Tableau info des attributs
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info()
{
global $conf,$langs;
@@ -2676,6 +2688,7 @@ class User extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_ldap2dolibarr(&$ldapuser)
{
// TODO: Voir pourquoi le update met à jour avec toutes les valeurs vide (global $user écrase ?)
@@ -2711,6 +2724,7 @@ class User extends CommonObject
* @return void
* @see getAllChildIds
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_children()
{
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."user";
@@ -2742,6 +2756,7 @@ class User extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
private function load_parentof()
{
global $conf;
@@ -2784,6 +2799,7 @@ class User extends CommonObject
* @param string $filter SQL filter on users
* @return array Array of users $this->users. Note: $this->parentof is also set.
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_full_tree($deleteafterid=0, $filter='')
{
global $conf, $user;
@@ -2922,6 +2938,7 @@ class User extends CommonObject
* @param int $protection Deep counter to avoid infinite loop (no more required, a protection is added with array useridfound)
* @return int < 0 if KO (infinit loop), >= 0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function build_path_from_id_user($id_user,$protection=0)
{
dol_syslog(get_class($this)."::build_path_from_id_user id_user=".$id_user." protection=".$protection, LOG_DEBUG);
@@ -2981,6 +2998,7 @@ class User extends CommonObject
*
* @return int <0 if KO, >0 if OK
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board()
{
global $conf;
@@ -3053,6 +3071,7 @@ class User extends CommonObject
* @param string $mode 'email' or 'mobile'
* @return string Email of user with format: "Full name "
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function user_get_property($rowid,$mode)
{
$user_property='';
@@ -3147,4 +3166,3 @@ class User extends CommonObject
}
}
-
diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php
index 77385f84179..b1769edea6f 100644
--- a/htdocs/user/class/userbankaccount.class.php
+++ b/htdocs/user/class/userbankaccount.class.php
@@ -206,4 +206,3 @@ class UserBankAccount extends Account
return $rib;
}
}
-
diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php
index 9c2f3437fa4..594b8bf928c 100644
--- a/htdocs/user/class/usergroup.class.php
+++ b/htdocs/user/class/usergroup.class.php
@@ -804,6 +804,7 @@ class UserGroup 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;
@@ -897,6 +898,7 @@ class UserGroup 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;
@@ -913,6 +915,7 @@ class UserGroup extends CommonObject
*
* @return array Tableau info des attributs
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info()
{
global $conf,$langs;
@@ -1004,4 +1007,3 @@ class UserGroup extends CommonObject
return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
}
}
-
diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php
index a6b5dcc51f7..1bb58f66f7d 100644
--- a/htdocs/website/class/website.class.php
+++ b/htdocs/website/class/website.class.php
@@ -691,6 +691,7 @@ class Website 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($status,$mode=0)
{
global $langs;
@@ -920,4 +921,3 @@ class Website extends CommonObject
}
}
-
diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php
index c0b6aaa7ab9..023baf09c7b 100644
--- a/htdocs/website/class/websitepage.class.php
+++ b/htdocs/website/class/websitepage.class.php
@@ -471,6 +471,7 @@ class WebsitePage 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($status,$mode=0)
{
global $langs;
diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php
index 54ebca5ac67..a97da0c0ad6 100644
--- a/test/phpunit/CoreTest.php
+++ b/test/phpunit/CoreTest.php
@@ -257,6 +257,7 @@ class CoreTest extends PHPUnit_Framework_TestCase
* @param string $type 1=GET, 0=POST, 2=PHP_SELF
* @return int >0 if there is an injection
*/
+ // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function test_sql_and_script_inject($val, $type)
{
$inj = 0;