diff --git a/.travis.yml b/.travis.yml index 485151dde01..86da681ce9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,6 @@ php: - '7.0' - '7.1' - '7.2' -#- hhvm only with dist: trusty - nightly env: @@ -63,6 +62,14 @@ matrix: - php: nightly # We exclude some combinations not usefull to save Travis CPU exclude: + - php: '5.5' + env: DB=mysql + - php: '5.6' + env: DB=mysql + - php: '7.0' + env: DB=mysql + - php: '7.1' + env: DB=mysql - php: '5.5' env: DB=postgresql - php: '5.6' @@ -71,8 +78,6 @@ matrix: env: DB=postgresql - php: '7.1' env: DB=postgresql - - php: hhvm - env: DB=postgresql - php: nightly env: DB=postgresql diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 49a4a5b3e0c..79b16bdbf55 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -363,12 +363,12 @@ 0 - + + 0 diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 060f590d656..3d1445b0cce 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -72,6 +72,7 @@ class autoTranslator * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function parse_refLangTranslationFiles() { diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 7a50f130775..8d4785a3719 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -96,7 +96,8 @@ class AccountingAccount extends CommonObject */ public $fk_user_modif; - var $active; // duplicate with status + public $active; // duplicate with status + public $status; /** @@ -534,6 +535,7 @@ class AccountingAccount extends CommonObject * @param int $id Id * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function account_desactivate($id) { $result = $this->checkUsage(); @@ -567,6 +569,7 @@ class AccountingAccount extends CommonObject * @param int $id Id * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function account_activate($id) { $this->db->begin(); @@ -606,6 +609,7 @@ class AccountingAccount extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0) { global $langs; diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index b062b9495b9..b8d3852246c 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -271,6 +271,7 @@ class AccountingJournal extends CommonObject * @param int $mode 0=libelle long, 1=libelle court * @return string Label of type */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibType($nature,$mode=0) { global $langs; diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index aae6374cb50..38a4fb72028 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1560,6 +1560,7 @@ class BookKeeping extends CommonObject * @param string $model Model * @return int Result */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function export_bookkeping($model = 'ebp') { global $conf; @@ -1717,7 +1718,8 @@ class BookKeeping extends CommonObject * @param int $select_out Set value returned by select 0=rowid (default), 1=account_number * @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number * @return string String with HTML select - */ + */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') { global $conf; @@ -1782,6 +1784,7 @@ class BookKeeping extends CommonObject * @param string $account Accounting account * @return string Root account */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_compte_racine($account = null) { global $conf; @@ -1822,6 +1825,7 @@ class BookKeeping extends CommonObject * @param string $account Accounting account * @return string Account desc */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_compte_desc($account = null) { global $conf; diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index a0396363da7..fe91fc74436 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -82,6 +82,7 @@ abstract class ActionsAdherentCardCommon * @param int $id Id * @return string HTML output */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function assign_values(&$action, $id) { global $conf, $langs, $user, $canvas; @@ -237,6 +238,7 @@ abstract class ActionsAdherentCardCommon * * @return string HTML output */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function assign_post() { global $langs, $mysoc; diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index a03712daa79..c5d6a89a152 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -74,6 +74,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon * @param int $id Id * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function assign_values(&$action, $id) { global $limit, $offset, $sortfield, $sortorder; @@ -129,6 +130,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon * @param string $sortorder Sort order ('ASC' or 'DESC') * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LoadListDatas($limit, $offset, $sortfield, $sortorder) { global $conf, $langs; @@ -138,4 +140,3 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon $this->list_datas = array(); } } - diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 0556fcba92e..3e784ab871c 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -150,6 +150,7 @@ class Adherent extends CommonObject * @param string $errors_to erros to * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='') { global $conf,$langs; @@ -647,6 +648,7 @@ class Adherent extends CommonObject * @param User $user User making change * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_end_date($user) { $this->db->begin(); @@ -1000,6 +1002,7 @@ class Adherent extends CommonObject * @param string $login login of member * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_login($login) { global $conf; @@ -1030,6 +1033,7 @@ class Adherent extends CommonObject * @param string $lastname Lastname * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_name($firstname,$lastname) { global $conf; @@ -1203,6 +1207,7 @@ class Adherent extends CommonObject * * @return int <0 si KO, >0 si OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_subscriptions() { global $langs; @@ -1753,6 +1758,7 @@ class Adherent extends CommonObject * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_to_abo() { global $conf,$langs; @@ -1810,6 +1816,7 @@ class Adherent extends CommonObject * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function del_to_abo() { global $conf,$langs; @@ -1993,6 +2000,7 @@ class Adherent extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) { global $langs; @@ -2082,6 +2090,7 @@ class Adherent extends CommonObject * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board() { global $conf; @@ -2117,6 +2126,7 @@ class Adherent extends CommonObject * @param User $user Objet user * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board($user) { global $conf, $langs; @@ -2262,6 +2272,7 @@ class Adherent extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_dn($info,$mode=0) { global $conf; @@ -2278,6 +2289,7 @@ class Adherent extends CommonObject * * @return array Tableau info des attributs */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_info() { global $conf,$langs; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index cef414ce38a..b7d510a3e0f 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -295,6 +295,7 @@ class AdherentType extends CommonObject * * @return array List of types of members */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_array() { global $conf,$langs; @@ -430,6 +431,7 @@ class AdherentType extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_dn($info,$mode=0) { global $conf; @@ -446,6 +448,7 @@ class AdherentType extends CommonObject * * @return array Tableau info des attributs */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_info() { global $conf,$langs; diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 240aa617233..90452816be8 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -369,6 +369,7 @@ class Subscription extends CommonObject * @param int $statut Id statut * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut) { global $langs; diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 85be894bae0..c4dae079c3c 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -169,6 +169,7 @@ class Dolistore * @param int $parent Id of parent category * @return string */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_categories($parent = 0) { if (!isset($this->categories)) die('not possible'); @@ -215,6 +216,7 @@ class Dolistore * * @return string HTML output */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_products() { global $langs, $conf; @@ -297,6 +299,7 @@ class Dolistore * @param string $text symbol previous * @return string html previous link */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_previous_link($text = '<<') { return ''.$text.''; @@ -308,17 +311,19 @@ class Dolistore * @param string $text symbol next * @return string html next link */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_next_link($text = '>>') { return ''.$text.''; } - /** + /** * get previous url * * @return string previous url */ - function get_previous_url() + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function get_previous_url() { $param_array = array(); if ($this->start < $this->per_page) { @@ -340,6 +345,7 @@ class Dolistore * * @return string next url */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_next_url() { $param_array = array(); @@ -364,6 +370,7 @@ class Dolistore * @param string $v2 version 2 * @return int result of compare */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function version_compare($v1, $v2) { $v1 = explode('.', $v1); diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index a0100abf58d..32ebc4fb26e 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -277,6 +277,7 @@ class DolibarrApi * @param array $matches Array of found string by regex search * @return string Forged criteria. Example: "t.field like 'abc%'" */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps static function _forge_criteria_callback($matches) { global $db; diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index abd8df94275..8d8281745fa 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -59,14 +59,13 @@ class DolibarrApiAccess implements iAuthenticate */ public static $user = ''; - // @codingStandardsIgnoreStart - /** * Check access * * @return bool * @throws RestException */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName public function __isAllowed() { global $conf, $db; @@ -172,11 +171,11 @@ class DolibarrApiAccess implements iAuthenticate * @example Digest * @example OAuth */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName public function __getWWWAuthenticateString() { return ''; } - // @codingStandardsIgnoreEnd /** * Verify access diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 72ec7e9707e..55f2d3f5df0 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -355,6 +355,7 @@ class Asset extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps static function LibStatut($status,$mode=0) { global $langs; diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 213efb2b186..e6b95d7ad37 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -287,6 +287,7 @@ class AssetType extends CommonObject * * @return array List of types of members */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_array() { global $conf,$langs; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index a299df1b6a7..94e42ee4334 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -651,6 +651,7 @@ class Categorie extends CommonObject * @param string $type Type of category ('product', ...) * @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_type($obj, $type) { global $user,$langs,$conf; @@ -753,6 +754,7 @@ class Categorie extends CommonObject * * @return int 1 if OK, -1 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function del_type($obj,$type) { global $user,$langs,$conf; @@ -973,6 +975,7 @@ class Categorie extends CommonObject * * @return array|int <0 KO, array ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_filles() { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; @@ -1002,6 +1005,7 @@ class Categorie extends CommonObject * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function load_motherof() { global $conf; @@ -1046,6 +1050,7 @@ class Categorie extends CommonObject * * @return array Array of categories. this->cats and this->motherof are set. */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_full_arbo($type, $markafterid=0) { global $conf, $langs; @@ -1129,6 +1134,7 @@ class Categorie extends CommonObject * @param int $protection Deep counter to avoid infinite loop * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function build_path_from_id_categ($id_categ,$protection=1000) { dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG); @@ -1169,6 +1175,7 @@ class Categorie extends CommonObject * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function debug_cats() { // Display $this->cats @@ -1192,6 +1199,7 @@ class Categorie extends CommonObject * @param boolean $parent Just parent categories if true * @return array Table of Object Category */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_all_categories($type=null, $parent=false) { if (! is_numeric($type)) $type = $this->MAP_ID[$type]; @@ -1227,6 +1235,7 @@ class Categorie extends CommonObject * * @return integer 1 if already exist, 0 otherwise, -1 if error */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function already_exists() { $type=$this->type; @@ -1277,6 +1286,7 @@ class Categorie extends CommonObject * @param int $type Type of category (0, 1, ...) * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_main_categories($type=null) { return $this->get_all_categories($type, true); @@ -1291,6 +1301,7 @@ class Categorie extends CommonObject * @param int $nocolor 0 * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function print_all_ways($sep = " >> ", $url='', $nocolor=0) { $ways = array(); @@ -1344,6 +1355,7 @@ class Categorie extends CommonObject * * @return int|array <0 KO, array OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_meres() { $parents = array(); @@ -1379,6 +1391,7 @@ class Categorie extends CommonObject * * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_all_ways() { $ways = array(); @@ -1594,6 +1607,7 @@ class Categorie extends CommonObject * @param string $file Nom du fichier uploade * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_photo($sdir, $file) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1643,6 +1657,7 @@ class Categorie extends CommonObject * @param int $nbmax Nombre maximum de photos (0=pas de max) * @return array Tableau de photos */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_photos($dir,$nbmax=0) { include_once DOL_DOCUMENT_ROOT .'/core/lib/files.lib.php'; @@ -1697,6 +1712,7 @@ class Categorie extends CommonObject * @param string $file Path to file * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function delete_photo($file) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -1725,6 +1741,7 @@ class Categorie extends CommonObject * @param string $file Path to file * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_image_size($file) { $infoImg = getimagesize($file); // Recuperation des infos de l'image diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 45a1ff2380f..fd620ef2fce 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -699,6 +699,7 @@ class ActionComm extends CommonObject * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_userassigned() { $sql ="SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency"; @@ -1023,6 +1024,7 @@ class ActionComm extends CommonObject * @param int $load_state_board Charge indicateurs this->nb de tableau de bord * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board($user, $load_state_board=0) { global $conf, $langs; @@ -1149,6 +1151,7 @@ class ActionComm extends CommonObject * @param int $datestart Date start of event * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($percent,$mode,$hidenastatus=0,$datestart='') { global $langs; @@ -1358,6 +1361,7 @@ class ActionComm extends CommonObject * @param array $filters Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...) * @return int <0 if error, nb of events in new file if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function build_exportfile($format,$type,$cachedelay,$filename,$filters) { global $conf,$langs,$dolibarr_main_url_root,$mysoc; @@ -1678,8 +1682,6 @@ class ActionComm extends CommonObject // TODO Scan events of type 'email' into table llx_actioncomm_reminder with status todo, send email, then set status to done - - // Delete also very old past events (we do not keep more than 1 month record in past) $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder WHERE dateremind < '".$this->db->jdate($now - (3600 * 24 * 32))."'"; $this->db->query($sql); diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index ba82630616c..0ae059ae78d 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -180,6 +180,7 @@ class ActionCommReminder extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps static function LibStatut($status,$mode=0) { global $langs; @@ -233,4 +234,3 @@ class ActionCommReminder extends CommonObject $this->initAsSpecimenCommon(); } } - diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 68f2f723976..8f189c31e6e 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -125,6 +125,7 @@ class CActionComm * @param int $shortlabel 1=Get short label instead of long label * @return mixed Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode. */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0) { global $langs,$conf; diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php index df348e4db51..4d8675bc8ee 100644 --- a/htdocs/comm/action/class/ical.class.php +++ b/htdocs/comm/action/class/ical.class.php @@ -52,6 +52,7 @@ class ICal * @param string $file File * @return string */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function read_file($file) { $this->file = $file; @@ -71,6 +72,7 @@ class ICal * * @return int */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_event_count() { return $this->event_count; @@ -81,6 +83,7 @@ class ICal * * @return int */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_todo_count() { return $this->todo_count; @@ -202,6 +205,7 @@ class ICal * @param string $value Value * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_to_array($type, $key, $value) { @@ -260,6 +264,7 @@ class ICal * @param string $text Text * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function retun_key_value($text) { /* @@ -283,6 +288,7 @@ class ICal * @param string $value string * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function ical_rrule($value) { $result=array(); @@ -300,6 +306,7 @@ class ICal * @param string $ical_date String date * @return int */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function ical_date_to_unix($ical_date) { $ical_date = str_replace('T', '', $ical_date); @@ -322,6 +329,7 @@ class ICal * @param string $value Value * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function ical_dt_date($key, $value) { $return_value=array(); @@ -349,6 +357,7 @@ class ICal * * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_sort_event_list() { $temp = $this->get_event_list(); @@ -370,6 +379,7 @@ class ICal * @param array $b Operand b * @return integer */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function ical_dtstart_compare($a, $b) { return strnatcasecmp($a['DTSTART']['unixtime'], $b['DTSTART']['unixtime']); @@ -380,6 +390,7 @@ class ICal * * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_event_list() { return (! empty($this->cal['VEVENT'])?$this->cal['VEVENT']:''); @@ -390,6 +401,7 @@ class ICal * * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_freebusy_list() { return $this->cal['VFREEBUSY']; @@ -400,6 +412,7 @@ class ICal * * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_todo_list() { return $this->cal['VTODO']; @@ -410,6 +423,7 @@ class ICal * * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_calender_data() { return $this->cal['VCALENDAR']; @@ -420,6 +434,7 @@ class ICal * * @return array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_all_data() { return $this->cal; diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 56c2f5ddd22..14d1fb20f4e 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -75,9 +75,9 @@ class AdvanceTargetingMailing extends CommonObject /** - * Constructor + * Constructor * - * @param DoliDb $db Database handler + * @param DoliDb $db Database handler */ function __construct($db) { @@ -260,6 +260,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $id Id object * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_by_mailing($id=0) { global $langs; @@ -326,6 +327,7 @@ class AdvanceTargetingMailing extends CommonObject * @param string $type_element Type target * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_by_element($id=0, $type_element='mailing') { global $langs; @@ -550,6 +552,7 @@ class AdvanceTargetingMailing extends CommonObject * @param array $arrayquery All element to Query * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function query_thirdparty($arrayquery) { global $langs,$conf; @@ -642,16 +645,16 @@ class AdvanceTargetingMailing extends CommonObject if (!empty($arrayquery['options_'.$key.'_max'])) { $sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'].")"; } - } else if (($extrafields->attribute_type[$key] == 'date') || + } elseif (($extrafields->attribute_type[$key] == 'date') || ($extrafields->attribute_type[$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt'])){ $sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')"; } - }else if ($extrafields->attribute_type[$key] == 'boolean') { + } elseif ($extrafields->attribute_type[$key] == 'boolean') { if ($arrayquery['options_'.$key]!=''){ $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; } - }else{ + } else { if (is_array($arrayquery['options_'.$key])) { $sqlwhere[]= " (te.".$key." IN ('".implode("','",$arrayquery['options_'.$key])."'))"; } elseif (!empty($arrayquery['options_'.$key])) { @@ -704,6 +707,7 @@ class AdvanceTargetingMailing extends CommonObject * @param int $withThirdpartyFilter add contact with tridparty filter * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function query_contact($arrayquery, $withThirdpartyFilter = 0) { global $langs,$conf; diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index d114ad5225f..fa7a9a1bc9e 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -444,6 +444,7 @@ class Mailing extends CommonObject * * @return int 1 if OK, 0 if error */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function delete_targets() { $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_cibles"; @@ -469,6 +470,7 @@ class Mailing extends CommonObject * @param User $user Objet user qui valide * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function reset_targets_status($user) { $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_cibles"; @@ -541,6 +543,7 @@ class Mailing extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0) { global $langs; @@ -644,4 +647,3 @@ class Mailing extends CommonObject } } } - diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index bac7cbfcf36..4957bf3e764 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -249,6 +249,7 @@ class Propal extends CommonObject * TODO Replace calls to this function by generation objet Ligne * inserted into table $this->products */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_product($idproduct, $qty, $remise_percent=0) { global $conf, $mysoc; @@ -303,6 +304,7 @@ class Propal extends CommonObject * @param int $idremise Id of fixed discount * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function insert_discount($idremise) { global $langs; @@ -1182,6 +1184,7 @@ class Propal extends CommonObject * @return int Id of the new object if ok, <0 if ko * @see create */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function create_from($user) { // i love this function because $this->products is not used in create function... @@ -1572,6 +1575,7 @@ class Propal extends CommonObject * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_lines($only_product=0) { $this->lines=array(); @@ -1812,6 +1816,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_date($user, $date, $notrigger=0) { if (empty($date)) @@ -1879,6 +1884,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_echeance($user, $date_fin_validite, $notrigger=0) { if (! empty($user->rights->propal->creer)) @@ -1939,6 +1945,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_date_livraison($user, $date_livraison, $notrigger=0) { if (! empty($user->rights->propal->creer)) @@ -1999,6 +2006,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_availability($user, $id, $notrigger=0) { if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) @@ -2068,6 +2076,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_demand_reason($user, $id, $notrigger=0) { if (! empty($user->rights->propal->creer) && $this->statut >= self::STATUS_DRAFT) @@ -2139,6 +2148,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_ref_client($user, $ref_client, $notrigger=0) { if (! empty($user->rights->propal->creer)) @@ -2202,6 +2212,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_remise_percent($user, $remise, $notrigger=0) { $remise=trim($remise)?trim($remise):0; @@ -2267,6 +2278,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_remise_absolue($user, $remise, $notrigger=0) { $remise=trim($remise)?trim($remise):0; @@ -2550,6 +2562,7 @@ class Propal extends CommonObject * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_draft($user, $notrigger=0) { $error=0; @@ -2613,6 +2626,7 @@ class Propal extends CommonObject * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_array($shortlist=0, $draft=0, $notcurrentuser=0, $socid=0, $limit=0, $offset=0, $sortfield='p.datep', $sortorder='DESC') { global $user; @@ -2692,6 +2706,7 @@ class Propal extends CommonObject * @param int $id Id propal * @return array Array of invoices id */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function InvoiceArrayList($id) { $ga = array(); @@ -2972,6 +2987,7 @@ class Propal extends CommonObject * @return int >0 si ok, <0 si ko * @deprecated use set_demand_reason */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function demand_reason($demand_reason_id, $notrigger=0) { global $user; @@ -3111,6 +3127,7 @@ class Propal extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=1) { global $conf; @@ -3156,6 +3173,7 @@ class Propal extends CommonObject * @param int $mode "opened" for proposal to close, "signed" for proposal to invoice * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board($user,$mode) { global $conf, $langs; @@ -3328,6 +3346,7 @@ class Propal extends CommonObject * * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board() { global $user; @@ -4215,6 +4234,7 @@ class PropaleLigne extends CommonObjectLine * * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_total() { $this->db->begin(); diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 5e0475b158a..380d26f2496 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -441,6 +441,7 @@ class Commande extends CommonOrder * @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on) * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_draft($user, $idwarehouse=-1) { global $conf,$langs; @@ -522,6 +523,7 @@ class Commande extends CommonOrder * @param User $user Object user that change status * @return int <0 if KO, 0 if nothing is done, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_reopen($user) { $error=0; @@ -875,7 +877,7 @@ class Commande extends CommonOrder $line->fk_unit, $this->element, $line->id - ); + ); if ($result < 0) { if ($result != self::STOCK_NOT_ENOUGH_FOR_ORDER) @@ -1493,6 +1495,7 @@ class Commande extends CommonOrder * TODO Remplacer les appels a cette fonction par generation objet Ligne * insere dans tableau $this->products */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_product($idproduct, $qty, $remise_percent=0.0, $date_start='', $date_end='') { global $conf, $mysoc; @@ -1513,56 +1516,57 @@ class Commande extends CommonOrder $localtax2_tx=get_localtax($tva_tx,2,$this->thirdparty,$mysoc,$tva_npr); // multiprix - if($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) + if($conf->global->PRODUIT_MULTIPRICES && $this->thirdparty->price_level) { $price = $prod->multiprices[$this->thirdparty->price_level]; - else - $price = $prod->price; + } else { + $price = $prod->price; + } - $line=new OrderLine($this->db); + $line=new OrderLine($this->db); - $line->context = $this->context; + $line->context = $this->context; - $line->fk_product=$idproduct; - $line->desc=$prod->description; - $line->qty=$qty; - $line->subprice=$price; - $line->remise_percent=$remise_percent; - $line->vat_src_code=$vat_src_code; - $line->tva_tx=$tva_tx; - $line->localtax1_tx=$localtax1_tx; - $line->localtax2_tx=$localtax2_tx; - $line->ref=$prod->ref; - $line->libelle=$prod->label; - $line->product_desc=$prod->description; - $line->fk_unit=$prod->fk_unit; + $line->fk_product=$idproduct; + $line->desc=$prod->description; + $line->qty=$qty; + $line->subprice=$price; + $line->remise_percent=$remise_percent; + $line->vat_src_code=$vat_src_code; + $line->tva_tx=$tva_tx; + $line->localtax1_tx=$localtax1_tx; + $line->localtax2_tx=$localtax2_tx; + $line->ref=$prod->ref; + $line->libelle=$prod->label; + $line->product_desc=$prod->description; + $line->fk_unit=$prod->fk_unit; - // Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) - // Save the start and end date of the line in the object - if ($date_start) { $line->date_start = $date_start; } - if ($date_end) { $line->date_end = $date_end; } + // Added by Matelli (See http://matelli.fr/showcases/patchs-dolibarr/add-dates-in-order-lines.html) + // Save the start and end date of the line in the object + if ($date_start) { $line->date_start = $date_start; } + if ($date_end) { $line->date_end = $date_end; } - $this->lines[] = $line; + $this->lines[] = $line; - /** POUR AJOUTER AUTOMATIQUEMENT LES SOUSPRODUITS a LA COMMANDE - if (! empty($conf->global->PRODUIT_SOUSPRODUITS)) - { - $prod = new Product($this->db); - $prod->fetch($idproduct); - $prod -> get_sousproduits_arbo(); - $prods_arbo = $prod->get_arbo_each_prod(); - if(count($prods_arbo) > 0) - { - foreach($prods_arbo as $key => $value) - { - // print "id : ".$value[1].' :qty: '.$value[0].'
'; - if(! in_array($value[1],$this->products)) - $this->add_product($value[1], $value[0]); + /** POUR AJOUTER AUTOMATIQUEMENT LES SOUSPRODUITS a LA COMMANDE + if (! empty($conf->global->PRODUIT_SOUSPRODUITS)) + { + $prod = new Product($this->db); + $prod->fetch($idproduct); + $prod -> get_sousproduits_arbo(); + $prods_arbo = $prod->get_arbo_each_prod(); + if(count($prods_arbo) > 0) + { + foreach($prods_arbo as $key => $value) + { + // print "id : ".$value[1].' :qty: '.$value[0].'
'; + if(! in_array($value[1],$this->products)) + $this->add_product($value[1], $value[0]); - } - } + } + } - } - **/ + } + **/ } } @@ -1722,6 +1726,7 @@ class Commande extends CommonOrder * @param int $idremise Id de la remise fixe * @return int >0 si ok, <0 si ko */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function insert_discount($idremise) { global $langs; @@ -1799,6 +1804,7 @@ class Commande extends CommonOrder * @param int $only_product Return only physical products * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_lines($only_product=0) { $this->lines=array(); @@ -2025,6 +2031,7 @@ class Commande extends CommonOrder * * TODO deprecate, move to Shipping class */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function nb_expedition() { $sql = 'SELECT count(*)'; @@ -2051,6 +2058,7 @@ class Commande extends CommonOrder * * TODO FONCTION NON FINIE A FINIR */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function stock_array($filtre_statut=self::STATUS_CANCELED) { $this->stocks = array(); @@ -2167,6 +2175,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_remise($user, $remise, $notrigger=0) { $remise=trim($remise)?trim($remise):0; @@ -2233,6 +2242,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_remise_absolue($user, $remise, $notrigger=0) { $remise=trim($remise)?trim($remise):0; @@ -2299,6 +2309,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_date($user, $date, $notrigger=0) { if ($user->rights->commande->creer) @@ -2363,6 +2374,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 si ko, >0 si ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_date_livraison($user, $date_livraison, $notrigger=0) { if ($user->rights->commande->creer) @@ -2432,6 +2444,7 @@ class Commande extends CommonOrder * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='c.date_commande', $sortorder='DESC') { global $user; @@ -2569,6 +2582,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int >0 if ok, <0 if ko */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function demand_reason($demand_reason_id, $notrigger=0) { global $user; @@ -2640,6 +2654,7 @@ class Commande extends CommonOrder * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_ref_client($user, $ref_client, $notrigger=0) { if ($user->rights->commande->creer) @@ -3250,6 +3265,7 @@ class Commande extends CommonOrder * @param User $user Object user * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board($user) { global $conf, $langs; @@ -3338,6 +3354,7 @@ class Commande extends CommonOrder * @param int $donotshowbilled Do not show billed status after order status * @return string Label of status */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$billed,$mode,$donotshowbilled=0) { global $langs, $conf; @@ -3653,6 +3670,7 @@ class Commande extends CommonOrder * * @return int <0 si ko, >0 si ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board() { global $user; @@ -4288,6 +4306,7 @@ class OrderLine extends CommonOrderLine * * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_total() { $this->db->begin(); diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index a28555d9c1d..62028804a4b 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -304,6 +304,7 @@ class Account extends CommonObject * @param string $type Type of link ('payment', 'company', 'member', ...) * @return int <0 if KO, id line if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_url_line($line_id, $url_id, $url, $label, $type) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_url ("; @@ -342,6 +343,7 @@ class Account extends CommonObject * @param string $type To search using type * @return array|-1 Array of links array('url'=>, 'url_id'=>, 'label'=>, 'type'=> 'fk_bank'=> ) or -1 on error */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_url($fk_bank='', $url_id='', $type='') { $lines = array(); @@ -783,11 +785,12 @@ class Account extends CommonObject /** - * Update BBAN (RIB) account fields + * Update BBAN (RIB) account fields * - * @param User $user Object user making update - * @return int <0 if KO, >0 if OK + * @param User $user Object user making update + * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_bban(User $user = null) { global $conf,$langs; @@ -1075,6 +1078,7 @@ class Account extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut, $mode = 0) { global $langs; @@ -1110,6 +1114,7 @@ class Account extends CommonObject * * @return boolean vrai si peut etre supprime, faux sinon */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function can_be_deleted() { $can_be_deleted=false; @@ -1179,6 +1184,7 @@ class Account extends CommonObject * @param int $filteraccountid To get info for a particular account id * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board(User $user, $filteraccountid = 0) { global $conf, $langs; @@ -1232,6 +1238,7 @@ class Account extends CommonObject * @param int $filteraccountid To get info for a particular account id * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board($filteraccountid = 0) { global $user; @@ -1887,6 +1894,7 @@ class AccountLine extends CommonObject * @param User $user User object that delete * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function delete_urls(User $user = null) { $nbko=0; @@ -1952,12 +1960,13 @@ class AccountLine extends CommonObject /** - * Update conciliation field + * Update conciliation field * - * @param User $user Objet user making update - * @param int $cat Category id - * @return int <0 if KO, >0 if OK + * @param User $user Objet user making update + * @param int $cat Category id + * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_conciliation(User $user, $cat) { global $conf,$langs; @@ -2020,6 +2029,7 @@ class AccountLine extends CommonObject * @param int $sign 1 or -1 * @return int >0 if OK, 0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function datev_change($rowid,$sign=1) { $sql = "SELECT datev FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; @@ -2057,6 +2067,7 @@ class AccountLine extends CommonObject * @param int $id Id of line to change * @return int >0 if OK, 0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function datev_next($id) { return $this->datev_change($id,1); @@ -2068,6 +2079,7 @@ class AccountLine extends CommonObject * @param int $id Id of line to change * @return int >0 if OK, 0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function datev_previous($id) { return $this->datev_change($id,-1); @@ -2081,6 +2093,7 @@ class AccountLine extends CommonObject * @param int $sign 1 or -1 * @return int >0 if OK, 0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function dateo_change($rowid,$sign=1) { $sql = "SELECT dateo FROM ".MAIN_DB_PREFIX."bank WHERE rowid = ".$rowid; @@ -2118,6 +2131,7 @@ class AccountLine extends CommonObject * @param int $id Id of line to change * @return int >0 if OK, 0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function dateo_next($id) { return $this->dateo_change($id,1); @@ -2129,6 +2143,7 @@ class AccountLine extends CommonObject * @param int $id Id of line to change * @return int >0 if OK, 0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function dateo_previous($id) { return $this->dateo_change($id,-1); @@ -2244,6 +2259,7 @@ class AccountLine extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0) { global $langs; diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index e21e052e478..47e7219ea81 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -461,6 +461,7 @@ class PaymentVarious extends CommonObject * @param int $id_bank Id bank account * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_fk_bank($id_bank) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_various SET fk_bank = '.$id_bank; @@ -496,6 +497,7 @@ class PaymentVarious extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0) { global $langs; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index c6c95a0e282..0600a141308 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -317,6 +317,7 @@ class Deplacement extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Libelle */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0) { global $langs; @@ -463,4 +464,3 @@ class Deplacement extends CommonObject } } } - diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 7d054d054da..6e61b55e2ba 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -448,8 +448,9 @@ class FactureRec extends CommonInvoice /** * Recupere les lignes de factures predefinies dans this->lines * - * @return int 1 if OK, < 0 if KO - */ + * @return int 1 if OK, < 0 if KO + */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_lines() { $this->lines=array(); @@ -1196,6 +1197,7 @@ class FactureRec extends CommonInvoice * @param int $type Type invoice * @return string Label of status */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0) { global $langs; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 0b77f7c5c07..cb705e063db 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1416,6 +1416,7 @@ class Facture extends CommonInvoice * * @return int 1 if OK, < 0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_lines() { $this->lines=array(); @@ -1676,6 +1677,7 @@ class Facture extends CommonInvoice * @param int $idremise Id of absolute discount * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function insert_discount($idremise) { global $langs; @@ -1777,6 +1779,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_ref_client($ref_client, $notrigger=0) { global $user; @@ -2012,6 +2015,7 @@ class Facture extends CommonInvoice * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple) * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_paid($user, $close_code='', $close_note='') { $error=0; @@ -2069,6 +2073,7 @@ class Facture extends CommonInvoice * @param User $user Object user that change status * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_unpaid($user) { $error=0; @@ -2118,6 +2123,7 @@ class Facture extends CommonInvoice * @param string $close_note Comment * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_canceled($user, $close_code='', $close_note='') { @@ -2478,6 +2484,7 @@ class Facture extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_draft($user,$idwarehouse=-1) { global $conf,$langs; @@ -3043,6 +3050,7 @@ class Facture extends CommonInvoice * @param int $percent Percentage * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_percent($line, $percent) { global $mysoc,$user; @@ -3140,6 +3148,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_remise($user, $remise, $notrigger=0) { // Clean parameters @@ -3204,6 +3213,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_remise_absolue($user, $remise, $notrigger=0) { if (empty($remise)) $remise=0; @@ -3409,6 +3419,7 @@ class Facture extends CommonInvoice * @param string $sortorder Sort order * @return int -1 if KO, array with result if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC') { global $conf,$user; @@ -3478,6 +3489,7 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function list_replacable_invoices($socid=0) { global $conf; @@ -3526,6 +3538,7 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function list_qualified_avoir_invoices($socid=0) { global $conf; @@ -3599,6 +3612,7 @@ class Facture extends CommonInvoice * @param float $amount Amount we request direct debit for * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function demande_prelevement($fuser, $amount=0) { @@ -3708,6 +3722,7 @@ class Facture extends CommonInvoice * @param int $did id de la demande a supprimer * @return int <0 if OK, >0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function demande_prelevement_delete($fuser, $did) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'prelevement_facture_demande'; @@ -3732,6 +3747,7 @@ class Facture extends CommonInvoice * @param User $user Object user * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board($user) { global $conf, $langs; @@ -3976,6 +3992,7 @@ class Facture extends CommonInvoice * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board() { global $conf, $user; @@ -4089,6 +4106,7 @@ class Facture extends CommonInvoice * * @return boolean */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function is_first() { return ($this->situation_counter == 1); @@ -4099,6 +4117,7 @@ class Facture extends CommonInvoice * * @return mixed -1 if error, array of previous situations */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_prev_sits() { global $conf; @@ -4179,6 +4198,7 @@ class Facture extends CommonInvoice * @return bool Last of the cycle status * */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function is_last_in_cycle() { global $conf; @@ -4816,6 +4836,7 @@ class FactureLigne extends CommonInvoiceLine * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_total() { $this->db->begin(); @@ -4857,6 +4878,7 @@ class FactureLigne extends CommonInvoiceLine * @param int $invoiceid Invoice id * @return int >= 0 */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_prev_progress($invoiceid) { if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") { diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 764ba119dc7..2b53770183d 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -350,6 +350,7 @@ class Localtax extends CommonObject * @param int $year Year * @return int ??? */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function localtax_sum_collectee($year = 0) { $sql = "SELECT sum(f.localtax) as amount"; @@ -388,6 +389,7 @@ class Localtax extends CommonObject * @param int $year Year * @return int ??? */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function localtax_sum_payee($year = 0) { @@ -429,6 +431,7 @@ class Localtax extends CommonObject * @param int $year Year * @return int ??? */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function localtax_sum_reglee($year = 0) { @@ -582,6 +585,7 @@ class Localtax extends CommonObject * @param int $id Id bank account * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_fk_bank($id) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'localtax SET fk_bank = '.$id; @@ -640,12 +644,13 @@ class Localtax extends CommonObject * * @param int $status Statut * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * @return string Libelle du statut + * @return string Libelle du statut */ - function LibStatut($status,$mode=0) - { - global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function LibStatut($status, $mode=0) + { + global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage - return ''; - } + return ''; + } } diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index f8dba8c6b1d..b28ca9dcb18 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -498,6 +498,7 @@ class RemiseCheque extends CommonObject * @param User $user Objet user * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board($user) { global $conf, $langs; @@ -550,6 +551,7 @@ class RemiseCheque extends CommonObject * * @return int <0 if ko, >0 if ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board() { global $user; @@ -862,8 +864,9 @@ class RemiseCheque extends CommonObject /** * Charge les proprietes ref_previous et ref_next * - * @return int <0 if KO, 0 if OK + * @return int <0 if KO, 0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_previous_next_id() { global $conf; @@ -907,6 +910,7 @@ class RemiseCheque extends CommonObject * @param int $date Date creation * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_date($user, $date) { if ($user->rights->banque->cheque) @@ -941,6 +945,7 @@ class RemiseCheque extends CommonObject * @param int $ref ref of bordereau * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_number($user, $ref) { if ($user->rights->banque->cheque) @@ -1063,6 +1068,7 @@ class RemiseCheque extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @return string Libelle du statut */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($status,$mode=0) { global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index fa824375793..1fd2ad8bbef 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -708,6 +708,7 @@ class Paiement extends CommonObject * @param int $id_bank Id compte bancaire * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_fk_bank($id_bank) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' set fk_bank = '.$id_bank; @@ -733,6 +734,7 @@ class Paiement extends CommonObject * @param int $date New date * @return int <0 if KO, 0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_date($date) { if (!empty($date) && $this->statut!=1) @@ -764,6 +766,7 @@ class Paiement extends CommonObject * @param string $num New num * @return int <0 if KO, 0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_num($num) { if(!empty($num) && $this->statut!=1) @@ -1127,6 +1130,7 @@ class Paiement extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($status,$mode=0) { global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage @@ -1171,11 +1175,12 @@ class Paiement extends CommonObject } /** - * Load the third party of object, from id into this->thirdparty + * Load the third party of object, from id into this->thirdparty * - * @param int $force_thirdparty_id Force thirdparty id - * @return int <0 if KO, >0 if OK + * @param int $force_thirdparty_id Force thirdparty id + * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_thirdparty($force_thirdparty_id=0) { include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index bfce2e8af95..7eba6afec29 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -122,6 +122,7 @@ class BonPrelevement extends CommonObject * @param string $number_key number key of account number * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number, $number_key) { $result = 0; @@ -332,6 +333,7 @@ class BonPrelevement extends CommonObject * * @return int <0 if KO, >=0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_credite() { global $user,$conf; @@ -411,6 +413,7 @@ class BonPrelevement extends CommonObject * @param int $date date of action * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_infocredit($user, $date) { global $conf,$langs; @@ -558,6 +561,7 @@ class BonPrelevement extends CommonObject * @param string $method method of transmision to bank * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_infotrans($user, $date, $method) { global $conf,$langs; @@ -679,6 +683,7 @@ class BonPrelevement extends CommonObject * * @return double Total amount */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SommeAPrelever() { global $conf; @@ -719,6 +724,7 @@ class BonPrelevement extends CommonObject * @param int $agence dolibarr mysoc agence * @return int 0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function DeleteNotification($user, $action) { $result = 0; @@ -1242,6 +1251,7 @@ class BonPrelevement extends CommonObject * @param string $action notification action * @return int 0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function AddNotification($db, $user, $action) { $result = 0; @@ -1473,6 +1483,7 @@ class BonPrelevement extends CommonObject * @param string $rib_dom rib domiciliation * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function EnregDestinataire($rowid, $client_nom, $rib_banque, $rib_guichet, $rib_number, $amount, $facnumber, $facid, $rib_dom='') { fputs($this->file, "06"); @@ -1566,6 +1577,7 @@ class BonPrelevement extends CommonObject * @param string $row_drum rib.rowid used to generate rum * @return string Return string with SEPA part DrctDbtTxInf */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address, $row_zip, $row_town, $row_country_code, $row_cb, $row_cg, $row_cc, $row_somme, $row_facnumber, $row_idfac, $row_iban, $row_bic, $row_datec, $row_drum) { $CrLf = "\n"; @@ -1627,6 +1639,7 @@ class BonPrelevement extends CommonObject * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function EnregEmetteur() { fputs($this->file, "03"); @@ -1699,6 +1712,7 @@ class BonPrelevement extends CommonObject * @param string $format FRST or RCUR or ALL * @return string String with SEPA Sender */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function EnregEmetteurSEPA($configuration, $ladate, $nombre, $total, $CrLf='\n', $format='FRST') { // SEPA INITIALISATION @@ -1814,6 +1828,7 @@ class BonPrelevement extends CommonObject * @param int $total total amount * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function EnregTotal($total) { fputs($this->file, "08"); @@ -1887,6 +1902,7 @@ class BonPrelevement extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0) { if (empty($this->labelstatut)) @@ -1938,4 +1954,3 @@ class BonPrelevement extends CommonObject } } } - diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 10a7f6d23ee..fc92302cf7d 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -135,6 +135,7 @@ class LignePrelevement * @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0) { global $langs; @@ -180,4 +181,3 @@ class LignePrelevement return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } } - diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 7abdf64d1f0..095defe986a 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -205,6 +205,7 @@ class RejetPrelevement * @param Facture $fac Invoice object * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _send_email($fac) { global $langs; @@ -369,4 +370,3 @@ class RejetPrelevement } } } - diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index a7a8736b96a..48877412d76 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -497,6 +497,7 @@ class PaymentSalary extends CommonObject * @param int $id_bank Id bank account * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_fk_bank($id_bank) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'payment_salary SET fk_bank = '.$id_bank; @@ -595,6 +596,7 @@ class PaymentSalary extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($status,$mode=0) { global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index 3add8b14076..bfa8c97a058 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -38,7 +38,7 @@ class Cchargesociales * @var string Id to identify managed objects */ public $element = 'cchargesociales'; - + /** * @var string Name of table without prefix where object is stored */ @@ -51,7 +51,7 @@ class Cchargesociales public $fk_pays; public $module; public $accountancy_code; - + /** * Constructor @@ -78,7 +78,7 @@ class Cchargesociales $error = 0; // Clean parameters - + if (isset($this->libelle)) { $this->libelle = trim($this->libelle); } @@ -101,14 +101,14 @@ class Cchargesociales $this->accountancy_code = trim($this->accountancy_code); } - + // Check parameters // Put here code to add control on parameters values // Insert request $sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . '('; - + $sql.= 'libelle,'; $sql.= 'deductible,'; $sql.= 'active,'; @@ -117,9 +117,9 @@ class Cchargesociales $sql.= 'module'; $sql.= 'accountancy_code'; - + $sql .= ') VALUES ('; - + $sql .= ' '.(! isset($this->libelle)?'NULL':"'".$this->db->escape($this->libelle)."'").','; $sql .= ' '.(! isset($this->deductible)?'NULL':$this->deductible).','; $sql .= ' '.(! isset($this->active)?'NULL':$this->active).','; @@ -128,7 +128,7 @@ class Cchargesociales $sql .= ' '.(! isset($this->module)?'NULL':"'".$this->db->escape($this->module)."'").','; $sql .= ' '.(! isset($this->accountancy_code)?'NULL':"'".$this->db->escape($this->accountancy_code)."'"); - + $sql .= ')'; $this->db->begin(); @@ -201,7 +201,7 @@ class Cchargesociales $obj = $this->db->fetch_object($resql); $this->id = $obj->id; - + $this->libelle = $obj->libelle; $this->deductible = $obj->deductible; $this->active = $obj->active; @@ -210,7 +210,7 @@ class Cchargesociales $this->module = $obj->module; $this->accountancy_code = $obj->accountancy_code; - + } $this->db->free($resql); @@ -242,7 +242,7 @@ class Cchargesociales dol_syslog(__METHOD__, LOG_DEBUG); // Clean parameters - + if (isset($this->libelle)) { $this->libelle = trim($this->libelle); } @@ -265,7 +265,7 @@ class Cchargesociales $this->accountancy_code = trim($this->accountancy_code); } - + // Check parameters // Put here code to add a control on parameters values @@ -449,7 +449,7 @@ class Cchargesociales $result.= $link . $this->ref . $linkend; return $result; } - + /** * Retourne le libelle du status d'un user (actif, inactif) * @@ -468,6 +468,7 @@ class Cchargesociales * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label of status */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($status,$mode=0) { global $langs; @@ -504,8 +505,8 @@ class Cchargesociales if ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); } } - - + + /** * Initialise object with example values * Id must be 0 if object instance is a specimen @@ -515,7 +516,7 @@ class Cchargesociales public function initAsSpecimen() { $this->id = 0; - + $this->libelle = ''; $this->deductible = ''; $this->active = ''; diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 41d91235150..bad851450a7 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -373,6 +373,7 @@ class ChargeSociales extends CommonObject * @param User $user Object user making change * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_paid($user) { $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET"; @@ -388,6 +389,7 @@ class ChargeSociales extends CommonObject * @param User $user Object user making change * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function set_unpaid($user) { $sql = "UPDATE ".MAIN_DB_PREFIX."chargesociales SET"; @@ -418,6 +420,7 @@ class ChargeSociales extends CommonObject * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0,$alreadypaid=-1) { global $langs; @@ -645,4 +648,3 @@ class ChargeSociales extends CommonObject $this->type_libelle = 'Social contribution label'; } } - diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index b053e180159..4a989554b69 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -606,6 +606,7 @@ class PaymentSocialContribution extends CommonObject * @param int $id_bank Id if bank * @return int >0 if OK, <=0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_fk_bank($id_bank) { $sql = "UPDATE ".MAIN_DB_PREFIX."paiementcharge SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id; @@ -642,6 +643,7 @@ class PaymentSocialContribution extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($status,$mode=0) { global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 24c660f789c..6b1211cd1fc 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -367,8 +367,9 @@ class Tva extends CommonObject * Total of the VAT from invoices emitted by the thirdparty. * * @param int $year Year - * @return double Amount + * @return double Amount */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function tva_sum_collectee($year = 0) { @@ -408,6 +409,7 @@ class Tva extends CommonObject * @param int $year Year * @return double Amount */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function tva_sum_payee($year = 0) { @@ -448,6 +450,7 @@ class Tva extends CommonObject * @param int $year Year * @return double Amount */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function tva_sum_reglee($year = 0) { @@ -639,6 +642,7 @@ class Tva extends CommonObject * @param int $id_bank Id bank account * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_fk_bank($id_bank) { $sql = 'UPDATE '.MAIN_DB_PREFIX.'tva SET fk_bank = '.$id_bank; @@ -803,10 +807,11 @@ class Tva extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle du statut */ - function LibStatut($status,$mode=0) - { - global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function LibStatut($status,$mode=0) + { + global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage - return ''; - } + return ''; + } } diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index c0477a6c752..06c65500527 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -83,6 +83,7 @@ abstract class ActionsContactCardCommon * @param int $id Id * @return string HTML output */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function assign_values(&$action, $id) { global $conf, $langs, $user, $canvas; @@ -270,33 +271,34 @@ abstract class ActionsContactCardCommon * * @return string HTML output */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function assign_post() { global $langs, $mysoc; - $this->object->old_name = $_POST["old_name"]; - $this->object->old_firstname = $_POST["old_firstname"]; + $this->object->old_name = $_POST["old_name"]; + $this->object->old_firstname = $_POST["old_firstname"]; - $this->object->socid = $_POST["socid"]; - $this->object->lastname = $_POST["name"]; - $this->object->firstname = $_POST["firstname"]; - $this->object->civility_id = $_POST["civility_id"]; - $this->object->poste = $_POST["poste"]; - $this->object->address = $_POST["address"]; - $this->object->zip = $_POST["zipcode"]; - $this->object->town = $_POST["town"]; - $this->object->fk_departement = $_POST["state_id"]; - $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id; - $this->object->state_id = $_POST["state_id"]; - $this->object->phone_pro = $_POST["phone_pro"]; - $this->object->phone_perso = $_POST["phone_perso"]; - $this->object->phone_mobile = $_POST["phone_mobile"]; - $this->object->fax = $_POST["fax"]; - $this->object->email = $_POST["email"]; - $this->object->jabberid = $_POST["jabberid"]; - $this->object->priv = $_POST["priv"]; - $this->object->note = $_POST["note"]; - $this->object->canvas = $_POST["canvas"]; + $this->object->socid = $_POST["socid"]; + $this->object->lastname = $_POST["name"]; + $this->object->firstname = $_POST["firstname"]; + $this->object->civility_id = $_POST["civility_id"]; + $this->object->poste = $_POST["poste"]; + $this->object->address = $_POST["address"]; + $this->object->zip = $_POST["zipcode"]; + $this->object->town = $_POST["town"]; + $this->object->fk_departement = $_POST["state_id"]; + $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id; + $this->object->state_id = $_POST["state_id"]; + $this->object->phone_pro = $_POST["phone_pro"]; + $this->object->phone_perso = $_POST["phone_perso"]; + $this->object->phone_mobile = $_POST["phone_mobile"]; + $this->object->fax = $_POST["fax"]; + $this->object->email = $_POST["email"]; + $this->object->jabberid = $_POST["jabberid"]; + $this->object->priv = $_POST["priv"]; + $this->object->note = $_POST["note"]; + $this->object->canvas = $_POST["canvas"]; // We set country_id, and country_code label of the chosen country if ($this->object->country_id) @@ -317,4 +319,3 @@ abstract class ActionsContactCardCommon } } } - diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 01007d28aa8..566434c1d5a 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -73,6 +73,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon * @param int $id Id * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function assign_values(&$action, $id) { global $limit, $offset, $sortfield, $sortorder; @@ -128,6 +129,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon * @param string $sortorder Sort order ('ASC' or 'DESC') * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LoadListDatas($limit, $offset, $sortfield, $sortorder) { global $conf, $langs; @@ -137,4 +139,3 @@ class ActionsContactCardDefault extends ActionsContactCardCommon $this->list_datas = array(); } } - diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index b3251a853c3..4cd6fe81820 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -150,6 +150,7 @@ class Contact extends CommonObject * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board() { global $user; @@ -483,6 +484,7 @@ class Contact extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_dn($info,$mode=0) { global $conf; @@ -499,6 +501,7 @@ class Contact extends CommonObject * * @return array Tableau info des attributs */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_info() { global $conf,$langs; @@ -575,6 +578,7 @@ class Contact extends CommonObject * @param int $notrigger 0=no, 1=yes * @return int <0 if KO, >=0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_perso($id, $user=null, $notrigger=0) { $error=0; @@ -857,6 +861,7 @@ class Contact extends CommonObject * * @return int <0 if KO, >=0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_ref_elements() { // Compte les elements pour lesquels il est contact @@ -1196,6 +1201,7 @@ class Contact extends CommonObject * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Libelle */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode) { global $langs; @@ -1240,6 +1246,7 @@ class Contact extends CommonObject * @param int $statut Type (0 = public, 1 = private) * @return string Label translated */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibPubPriv($statut) { global $langs; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 4f153cf33d7..2ae8c785282 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -251,6 +251,7 @@ class Contrat extends CommonObject * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function active_line($user, $line_id, $date, $date_end='', $comment='') { $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date, $date_end, $comment); @@ -272,6 +273,7 @@ class Contrat extends CommonObject * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function close_line($user, $line_id, $date_end, $comment='') { $result=$this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment); @@ -711,6 +713,7 @@ class Contrat extends CommonObject * * @return ContratLigne[] Return array of contract lines */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_lines() { $this->nbofserviceswait=0; @@ -1789,6 +1792,7 @@ class Contrat extends CommonObject * @return int <0 if KO, >0 if OK * @deprecated This function will never be used. Status of a contract is status of its lines. */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_statut($user) { dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING); @@ -1827,6 +1831,7 @@ class Contrat extends CommonObject * @param int $mode 0=Long label, 1=Short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Long label of all services, 5=Libelle court + Picto, 6=Picto of all services, 7=Same than 6 with fixed length * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode) { global $langs; @@ -2008,6 +2013,7 @@ class Contrat extends CommonObject * @param int $statut Status of lines to get * @return array Array of line's rowid */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function array_detail($statut=-1) { $tab=array(); @@ -2084,6 +2090,7 @@ class Contrat extends CommonObject * @param string $mode "inactive" pour services a activer, "expired" pour services expires * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board($user,$mode) { global $conf, $langs; @@ -2160,6 +2167,7 @@ class Contrat extends CommonObject * * @return int <0 si ko, >0 si ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board() { global $conf, $user; @@ -2593,6 +2601,7 @@ class ContratLigne extends CommonObjectLine * @param string $moreatt More attribute * @return string Libelle */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps static function LibStatut($statut,$mode,$expired=-1,$moreatt='') { global $langs; @@ -3012,6 +3021,7 @@ class ContratLigne extends CommonObjectLine * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_total() { $this->db->begin(); @@ -3131,6 +3141,7 @@ class ContratLigne extends CommonObjectLine * @param string $comment A comment typed by user * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function active_line($user, $date, $date_end = '', $comment = '') { global $langs, $conf; @@ -3188,6 +3199,7 @@ class ContratLigne extends CommonObjectLine * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function close_line($user, $date_end, $comment = '', $notrigger=0) { global $langs, $conf; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 51f2ae671ef..0fdd3333549 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -833,6 +833,7 @@ class CMailFile * @param string $sourcefile Path to file to encode * @return int <0 if KO, encoded string if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _encode_file($sourcefile) { $newsourcefile=dol_osencode($sourcefile); @@ -859,6 +860,7 @@ class CMailFile * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function dump_mail() { global $conf,$dolibarr_main_data_root; @@ -950,6 +952,7 @@ class CMailFile * * @return string headers */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_smtpheaders() { global $conf; @@ -1014,6 +1017,7 @@ class CMailFile * @param array $mimefilename_list Array of mime types * @return string mime headers */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_mimeheaders($filename_list, $mimefilename_list) { $mimedone=0; @@ -1042,6 +1046,7 @@ class CMailFile * @param string $msgtext Message string * @return string String content */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_body($msgtext) { global $conf; @@ -1144,6 +1149,7 @@ class CMailFile * @param array $mimefilename_list Tableau * @return string Chaine fichiers encodes */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_files($filename_list,$mimetype_list,$mimefilename_list) { $out = ''; @@ -1189,6 +1195,7 @@ class CMailFile * @param array $images_list Tableau * @return string Chaine images encodees */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function write_images($images_list) { $out = ''; @@ -1221,6 +1228,7 @@ class CMailFile * @param int $port Example: 25, 465 * @return int Socket id if ok, 0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function check_server_port($host,$port) { global $conf; @@ -1285,6 +1293,7 @@ class CMailFile * @param string $response Response string * @return boolean true if success */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function server_parse($socket, $response) { $_retVal = true; // Indicates if Object was created or not @@ -1511,4 +1520,3 @@ class CMailFile return $ret; } } - diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 1eafa042d4f..5bc8105049e 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -198,6 +198,7 @@ class CSMSFile * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function dump_sms() { global $conf,$dolibarr_main_data_root; @@ -228,6 +229,7 @@ class CSMSFile * @param int $result Result of sms sending * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function dump_sms_result($result) { global $conf,$dolibarr_main_data_root; @@ -245,4 +247,3 @@ class CSMSFile } } } - diff --git a/htdocs/core/class/antivir.class.php b/htdocs/core/class/antivir.class.php index 34d797ec891..e1a50c63083 100644 --- a/htdocs/core/class/antivir.class.php +++ b/htdocs/core/class/antivir.class.php @@ -65,6 +65,7 @@ class AntiVir * @param string $file File to scan * @return int <0 if KO (-98 if error, -99 if virus), 0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function dol_avscan_file($file) { global $conf; @@ -180,4 +181,3 @@ class AntiVir return $ret; } } - diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 616136e4912..c65b2ba6fe1 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -141,6 +141,7 @@ class Canvas * @param string $ref Object ref (if id not provided) * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function assign_values(&$action='view', $id=0, $ref='') { if (method_exists($this->control,'assign_values')) $this->control->assign_values($action, $id, $ref); @@ -167,6 +168,7 @@ class Canvas * @param string $action Action code * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function display_canvas($action) { global $db, $conf, $langs, $user, $canvas; diff --git a/htdocs/core/class/comment.class.php b/htdocs/core/class/comment.class.php index b75b4050788..287d260f4d2 100644 --- a/htdocs/core/class/comment.class.php +++ b/htdocs/core/class/comment.class.php @@ -362,4 +362,4 @@ class Comment extends CommonObject return count($this->comments); } -} \ No newline at end of file +} diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index c0ac94461e0..5a1bcd8440d 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -55,6 +55,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_user($user,$outputlangs) { global $conf; @@ -91,6 +92,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_mysoc($mysoc,$outputlangs) { global $conf; @@ -149,6 +151,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_thirdparty($object,$outputlangs) { global $conf; @@ -229,6 +232,7 @@ abstract class CommonDocGenerator * @param array_key $array_key Name of the key for return array * @return array of substitution key->code */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object') { global $conf; @@ -299,6 +303,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Language object for output * @return array Array of substitution key->code */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_other($outputlangs) { global $conf; @@ -337,6 +342,7 @@ abstract class CommonDocGenerator * @param string $array_key Name of the key for return array * @return array Array of substitution */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_object($object,$outputlangs,$array_key='object') { global $conf; @@ -482,6 +488,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_lines($line,$outputlangs) { global $conf; @@ -560,6 +567,7 @@ abstract class CommonDocGenerator * @param array_key $array_key Name of the key for return array * @return array Array of substitution */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_shipment($object,$outputlangs,$array_key='object') { global $conf; @@ -614,16 +622,17 @@ abstract class CommonDocGenerator /** - * Define array with couple substitution key => substitution value + * Define array with couple substitution key => substitution value * * @param ExpeditionLigne $line Object line * @param Translate $outputlangs Lang object to use for output * @return array Substitution array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_shipment_lines($line, $outputlangs) { global $conf; - dol_include_once('/core/lib/product.lib.php'); + dol_include_once('/core/lib/product.lib.php'); $resarray = array( 'line_fulldesc'=>doc_getlinedesc($line,$outputlangs), @@ -645,7 +654,7 @@ abstract class CommonDocGenerator 'line_volume'=>empty($line->volume) ? '' : $line->volume*$line->qty_shipped.' '.measuring_units_string($line->volume_units, 'volume'), ); - // Retrieve extrafields + // Retrieve extrafields $extrafieldkey = $line->element; $array_key = "line"; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; @@ -667,6 +676,7 @@ abstract class CommonDocGenerator * @param boolean $recursive Want to fetch child array or child object * @return array Array of substitution key->code */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_substitutionarray_each_var_object(&$object,$outputlangs,$recursive=true) { $array_other = array(); @@ -696,6 +706,7 @@ abstract class CommonDocGenerator * @param Translate $outputlangs Lang object to use for output * @return array Substitution array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fill_substitutionarray_with_extrafields($object,$array_to_fill,$extrafields,$array_key,$outputlangs) { global $conf; diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 9bab103d2e4..54d9aed45e9 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -337,6 +337,7 @@ abstract class CommonInvoice extends CommonObject * * @return int <=0 if no, >0 if yes */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function is_erasable() { global $conf; @@ -459,6 +460,7 @@ abstract class CommonInvoice extends CommonObject * @param int $type Type invoice * @return string Label of status */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0) { global $langs; @@ -585,8 +587,9 @@ abstract class CommonInvoice extends CommonObject * conditions de reglements de la facture et date de facturation * * @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition. - * @return date Date limite de reglement si ok, <0 si ko + * @return date Date limite de reglement si ok, <0 si ko */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function calculate_date_lim_reglement($cond_reglement=0) { if (! $cond_reglement) $cond_reglement=$this->cond_reglement_code; @@ -776,4 +779,3 @@ abstract class CommonInvoiceLine extends CommonObjectLine $this->db = $db; } } - diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 16033e0c7e4..a00f91ac5bc 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -722,6 +722,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_contact($fk_socpeople, $type_contact, $source='external',$notrigger=0) { global $user,$langs; @@ -842,6 +843,7 @@ abstract class CommonObject * @param string $source Nature of contact ('internal' or 'external') * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function copy_linked_contact($objFrom, $source='internal') { $contacts = $objFrom->liste_contact(-1, $source); @@ -865,6 +867,7 @@ abstract class CommonObject * @param int $fk_socpeople Id of soc_people to update (not modified if 0) * @return int <0 if KO, >= 0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_contact($rowid, $statut, $type_contact_id=0, $fk_socpeople=0) { // Insert into database @@ -892,6 +895,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function delete_contact($rowid, $notrigger=0) { global $user; @@ -929,6 +933,7 @@ abstract class CommonObject * @param string $code Type of contact (code or id) * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function delete_linked_contact($source='',$code='') { $temp = array(); @@ -966,6 +971,7 @@ abstract class CommonObject * @param string $code Filter on this code of contact type ('SHIPPING', 'BILLING', ...) * @return array Array of contacts */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_contact($statut=-1,$source='external',$list=0,$code='') { global $langs; @@ -1074,6 +1080,7 @@ abstract class CommonObject * @param string $code Type of contact (Example: 'CUSTOMER', 'SERVICE') * @return array Array list of type of contacts (id->label if option=0, code->label if option=1) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_type_contact($source='internal', $order='position', $option=0, $activeonly=0, $code='') { global $langs; @@ -1183,6 +1190,7 @@ abstract class CommonObject * @param int $contactid Id du contact. Use this->contactid if empty. * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_contact($contactid=null) { if (empty($contactid)) $contactid=$this->contactid; @@ -1202,6 +1210,7 @@ abstract class CommonObject * @param int $force_thirdparty_id Force thirdparty id * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_thirdparty($force_thirdparty_id=0) { global $conf; @@ -1264,6 +1273,7 @@ abstract class CommonObject * * @return int <0 if KO, 0 if can't guess type of barcode (ISBN, EAN13...), >0 if OK (all barcode properties loaded) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_barcode() { global $conf; @@ -1311,6 +1321,7 @@ abstract class CommonObject * * @return int <0 if KO, >=0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_projet() { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -1331,6 +1342,7 @@ abstract class CommonObject * * @return int <0 if KO, >=0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_product() { include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -1350,6 +1362,7 @@ abstract class CommonObject * @param int $userid Id du contact * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_user($userid) { $user = new User($this->db); @@ -1363,6 +1376,7 @@ abstract class CommonObject * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_origin() { if ($this->origin == 'shipping') $this->origin = 'expedition'; @@ -1532,6 +1546,7 @@ abstract class CommonObject * @param int $nodbprefix Do not include DB prefix to forge table name * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_previous_next_ref($filter, $fieldid, $nodbprefix=0) { global $conf, $user; @@ -2167,6 +2182,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function line_order($renum=false, $rowidorder='ASC', $fk_parent_line=true) { if (! $this->table_element_line) @@ -2284,6 +2300,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function line_up($rowid, $fk_parent_line=true) { $this->line_order(false, 'ASC', $fk_parent_line); @@ -2302,6 +2319,7 @@ abstract class CommonObject * @param boolean $fk_parent_line Table with fk_parent_line field or not * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function line_down($rowid, $fk_parent_line=true) { $this->line_order(false, 'ASC', $fk_parent_line); @@ -2344,6 +2362,7 @@ abstract class CommonObject * @param array $rows Array of rows * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function line_ajaxorder($rows) { $num = count($rows); @@ -2459,6 +2478,7 @@ abstract class CommonObject * @param int $fk_parent_line Parent line id * @return int Max value of rang in table of lines */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function line_max($fk_parent_line=0) { // Search the last rang with fk_parent_line @@ -2505,6 +2525,7 @@ abstract class CommonObject * @param string $ref_ext Update field ref_ext * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_ref_ext($ref_ext) { if (! $this->table_element) @@ -2537,7 +2558,8 @@ abstract class CommonObject * @param string $suffix '', '_public' or '_private' * @return int <0 if KO, >0 if OK */ - function update_note($note,$suffix='') + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function update_note($note, $suffix='') { global $user; @@ -2589,6 +2611,7 @@ abstract class CommonObject * @deprecated * @see update_note() */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_note_public($note) { return $this->update_note($note,'_public'); @@ -2604,6 +2627,7 @@ abstract class CommonObject * @param Societe $seller If roundingadjust is '0' or '1' or maybe 'auto', it means we recalculate total for lines before calculating total for object and for this, we need seller object. * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_price($exclspec=0,$roundingadjust='none',$nodatabaseupdate=0,$seller=null) { global $conf, $hookmanager, $action; @@ -2840,6 +2864,7 @@ abstract class CommonObject * @return int <=0 if KO, >0 if OK * @see fetchObjectLinked, updateObjectLinked, deleteObjectLinked */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_object_linked($origin=null, $origin_id=null) { $origin = (! empty($origin) ? $origin : $this->origin); @@ -3598,6 +3623,7 @@ abstract class CommonObject * * @return string incoterms info */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function display_incoterms() { $out = ''; @@ -4209,6 +4235,7 @@ abstract class CommonObject * @param int $mandatory Mandatory or not * @return int <=0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_element_resource($resource_id, $resource_type, $busy=0, $mandatory=0) { $this->db->begin(); @@ -4251,6 +4278,7 @@ abstract class CommonObject * @param int $notrigger Disable all triggers * @return int >0 if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function delete_resource($rowid, $element, $notrigger=0) { global $user; @@ -4635,6 +4663,7 @@ abstract class CommonObject * @param User $user Object user * @return int Result of run_triggers */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function call_trigger($trigger_name, $user) { global $langs,$conf; @@ -4669,6 +4698,7 @@ abstract class CommonObject * @param array $optionsArray Array resulting of call of extrafields->fetch_name_optionals_label(). Deprecated. Function must be called without parameters. * @return int <0 if error, 0 if no values of extrafield to find nor found, 1 if an attribute is found and value loaded */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_optionals($rowid=null, $optionsArray=null) { if (empty($rowid)) $rowid=$this->id; @@ -6120,7 +6150,7 @@ abstract class CommonObject * * @param Extrafields $extrafields Extrafield Object * @param string $mode Show output (view) or input (edit) for extrafield - * @param array $params Optional parameters + * @param array $params Optional parameters. Example: array('style'=>'class="oddeven"', 'colspan'=>$colspan) * @param string $keysuffix Suffix string to add after name and id of field (can be used to avoid duplicate names) * @param string $keyprefix Prefix string to add before name and id of field (can be used to avoid duplicate names) * @param string $onetrtd All fields in same tr td @@ -6449,6 +6479,7 @@ abstract class CommonObject * @param int $usesharelink Use the public shared link of image (if not available, the 'nophoto' image will be shown instead) * @return string Html code to show photo. Number of photos shown is saved in this->nbphoto */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function show_photos($modulepart, $sdir, $size=0, $nbmax=0, $nbbyrow=5, $showfilename=0, $showaction=0, $maxHeight=120, $maxWidth=160, $nolink=0, $notitle=0, $usesharelink=0) { global $conf,$user,$langs; diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index e20c023eef3..26227048782 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -62,7 +62,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/format_cards.lib.php'; abstract class CommonStickerGenerator { - public $code; // Code of format + public $code; // Code of format public $format; // Array with informations // protected @@ -103,6 +103,7 @@ abstract class CommonStickerGenerator * @param string $outputdir Output directory for pdf file * @return int 1=OK, 0=KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps abstract function write_file($arrayofrecords,$outputlangs,$srctemplatepath,$outputdir=''); /** @@ -123,6 +124,7 @@ abstract class CommonStickerGenerator * @param int $pt point * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function Set_Char_Size(&$pdf,$pt) { if ($pt > 3) { @@ -144,6 +146,7 @@ abstract class CommonStickerGenerator * @param int $nbPointilles Nb pointilles * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _Pointille(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$nbPointilles=15) { $pdf->SetLineWidth($epaisseur); @@ -185,6 +188,7 @@ abstract class CommonStickerGenerator * @param int $taille Size * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _Croix(&$pdf,$x1=0,$y1=0,$x2=210,$y2=297,$epaisseur=1,$taille=4) { $pdf->SetDrawColor(192,192,192); @@ -216,6 +220,7 @@ abstract class CommonStickerGenerator * @param string $dest to * @return float value value after conversion */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _Convert_Metric($value, $src, $dest) { if ($src != $dest) { @@ -233,6 +238,7 @@ abstract class CommonStickerGenerator * @param int $pt Point * @return int Height chars */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _Get_Height_Chars($pt) { // Tableau de concordance entre la hauteur des caracteres et de l'espacement entre les lignes @@ -251,19 +257,20 @@ abstract class CommonStickerGenerator * @param string $format Format * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _Set_Format(&$pdf, $format) { - $this->_Metric = $format['metric']; - $this->_Avery_Name = $format['name']; - $this->_Avery_Code = $format['code']; + $this->_Metric = $format['metric']; + $this->_Avery_Name = $format['name']; + $this->_Avery_Code = $format['code']; $this->_Margin_Left = $this->_Convert_Metric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc); - $this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc); - $this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc); - $this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc); - $this->_X_Number = $format['NX']; - $this->_Y_Number = $format['NY']; - $this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc); - $this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc); + $this->_Margin_Top = $this->_Convert_Metric($format['marginTop'], $this->_Metric, $this->_Metric_Doc); + $this->_X_Space = $this->_Convert_Metric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc); + $this->_Y_Space = $this->_Convert_Metric($format['SpaceY'], $this->_Metric, $this->_Metric_Doc); + $this->_X_Number = $format['NX']; + $this->_Y_Number = $format['NY']; + $this->_Width = $this->_Convert_Metric($format['width'], $this->_Metric, $this->_Metric_Doc); + $this->_Height = $this->_Convert_Metric($format['height'], $this->_Metric, $this->_Metric_Doc); $this->Set_Char_Size($pdf, $format['font-size']); } } diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 5993729b7ac..7ed51a5ed7c 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -362,6 +362,7 @@ class DiscountAbsolute * @param int $rowidinvoice Invoice id (To use discount as a credit note to reduc payment of invoice) * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function link_to_invoice($rowidline,$rowidinvoice) { // Check parameters @@ -413,6 +414,7 @@ class DiscountAbsolute * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function unlink_invoice() { $sql ="UPDATE ".MAIN_DB_PREFIX."societe_remise_except"; diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 18461beeca3..52d9b47ecdf 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -148,6 +148,7 @@ class DolEditor * @param string $option For ACE editor, set the source language ('html', 'php', 'javascript', ...) * @return void|string */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function Create($noprint=0, $morejs='', $disallowAnyContent=true, $titlecontent='', $option='') { global $conf,$langs; @@ -345,4 +346,3 @@ class DolEditor else print $out; } } - diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 315649f44a6..55ecc77291a 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -134,6 +134,7 @@ class DolGraph * @param float $which_prec Precision * @return boolean */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetPrecisionY($which_prec) { $this->PrecisionY = $which_prec; @@ -146,6 +147,7 @@ class DolGraph * @param float $xi Xi * @return boolean True */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetHorizTickIncrement($xi) { $this->horizTickIncrement = $xi; @@ -158,6 +160,7 @@ class DolGraph * @param float $xt Xt * @return boolean True */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetNumXTicks($xt) { $this->SetNumXTicks = $xt; @@ -170,6 +173,7 @@ class DolGraph * @param float $x Label interval * @return boolean True */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetLabelInterval($x) { $this->labelInterval = $x; @@ -182,6 +186,7 @@ class DolGraph * @param boolean $bool XGrid or not * @return boolean true */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetHideXGrid($bool) { $this->hideXGrid = $bool; @@ -194,6 +199,7 @@ class DolGraph * @param boolean $bool YGrid or not * @return boolean true */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetHideYGrid($bool) { $this->hideYGrid = $bool; @@ -206,6 +212,7 @@ class DolGraph * @param string $label Y label * @return boolean|null True */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetYLabel($label) { $this->YLabel = $label; @@ -217,6 +224,7 @@ class DolGraph * @param int $w Width * @return boolean|null True */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetWidth($w) { $this->width = $w; @@ -228,6 +236,7 @@ class DolGraph * @param string $title Title * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetTitle($title) { $this->title = $title; @@ -240,6 +249,7 @@ class DolGraph * @return void * @see draw_jflot for syntax of data array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetData($data) { $this->data = $data; @@ -251,6 +261,7 @@ class DolGraph * @param array $datacolor Data color array(array(R,G,B),array(R,G,B)...) * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetDataColor($datacolor) { $this->datacolor = $datacolor; @@ -262,6 +273,7 @@ class DolGraph * @param array $type Array with type for each serie. Example: array('pie'), array('lines',...,'bars') * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetType($type) { $this->type = $type; @@ -273,6 +285,7 @@ class DolGraph * @param array $legend Legend. Example: array('seriename1','seriname2',...) * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetLegend($legend) { $this->Legend = $legend; @@ -284,6 +297,7 @@ class DolGraph * @param int $legendwidthmin Min width * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetLegendWidthMin($legendwidthmin) { $this->LegendWidthMin = $legendwidthmin; @@ -295,6 +309,7 @@ class DolGraph * @param int $max Max value * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetMaxValue($max) { $this->MaxValue = $max; @@ -305,6 +320,7 @@ class DolGraph * * @return int Max value */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function GetMaxValue() { return $this->MaxValue; @@ -316,6 +332,7 @@ class DolGraph * @param int $min Min value * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetMinValue($min) { $this->MinValue = $min; @@ -326,6 +343,7 @@ class DolGraph * * @return int Max value */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function GetMinValue() { return $this->MinValue; @@ -337,6 +355,7 @@ class DolGraph * @param int $h Height * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetHeight($h) { $this->height = $h; @@ -348,6 +367,7 @@ class DolGraph * @param string $s Shading * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetShading($s) { $this->SetShading = $s; @@ -359,6 +379,7 @@ class DolGraph * @param string $s Shading * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetCssPrefix($s) { $this->cssprefix = $s; @@ -369,6 +390,7 @@ class DolGraph * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function ResetBgColor() { unset($this->bgcolor); @@ -379,6 +401,7 @@ class DolGraph * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function ResetBgColorGrid() { unset($this->bgcolorgrid); @@ -435,6 +458,7 @@ class DolGraph * @param array $bg_color array(R,G,B) ou 'onglet' ou 'default' * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetBgColor($bg_color = array(255,255,255)) { global $theme_bgcolor,$theme_bgcoloronglet; @@ -463,6 +487,7 @@ class DolGraph * @param array $bg_colorgrid array(R,G,B) ou 'onglet' ou 'default' * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SetBgColorGrid($bg_colorgrid = array(255,255,255)) { global $theme_bgcolor,$theme_bgcoloronglet; @@ -490,6 +515,7 @@ class DolGraph * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function ResetDataColor() { unset($this->datacolor); @@ -500,6 +526,7 @@ class DolGraph * * @return int Max value */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function GetMaxValueInData() { $k = 0; @@ -525,6 +552,7 @@ class DolGraph * * @return int Min value of all data */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function GetMinValueInData() { $k = 0; @@ -550,6 +578,7 @@ class DolGraph * * @return int Max value of all data */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function GetCeilMaxValue() { $max = $this->GetMaxValueInData(); @@ -573,6 +602,7 @@ class DolGraph * * @return double Max value of all data */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function GetFloorMinValue() { $min = $this->GetMinValueInData(); @@ -629,6 +659,7 @@ class DolGraph * @param string $fileurl Url path to show image if saved onto disk * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function draw_artichow($file,$fileurl) { global $artichow_defaultfont; @@ -817,6 +848,7 @@ class DolGraph * @param string $fileurl Url path to show image if saved onto disk. Never used here. * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function draw_jflot($file,$fileurl) { global $artichow_defaultfont; @@ -1098,4 +1130,3 @@ class DolGraph return 0; } } - diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 57f2e42922c..a00da884aba 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -359,6 +359,7 @@ class dolReceiptPrinter extends Escpos * @param string $parameter Printer parameter * @return int 0 if OK; >0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function AddPrinter($name, $type, $profile, $parameter) { global $conf; @@ -384,6 +385,7 @@ class dolReceiptPrinter extends Escpos * @param int $printerid Printer id * @return int 0 if OK; >0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function UpdatePrinter($name, $type, $profile, $parameter, $printerid) { global $conf; @@ -408,6 +410,7 @@ class dolReceiptPrinter extends Escpos * @param int $printerid Printer id * @return int 0 if OK; >0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function DeletePrinter($printerid) { global $conf; @@ -430,6 +433,7 @@ class dolReceiptPrinter extends Escpos * @param int $templateid Template id * @return int 0 if OK; >0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function UpdateTemplate($name, $template, $templateid) { global $conf; @@ -453,6 +457,7 @@ class dolReceiptPrinter extends Escpos * @param int $printerid Printer id * @return int 0 if OK; >0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SendTestToPrinter($printerid) { global $conf; @@ -489,6 +494,7 @@ class dolReceiptPrinter extends Escpos * @param int $printerid Printer id * @return int 0 if OK; >0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function SendToPrinter($object, $templateid, $printerid) { global $conf; @@ -650,6 +656,7 @@ class dolReceiptPrinter extends Escpos * @param int $printerid Printer id * @return int 0 if OK; >0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function InitPrinter($printerid) { global $conf; diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 610925ccc8f..94c9488a085 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -322,6 +322,7 @@ class EmailSenderProfile extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps static function LibStatut($status,$mode=0) { global $langs; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 06a096337ba..d7b16293a11 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -316,6 +316,7 @@ class ExtraFields * @param string $enabled Condition to have the field enabled or not * @return int <=0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function create_label($attrname, $label='', $type='', $pos=0, $size=0, $elementtype='member', $unique=0, $required=0, $param='', $alwayseditable=0, $perms='', $list='-1', $help='', $default='', $computed='',$entity='', $langfile='', $enabled='1') { global $conf,$user; @@ -469,6 +470,7 @@ class ExtraFields * @param string $elementtype Element type ('member', 'product', 'thirdparty', ...) * @return int < 0 if KO, 0 if nothing is done, 1 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function delete_label($attrname, $elementtype='member') { global $conf; @@ -634,6 +636,7 @@ class ExtraFields * @param int $totalizable Is extrafield totalizable on list * @return int <=0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function update_label($attrname,$label,$type,$size,$elementtype,$unique=0,$required=0,$pos=0,$param='',$alwayseditable=0,$perms='',$list='0',$help='',$default='',$computed='',$entity='',$langfile='',$enabled='1', $totalizable=0) { global $conf, $user; @@ -752,6 +755,7 @@ class ExtraFields * @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED. Deprecated. Should not be required. * @return array Array of attributes keys+label for all extra fields. */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_name_optionals_label($elementtype,$forceload=false) { global $conf; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index ad8c98d43c8..9d8a045ba62 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -262,6 +262,7 @@ class Fiscalyear extends CommonObject * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto * @return string Label */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut,$mode=0) { global $langs; diff --git a/htdocs/core/class/genericobject.class.php b/htdocs/core/class/genericobject.class.php index 41d57731c34..993d884c88b 100644 --- a/htdocs/core/class/genericobject.class.php +++ b/htdocs/core/class/genericobject.class.php @@ -24,19 +24,18 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; /** - * Class of a generic business object + * Class of a generic business object */ class GenericObject extends CommonObject { - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - function __construct($db) - { - $this->db=$db; - } + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + function __construct($db) + { + $this->db=$db; + } } - diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 17ff8fdb5a1..0419e2cfc68 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -666,6 +666,7 @@ class Form * @param int $disablefavorites Disable favorites * @return string HTML string with select */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_country($selected='', $htmlname='country_id', $htmloption='', $maxlength=0, $morecss='minwidth300', $usecodeaskey='', $showempty=1, $disablefavorites=0) { global $conf,$langs; @@ -761,6 +762,7 @@ class Form * @param array $events Event options to run on change. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @return string HTML string with select and input */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_incoterms($selected='', $location_incoterms='', $page='', $htmlname='incoterm_id', $htmloption='', $forcecombo=1, $events=array()) { global $conf,$langs; @@ -852,6 +854,7 @@ class Form * @param integer $forceall 1=Force to show products and services in combo list, whatever are activated modules, 0=No force, -1=Force none (and set hidden field to 'service') * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_type_of_lines($selected='',$htmlname='type',$showempty=0,$hidetext=0,$forceall=0) { global $db,$langs,$user,$conf; @@ -901,6 +904,7 @@ class Form * * @return int Nb of lines loaded, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_cache_types_fees() { global $langs; @@ -951,6 +955,7 @@ class Form * @param int $showempty Add an empty field * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_type_fees($selected='',$htmlname='type',$showempty=0) { global $user, $langs; @@ -993,6 +998,7 @@ class Form * @return string Return select box for thirdparty. * @deprecated 3.8 Use select_company instead. For exemple $form->select_thirdparty(GETPOST('socid'),'socid','',0) => $form->select_company(GETPOST('socid'),'socid','',1,0,0,array(),0) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_thirdparty($selected='', $htmlname='socid', $filter='', $limit=20, $ajaxoptions=array(), $forcecombo=0) { return $this->select_thirdparty_list($selected,$htmlname,$filter,1,0,$forcecombo,array(),'',0, $limit); @@ -1017,6 +1023,7 @@ class Form * @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter) * @return string HTML string with select box for thirdparty. */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_company($selected='', $htmlname='socid', $filter='', $showempty='', $showtype=0, $forcecombo=0, $events=array(), $limit=0, $morecss='minwidth100', $moreparam='', $selected_input_value='', $hidelabel=1, $ajaxoptions=array(), $multiple=false) { global $conf,$user,$langs; @@ -1079,6 +1086,7 @@ class Form * @param bool $multiple add [] in the name of element and add 'multiple' attribut * @return string HTML string with */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_thirdparty_list($selected='',$htmlname='socid',$filter='',$showempty='', $showtype=0, $forcecombo=0, $events=array(), $filterkey='', $outputmode=0, $limit=0, $morecss='minwidth100', $moreparam='', $multiple=false) { global $conf,$user,$langs; @@ -1250,6 +1258,7 @@ class Form * @param int $maxvalue Max value for lines that can be selected * @return int Return number of qualifed lines in list */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_remises($selected, $htmlname, $filter, $socid, $maxvalue=0) { global $langs,$conf; @@ -1335,6 +1344,7 @@ class Form * @return int <0 if KO, Nb of contact in list if OK * @deprected You can use selectcontacts directly (warning order of param was changed) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_contacts($socid,$selected='',$htmlname='contactid',$showempty=0,$exclude='',$limitto='',$showfunction=0, $moreclass='', $showsoc=0, $forcecombo=0, $events=array(), $options_only=false, $moreparam='', $htmlid='') { print $this->selectcontacts($socid,$selected,$htmlname,$showempty,$exclude,$limitto,$showfunction, $moreclass, $options_only, $showsoc, $forcecombo, $events, $moreparam, $htmlid); @@ -1489,6 +1499,7 @@ class Form * @deprecated Use select_dolusers instead * @see select_dolusers() */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_users($selected='',$htmlname='userid',$show_empty=0,$exclude=null,$disabled=0,$include='',$enableonly='',$force_entity='0') { print $this->select_dolusers($selected,$htmlname,$show_empty,$exclude,$disabled,$include,$enableonly,$force_entity); @@ -1517,6 +1528,7 @@ class Form * @return string HTML select string * @see select_dolgroups */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $show_every=0, $enableonlytext='', $morecss='', $noactive=0, $outputmode=0, $multiple=false) { global $conf,$user,$langs; @@ -1723,6 +1735,7 @@ class Form * @return string HTML select string * @see select_dolgroups */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_dolusers_forevent($action='', $htmlname='userid', $show_empty=0, $exclude=null, $disabled=0, $include='', $enableonly='', $force_entity='0', $maxlength=0, $showstatus=0, $morefilter='', $showproperties=0, $listofuserid=array(), $listofcontactid=array(), $listofotherid=array()) { global $conf, $user, $langs; @@ -1814,6 +1827,7 @@ class Form * @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_produits($selected='', $htmlname='productid', $filtertype='', $limit=20, $price_level=0, $status=1, $finished=2, $selected_input_value='', $hidelabel=0, $ajaxoptions=array(), $socid=0, $showempty='1', $forcecombo=0, $morecss='', $hidepriceinlabel=0, $warehouseStatus='', $selected_combinations = array()) { global $langs,$conf; @@ -1954,6 +1968,7 @@ class Form * 'warehouseinternal' = select products from warehouses for internal correct/transfer only * @return array Array of keys for json */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_produits_list($selected='',$htmlname='productid',$filtertype='',$limit=20,$price_level=0,$filterkey='',$status=1,$finished=2,$outputmode=0,$socid=0,$showempty='1',$forcecombo=0,$morecss='',$hidepriceinlabel=0, $warehouseStatus='') { global $langs,$conf,$user,$db; @@ -2430,6 +2445,7 @@ class Form * @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_produits_fournisseurs($socid, $selected='', $htmlname='productid', $filtertype='', $filtre='', $ajaxoptions=array(), $hidelabel=0, $alsoproductwithnosupplierprice=0) { global $langs,$conf; @@ -2473,6 +2489,7 @@ class Form * @param int $alsoproductwithnosupplierprice 1=Add also product without supplier prices * @return array Array of keys for json */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_produits_fournisseurs_list($socid,$selected='',$htmlname='productid',$filtertype='',$filtre='',$filterkey='',$statut=-1,$outputmode=0,$limit=100,$alsoproductwithnosupplierprice=0) { global $langs,$conf,$db; @@ -2695,6 +2712,7 @@ class Form * @param int $selected_supplier Pre-selected supplier if more than 1 result * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_product_fourn_price($productid, $htmlname='productfournpriceid', $selected_supplier='') { global $langs,$conf; @@ -2807,6 +2825,7 @@ class Form * @param int $showempty Add an empty field * @return integer|null */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_address($selected, $socid, $htmlname='address_id',$showempty=0) { // On recherche les utilisateurs @@ -2855,6 +2874,7 @@ class Form * * @return int Nb of lines loaded, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_cache_conditions_paiements() { global $langs; @@ -2902,6 +2922,7 @@ class Form * * @return int Nb of lines loaded, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_cache_availability() { global $langs; @@ -3068,6 +3089,7 @@ class Form * * @return int Nb of lines loaded, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_cache_types_paiements() { global $langs; @@ -3128,6 +3150,7 @@ class Form * @param string $morecss Add more CSS on select tag * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_conditions_paiements($selected=0, $htmlname='condid', $filtertype=-1, $addempty=0, $noinfoadmin=0, $morecss='') { global $langs, $user, $conf; @@ -3173,6 +3196,7 @@ class Form * @param string $morecss Add more CSS on select tag * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='') { global $langs,$user; @@ -3446,6 +3470,7 @@ class Form * @param int $showcurrency Show currency in label * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_comptes($selected='',$htmlname='accountid',$statut=0,$filtre='',$useempty=0,$moreattrib='',$showcurrency=0) { global $langs, $conf; @@ -3549,6 +3574,7 @@ class Form * @return string * @see select_categories */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0, $outputmode=0) { global $conf, $langs; @@ -3638,6 +3664,7 @@ class Form * @deprecated * @see formconfirm() */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_confirm($page, $title, $question, $action, $formquestion='', $selectedchoice="", $useajax=0, $height=170, $width=500) { print $this->formconfirm($page, $title, $question, $action, $formquestion, $selectedchoice, $useajax, $height, $width); @@ -3946,6 +3973,7 @@ class Form * @param int $nooutput No print is done. String is returned. * @return string Return html content */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0, $maxlength=20, $forcefocus=0, $nooutput=0) { global $langs; @@ -4000,6 +4028,7 @@ class Form * @param int $addempty Add empty entry * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_conditions_reglement($page, $selected='', $htmlname='cond_reglement_id', $addempty=0) { global $langs; @@ -4033,6 +4062,7 @@ class Form * @param int $addempty Ajoute entree vide * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_availability($page, $selected='', $htmlname='availability', $addempty=0) { global $langs; @@ -4110,6 +4140,7 @@ class Form * @return string * @see select_date */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0) { global $langs; @@ -4149,6 +4180,7 @@ class Form * @param array $include List of users id to include * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_users($page, $selected='', $htmlname='userid', $exclude='', $include='') { global $langs; @@ -4187,6 +4219,7 @@ class Form * @param int $active Active or not, -1 = all * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_modes_reglement($page, $selected='', $htmlname='mode_reglement_id', $filtertype='', $active=1) { global $langs; @@ -4219,6 +4252,7 @@ class Form * @param string $htmlname Name of select html field * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_multicurrency_code($page, $selected='', $htmlname='multicurrency_code') { global $langs; @@ -4247,6 +4281,7 @@ class Form * @param string $currency Currency code to explain the rate * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_multicurrency_rate($page, $rate='', $htmlname='multicurrency_tx', $currency='') { global $langs, $mysoc, $conf; @@ -4294,6 +4329,7 @@ class Form * @param int $discount_type 0 => customer discount, 1 => supplier discount * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_remise_dispo($page, $selected, $htmlname, $socid, $amount, $filter='', $maxvalue=0, $more='', $hidelist=0, $discount_type=0) { global $conf,$langs; @@ -4383,6 +4419,7 @@ class Form * @param string $htmlname Name of HTML select. If 'none', we just show contact link. * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_contacts($page, $societe, $selected='', $htmlname='contactid') { global $langs, $conf; @@ -4431,6 +4468,7 @@ class Form * @param array $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_thirdparty($page, $selected='', $htmlname='socid', $filter='',$showempty=0, $showtype=0, $forcecombo=0, $events=array()) { global $langs; @@ -4467,6 +4505,7 @@ class Form * @param string $htmlname name of HTML select list * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_currency($selected='',$htmlname='currency_id') { print $this->selectCurrency($selected,$htmlname); @@ -4577,6 +4616,7 @@ class Form * @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'") * @return int Nb of loaded lines, 0 if already loaded, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_cache_vatrates($country_code) { global $langs; @@ -4657,6 +4697,7 @@ class Form * @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key * @return string */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_tva($htmlname='tauxtva', $selectedrate='', $societe_vendeuse='', $societe_acheteuse='', $idprod=0, $info_bits=0, $type='', $options_only=false, $mode=0) { global $langs,$conf,$mysoc; @@ -4846,6 +4887,7 @@ class Form * @return string|null Nothing or string if nooutput is 1 * @see form_date, select_month, select_year, select_dayofweek */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='') { global $conf,$langs; @@ -5212,6 +5254,7 @@ class Form * @param int $nooutput Do not output html string but return it * @return string|null */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0) { global $langs; @@ -6406,6 +6449,7 @@ class Form * @param int $useempty Affiche valeur vide dans liste * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0) { @@ -6786,6 +6830,7 @@ class Form * @return string * @see select_dolusers */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_dolgroups($selected='', $htmlname='groupid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity='0', $multiple=false) { global $conf,$user,$langs; @@ -7114,4 +7159,3 @@ class Form return $out; } } - diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 8a0073e0351..64e33cd5023 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -69,6 +69,7 @@ class FormAccounting extends Form * @param int $disabledajaxcombo Disable ajax combo box. * @return string String with HTML select */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_journal($selectid, $htmlname = 'journal', $nature=0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='', $disabledajaxcombo=0) { global $conf,$langs; @@ -148,6 +149,7 @@ class FormAccounting extends Form * @param int $allcountries All countries * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_accounting_category($selected='',$htmlname='account_category', $useempty=0, $maxlen=0, $help=1, $allcountries=0) { global $db,$langs,$user,$mysoc; @@ -223,6 +225,7 @@ class FormAccounting extends Form * @param string $selectedkey Value * @return string HTML edit field */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_bookkeeping_importkey($htmlname = 'importkey', $selectedkey = '') { $options = array(); @@ -260,6 +263,7 @@ class FormAccounting extends Form * @param string $usecache Key to use to store result into a cache. Next call with same key will reuse the cache. * @return string String with HTML select */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='') { global $conf, $langs; @@ -347,6 +351,7 @@ class FormAccounting extends Form * @param string $morecss More css * @return string String with HTML select */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_auxaccount($selectid, $htmlname='account_num_aux', $showempty=0, $morecss='maxwidth200') { @@ -407,6 +412,7 @@ class FormAccounting extends Form * @param string $output_format (html/opton (for option html only)/array (to return options arrays * @return string/array */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function selectyear_accountancy_bookkepping($selected = '', $htmlname = 'yearid', $useempty = 0, $output_format = 'html') { global $conf; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index e4702c52c8c..7fc07ab46ed 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -64,6 +64,7 @@ class FormActions * @param string $morecss More css on select field * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_select_status_action($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100') { global $langs,$conf; @@ -325,6 +326,7 @@ class FormActions * @param int $nooutput 1=No output * @return string */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_type_actions($selected='', $htmlname='actioncode', $excludetype='', $onlyautoornot=0, $hideinfohelp=0, $multiselect=0, $nooutput=0) { global $langs,$user,$form,$conf; diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 16d59197c24..fd9bc3ab3f9 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -65,7 +65,8 @@ class FormAdmin * @param int $showcode Add language code into label * @param int $forcecombo Force to use combo box (so no ajax beautify effect) * @return string Return HTML select string with list of languages - */ + */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_language($selected='', $htmlname='lang_id', $showauto=0, $filter=null, $showempty='', $showwarning=0, $disabled=0, $morecss='', $showcode=0, $forcecombo=0) { global $langs; @@ -135,6 +136,7 @@ class FormAdmin * @param string $moreattrib More attributes on html select tag * @return integer|null */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib='') { global $langs,$conf; @@ -223,6 +225,7 @@ class FormAdmin * @param string[] $dirmenuarray Directories to scan * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_menu_families($selected, $htmlname, $dirmenuarray) { global $langs,$conf; @@ -293,6 +296,7 @@ class FormAdmin * @param string $htmlname Nom de la zone select * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_timezone($selected,$htmlname) { global $langs,$conf; @@ -339,14 +343,15 @@ class FormAdmin /** - * Return html select list with available languages (key='en_US', value='United States' for example) + * Return html select list with available languages (key='en_US', value='United States' for example) * - * @param string $selected Paper format pre-selected - * @param string $htmlname Name of HTML select field - * @param string $filter Value to filter on code - * @param int $showempty Add empty value - * @return string Return HTML output + * @param string $selected Paper format pre-selected + * @param string $htmlname Name of HTML select field + * @param string $filter Value to filter on code + * @param int $showempty Add empty value + * @return string Return HTML output */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_paper_format($selected='',$htmlname='paperformat_id',$filter=0,$showempty=0) { global $langs; diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 206569c192d..6780f01735a 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -111,6 +111,7 @@ class FormBarCode * @param int $useempty Affiche valeur vide dans liste * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_barcode_type($selected='',$htmlname='barcodetype_id',$useempty=0) { global $langs,$conf; @@ -170,6 +171,7 @@ class FormBarCode * @param string $htmlname Nom du formulaire select * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_barcode_type($page, $selected='', $htmlname='barcodetype_id') { global $langs,$conf; @@ -187,4 +189,3 @@ class FormBarCode } } } - diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 8c965207b62..8d64a01eb65 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -41,7 +41,6 @@ class FormCompany */ public $error=''; - /** * Constructor * @@ -62,6 +61,7 @@ class FormCompany * @param string $filter Add a SQL filter to select * @return array Array of types */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function typent_array($mode=0, $filter='') { global $langs,$mysoc; @@ -103,6 +103,7 @@ class FormCompany * @param string $filter Add a SQL filter to select * @return array Array of types d'effectifs */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function effectif_array($mode=0, $filter='') { $effs = array(); @@ -143,6 +144,7 @@ class FormCompany * @param int $empty Add empty value in list * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_prospect_level($page, $selected='', $htmlname='prospect_level_id', $empty=0) { global $user, $langs; @@ -195,6 +197,7 @@ class FormCompany * @param string $htmlname Id of department * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_departement($selected='',$country_codeid=0, $htmlname='state_id') { print $this->select_state($selected,$country_codeid, $htmlname); @@ -213,6 +216,7 @@ class FormCompany * @return string String with HTML select * @see select_country */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_state($selected='',$country_codeid=0, $htmlname='state_id') { global $conf,$langs,$user; @@ -324,6 +328,7 @@ class FormCompany * @param string $htmlname Name of HTML select field * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_region($selected='',$htmlname='region_id') { global $conf,$langs; @@ -388,6 +393,7 @@ class FormCompany * @param string $morecss Add more css on SELECT element * @return string String with HTML select */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_civility($selected='',$htmlname='civility_id',$morecss='maxwidth100') { global $conf,$langs,$user; @@ -447,6 +453,7 @@ class FormCompany * @deprecated Use print xxx->select_juridicalstatus instead * @see select_juridicalstatus() */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_forme_juridique($selected='', $country_codeid=0, $filter='') { print $this->select_juridicalstatus($selected, $country_codeid, $filter); @@ -462,6 +469,7 @@ class FormCompany * @param string $htmlname HTML name of select * @return string String with HTML select */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_juridicalstatus($selected='', $country_codeid=0, $filter='', $htmlname='forme_juridique_code') { global $conf,$langs,$user; @@ -758,6 +766,7 @@ class FormCompany * @param string $morecss More css * @return string */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_ziptown($selected='', $htmlname='zipcode', $fields='', $fieldsize=0, $disableautocomplete=0, $moreattrib='',$morecss='') { global $conf; @@ -787,6 +796,7 @@ class FormCompany * @param string $morecss More css * @return string HTML string with prof id */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_input_id_prof($idprof,$htmlname,$preselected,$country_code,$morecss='maxwidth100onsmartphone quatrevingtpercent') { global $conf,$langs; @@ -835,6 +845,7 @@ class FormCompany * @param string $htmlname HTML select name * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_localtax($local, $selected, $htmlname) { $tax=get_localtax_by_third($local); @@ -868,4 +879,3 @@ class FormCompany } } } - diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index c4710e033cc..474a7125a9d 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -31,7 +31,7 @@ class FormContract * @var DoliDB Database handler. */ public $db; - + /** * @var string Error code (or message) */ @@ -59,6 +59,7 @@ class FormContract * @param int $showempty Show empty line * @return int Nbr of project if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_contract($socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) { global $db,$user,$conf,$langs; @@ -173,11 +174,11 @@ class FormContract * @param string $htmlname Nom de la zone html * @param int $maxlength Maximum length of label * @param int $showempty Show empty line - * @return int Nbr of project if OK, <0 if KO + * @return int Nbr of project if OK, <0 if KO */ function formSelectContract($page, $socid=-1, $selected='', $htmlname='contrattid', $maxlength=16, $showempty=1) { - global $langs; + global $langs; print "\n"; print '
'; @@ -186,5 +187,5 @@ class FormContract $this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty); print ''; print '
'; - } + } } diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 92cbcc52334..fdb56e94e21 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -58,6 +58,7 @@ class FormCron extends Form * @param integer $readonly Select is read only or not * @return string HTML select field */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_typejob($htmlname,$selected=0,$readonly=0) { global $langs; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index bdbc8805218..003235f57c9 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -77,6 +77,7 @@ class FormFile * @param string $sectiondir If upload must be done inside a particular directory (is sectiondir defined, sectionid must not be) * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function form_attach_new_file($url, $title='', $addcancel=0, $sectionid=0, $perm=1, $size=50, $object='', $options='', $useajax=1, $savingdocmask='', $linkfiles=1, $htmlname='formuserfile', $accept='', $sectiondir='') { global $conf,$langs, $hookmanager; @@ -252,6 +253,7 @@ class FormFile * @return int <0 if KO, number of shown files if OK * @deprecated Use print xxx->showdocuments() instead. */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function show_documents($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='') { $this->numoffiles=0; @@ -1008,6 +1010,7 @@ class FormFile * @return int <0 if KO, nb of files shown if OK * @see list_of_autoecmfiles */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0) { global $user, $conf, $langs, $hookmanager; @@ -1394,6 +1397,7 @@ class FormFile * @return int <0 if KO, nb of files shown if OK * @see list_of_documents */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0) { global $user, $conf, $langs, $form; @@ -1830,4 +1834,3 @@ class FormFile return $out; } } - diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php index 62950626e2d..3d5f2c9b640 100644 --- a/htdocs/core/class/html.formintervention.class.php +++ b/htdocs/core/class/html.formintervention.class.php @@ -59,6 +59,7 @@ class FormIntervention * @param int $showempty Show empty line * @return int Nbre of project if OK, <0 if KO */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_interventions($socid=-1, $selected='', $htmlname='interventionid', $maxlength=16, $showempty=1) { global $db,$user,$conf,$langs; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index ac7968cbd52..17a8ec17939 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -141,6 +141,7 @@ class FormMail extends Form * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function clear_attached_files() { global $conf,$user; @@ -165,6 +166,7 @@ class FormMail extends Form * @param string $type Mime type (can be dol_mimetype($file)) * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_attached_files($path, $file='', $type='') { $listofpaths=array(); @@ -195,6 +197,7 @@ class FormMail extends Form * @param string $keytodelete Key in file array (0, 1, 2, ...) * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function remove_attached_files($keytodelete) { $listofpaths=array(); @@ -222,6 +225,7 @@ class FormMail extends Form * * @return array array('paths'=> ,'names'=>, 'mimes'=> ) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_attached_files() { $listofpaths=array(); @@ -244,6 +248,7 @@ class FormMail extends Form * @param string $removefileaction Name of action when removing file attachments * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function show_form($addfileaction='addfile',$removefileaction='removefile') { print $this->get_form($addfileaction,$removefileaction); @@ -259,6 +264,7 @@ class FormMail extends Form * @param string $removefileaction Name of action when removing file attachments * @return string Form to show */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_form($addfileaction='addfile', $removefileaction='removefile') { global $conf, $langs, $user, $hookmanager, $form; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 0c11a378a18..9a4bdc46b75 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -68,7 +68,8 @@ class FormOther * @param int $fk_user Utilisateur créant le modèle * @return void */ - function select_export_model($selected='',$htmlname='exportmodelid',$type='',$useempty=0, $fk_user=null) + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function select_export_model($selected='', $htmlname='exportmodelid', $type='', $useempty=0, $fk_user=null) { $sql = "SELECT rowid, label"; $sql.= " FROM ".MAIN_DB_PREFIX."export_model"; @@ -118,7 +119,8 @@ class FormOther * @param int $useempty Affiche valeur vide dans liste * @return void */ - function select_import_model($selected='',$htmlname='importmodelid',$type='',$useempty=0) + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function select_import_model($selected='', $htmlname='importmodelid', $type='', $useempty=0) { $sql = "SELECT rowid, label"; $sql.= " FROM ".MAIN_DB_PREFIX."import_model"; @@ -165,7 +167,8 @@ class FormOther * @param string $htmlname Name of combo list * @return integer */ - function select_ecotaxes($selected='',$htmlname='ecotaxe_id') + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function select_ecotaxes($selected='', $htmlname='ecotaxe_id') { global $langs; @@ -222,7 +225,8 @@ class FormOther * @param string $country_code Country Code * @return string HTML select list */ - function select_revenue_stamp($selected='',$htmlname='revenuestamp',$country_code='') + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function select_revenue_stamp($selected='', $htmlname='revenuestamp', $country_code='') { global $langs; @@ -283,6 +287,7 @@ class FormOther * @param int $showempty Add also an empty line * @return string HTML select string */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function select_percent($selected=0,$htmlname='percent',$disabled=0,$increment=5,$start=0,$end=100,$showempty=0) { $return = '" */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function build_filterField($TypeField, $NameField, $ValueField) { global $conf,$langs; @@ -523,6 +527,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; @@ -826,6 +831,7 @@ class Export * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function list_export_model() { global $conf, $langs; @@ -875,4 +881,3 @@ class Export } } } - diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 40ca5862df0..2d879a1d17f 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -115,6 +115,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; @@ -645,6 +646,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 @@ -987,6 +989,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; @@ -1019,6 +1022,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; @@ -1052,6 +1056,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; @@ -1258,6 +1263,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(); @@ -1572,6 +1578,7 @@ class FichinterLigne extends CommonObjectLine * * @return int <0 si ko, >0 si ok */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_total() { global $conf; @@ -1674,4 +1681,3 @@ class FichinterLigne extends CommonObjectLine } } } - diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php index af30b6e2da2..66f0c730938 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; @@ -150,6 +151,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)"; @@ -176,6 +178,7 @@ class Fournisseur extends Societe * * @return array Array of suppliers */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function ListArray() { global $conf; @@ -207,4 +210,3 @@ class Fournisseur extends Societe return $arr; } } - diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b2c05eb4253..0f727559507 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -214,7 +214,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; @@ -347,6 +347,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(); @@ -588,6 +589,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; @@ -1050,6 +1052,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; @@ -1112,6 +1115,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; @@ -1966,6 +1970,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"; @@ -2055,6 +2060,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; @@ -2170,6 +2176,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) @@ -2234,6 +2241,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) @@ -2690,6 +2698,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; @@ -2732,6 +2741,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; @@ -2828,7 +2838,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) @@ -3498,4 +3508,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 a10d9dcdd29..4052d17b8b0 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -491,6 +491,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 2f50e9ac137..bf263819ced 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 @@ -681,8 +681,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() { $this->lines = array(); @@ -909,6 +910,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; @@ -1162,6 +1164,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; @@ -1210,6 +1213,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; @@ -1420,6 +1424,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; @@ -1981,9 +1986,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; @@ -2031,6 +2037,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; @@ -2079,6 +2086,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; @@ -2373,7 +2381,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; @@ -2793,10 +2802,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(); @@ -3112,6 +3121,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 55e5feed730..77a31689237 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -110,6 +110,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; @@ -146,6 +147,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; @@ -174,10 +176,10 @@ class ProductFournisseur extends Product } } - if (empty($error)){ + if (empty($error)) { $this->db->commit(); return 1; - }else{ + } else { $this->db->rollback(); return -1; } @@ -210,6 +212,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; @@ -445,6 +448,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; @@ -535,6 +539,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; @@ -633,6 +638,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; @@ -823,6 +829,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 c0b0575e054..19a8705aa42 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -512,6 +512,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; @@ -770,11 +771,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 37f1c1ad4e5..b748e54c8ed 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -938,6 +938,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; @@ -1594,6 +1595,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 7cd7eff5d68..d57e45e5073 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -286,6 +286,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; diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index fdb0bc9bc45..3d3e195b7c9 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -72,6 +72,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; @@ -193,6 +194,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 8b8236e62e9..6252c1948c4 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -233,6 +233,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; @@ -501,6 +502,7 @@ class Livraison extends CommonObject * @param int $sending_id Id of the expedition that serves as a model * @return integer */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function create_from_sending($user, $sending_id) { $expedition = new Expedition($this->db); @@ -546,6 +548,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; @@ -741,6 +744,7 @@ class Livraison extends CommonObject * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_lines() { $this->lines = array(); @@ -812,6 +816,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; @@ -983,6 +988,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 94008db546d..b1bcbc65567 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -339,6 +339,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"; @@ -373,6 +374,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 e2fd9937e78..80341e8df0c 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -372,15 +372,16 @@ class LoanSchedule extends CommonObject } } - /** - * Calculate mensuality - * - * @param double $capital Capital - * @param double $rate rate - * @param int $nbterm nb term - * @return double mensuality - */ - function calc_mens($capital, $rate, $nbterm) + /** + * Calculate mensuality + * + * @param double $capital Capital + * @param double $rate rate + * @param int $nbterm nb term + * @return double mensuality + */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + function calc_mens($capital, $rate, $nbterm) { $result=''; @@ -464,6 +465,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'; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 733d1420838..32b4080187f 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -216,8 +216,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); @@ -257,7 +257,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"; @@ -485,6 +484,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 99a834069a4..c33e015ec79 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -176,6 +176,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"); @@ -218,6 +219,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"); @@ -257,6 +259,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()) @@ -308,6 +311,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; @@ -380,6 +384,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 58d2e1c0fe0..42fa508f36a 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -384,6 +384,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 563192218b8..9b52b3119f6 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 @@ -99,6 +99,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(); @@ -200,4 +201,3 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets return $a; } } - diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 5017e571ec1..728270d6179 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -28,15 +28,11 @@ include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php'; -// The class name should start with a lower case mod for Dolibarr to pick it up -// so we ignore the Squiz.Classes.ValidClassName.NotCamelCaps rule. -// @codingStandardsIgnoreStart /** * Description and activation class for module MyModule */ class modMyModule extends DolibarrModules { - // @codingStandardsIgnoreEnd /** * Constructor. Define names, constants, directories, boxes, permissions * @@ -74,7 +70,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 +85,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 e6b43de045a..b401e0f5c5f 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -476,6 +476,7 @@ class Opensurveysondage extends CommonObject * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_lines() { $ret=array(); @@ -633,6 +634,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 f0d9dd14a4d..c24d5a8214a 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; @@ -303,6 +304,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; @@ -431,4 +433,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 0800eeb6a28..3d10988de85 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; @@ -281,6 +282,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; @@ -363,4 +365,3 @@ class ActionsCardService } } } - diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 99fd6c07ede..4eee6ffe502 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -174,6 +174,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.ScopeNotCamelCaps private function get_parent_path($tab, $final_label='') { @@ -291,6 +292,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); @@ -306,6 +308,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; @@ -490,4 +493,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 57a969cb924..67b69fa9fa3 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -699,13 +699,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; @@ -1456,6 +1457,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; @@ -1494,6 +1496,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"; @@ -1527,6 +1530,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; @@ -2222,6 +2226,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; @@ -2265,6 +2270,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; @@ -2310,6 +2316,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; @@ -2406,6 +2413,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; @@ -2449,6 +2457,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; @@ -2496,6 +2505,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; @@ -2537,6 +2547,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; @@ -2579,6 +2590,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; @@ -2621,6 +2633,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; @@ -2665,6 +2678,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); @@ -2731,6 +2745,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; @@ -2767,6 +2782,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; @@ -2802,6 +2818,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; @@ -2837,6 +2854,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; @@ -2872,6 +2890,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; @@ -2906,6 +2925,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; @@ -2939,6 +2959,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 @@ -2995,6 +3016,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 @@ -3026,6 +3048,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; @@ -3052,6 +3075,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"; @@ -3095,6 +3119,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; @@ -3194,6 +3219,7 @@ class Product extends CommonObject * * @return array Tableau des id de fournisseur */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function list_suppliers() { global $conf; @@ -3228,6 +3254,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(); @@ -3256,6 +3283,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(); @@ -3282,6 +3310,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(); @@ -3333,6 +3362,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; @@ -3388,6 +3418,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(); @@ -3537,6 +3568,7 @@ class Product extends CommonObject * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_sousproduits_arbo() { $parent=array(); @@ -3740,6 +3772,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; @@ -3840,6 +3873,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) @@ -3888,6 +3922,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) @@ -3933,6 +3968,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; @@ -4006,6 +4042,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; @@ -4105,6 +4142,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; @@ -4145,6 +4183,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'; @@ -4182,6 +4221,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'; @@ -4236,6 +4276,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'; @@ -4271,6 +4312,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); @@ -4284,6 +4326,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; @@ -4349,6 +4392,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; @@ -4474,6 +4518,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/productbatch.class.php b/htdocs/product/class/productbatch.class.php index 16bbf8b0718..16ff44e563c 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -400,8 +400,9 @@ class Productbatch extends CommonObject /** * Clean fields (triming) * - * @return void + * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function clean_param() { if (isset($this->fk_product_stock)) $this->fk_product_stock=(int) trim($this->fk_product_stock); diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index 533a36638ce..011a95345db 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -319,6 +319,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; @@ -432,6 +433,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 58cb2d3dc47..75fe5282bd1 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -230,6 +230,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; @@ -320,9 +321,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 @@ -447,6 +445,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; @@ -508,6 +507,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 b06bdfe211e..0d991ace9fe 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -147,7 +147,7 @@ class PriceExpression $this->error='ErrorWrongParameters'; return -1; } - + $sql = "SELECT title, expression"; $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element; $sql.= " WHERE rowid = ".$id; @@ -181,6 +181,7 @@ class PriceExpression * * @return array Array of price expressions */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function list_price_expression() { $sql = "SELECT rowid, title, expression"; @@ -219,6 +220,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"; @@ -319,7 +321,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 2155470484e..943e78d633c 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 @@ -564,6 +564,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; @@ -608,6 +609,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 35643ada26d..a49a75dd3cc 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -78,7 +78,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'), @@ -355,6 +355,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 9054b2691c1..e126bc608a1 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -426,6 +426,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(); @@ -456,6 +457,7 @@ class Entrepot extends CommonObject * * @return Array Array('nb'=>Nb, 'value'=>Value) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function nb_different_products() { $ret=array(); @@ -488,6 +490,7 @@ class Entrepot extends CommonObject * * @return Array Array('nb'=>Nb, 'value'=>Value) */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function nb_products() { $ret=array(); @@ -534,6 +537,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; @@ -658,6 +662,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; @@ -697,9 +702,10 @@ class Entrepot extends CommonObject * Return array of children warehouses ids from $id warehouse (recursive function) * * @param int $id id parent warehouse - * @param array() $TChildWarehouses array which will contain all children (param by reference) - * @return array() $TChildWarehouses array which will contain all children + * @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) { diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 7cb06de918e..ba82e007086 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -865,6 +865,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=''; @@ -1017,6 +1018,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 2a0750bf269..27a9b636cdc 100644 --- a/htdocs/product/stock/class/productlot.class.php +++ b/htdocs/product/stock/class/productlot.class.php @@ -480,6 +480,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; diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index 3fca32b7273..651ee59c22e 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -518,6 +518,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 48e322b3a3e..41ea4ead700 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -491,6 +491,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; @@ -537,6 +538,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(); @@ -921,6 +923,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; @@ -1592,7 +1595,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; @@ -1625,6 +1629,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; @@ -1754,6 +1759,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; @@ -1837,6 +1843,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; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index be72fafc261..a908f3315fd 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -1726,6 +1726,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 @@ -1842,6 +1843,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; @@ -1914,6 +1916,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 b6eaca2143e..13de6e62ccf 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -339,6 +339,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; @@ -487,6 +488,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; @@ -582,6 +584,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; @@ -659,6 +662,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; @@ -734,6 +738,7 @@ class Dolresource extends CommonObject * @deprecated, remplaced by hook getElementResources * @see getElementResources() */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_all_available() { global $conf; @@ -754,6 +759,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; @@ -879,6 +885,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; @@ -967,6 +974,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 3624963818c..6ed6038af81 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -75,6 +75,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; @@ -155,17 +156,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; @@ -209,4 +211,3 @@ 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 47cc420c38d..30b1667afcf 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -78,6 +78,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; @@ -375,6 +376,7 @@ abstract class ActionsCardCommon * @param string $action Action string * @return string HTML output */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function assign_post($action) { global $langs, $mysoc; @@ -391,7 +393,7 @@ abstract class ActionsCardCommon $this->object->town = $_POST["town"]; $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id; $this->object->state_id = $_POST["state_id"]; - $this->object->phone = $_POST["tel"]; + $this->object->phone = $_POST["tel"]; $this->object->fax = $_POST["fax"]; $this->object->email = $_POST["email"]; $this->object->url = $_POST["url"]; diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 324356d1f90..1949f696a86 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; @@ -219,4 +220,3 @@ class ActionsCardCompany extends ActionsCardCommon return restrictedArea($user,$features,$objectid,$dbtablename,$feature2,$dbt_keyfield,$dbt_select); } } - diff --git a/htdocs/societe/canvas/individual/actions_card_individual.class.php b/htdocs/societe/canvas/individual/actions_card_individual.class.php index df5f5eabb91..c662ce2ae6f 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; @@ -135,4 +136,3 @@ class ActionsCardIndividual extends ActionsCardCommon return restrictedArea($user,$features,$objectid,$dbtablename,$feature2,$dbt_keyfield,$dbt_select); } } - diff --git a/htdocs/societe/class/address.class.php b/htdocs/societe/class/address.class.php index bd3cb742d99..1cb4f1c4b65 100644 --- a/htdocs/societe/class/address.class.php +++ b/htdocs/societe/class/address.class.php @@ -237,6 +237,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; @@ -330,6 +331,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 3187ddb7958..9c24aecae85 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 c5800f5c92b..4f3b666049b 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) */ @@ -459,6 +459,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 3eb85ff9365..e6959d90119 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -588,6 +588,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'; @@ -1490,6 +1491,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) @@ -1519,6 +1521,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; @@ -1580,6 +1583,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; @@ -1643,6 +1647,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; @@ -1784,6 +1789,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) @@ -1821,6 +1827,7 @@ 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; @@ -1859,6 +1866,7 @@ 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; @@ -2079,6 +2087,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; @@ -2127,6 +2136,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; @@ -2146,6 +2156,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; @@ -2168,6 +2179,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; @@ -2234,6 +2246,7 @@ class Societe extends CommonObject * * @return array tableau des contacts */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function contact_array() { $contacts = array(); @@ -2266,6 +2279,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'; @@ -2303,6 +2317,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=''; @@ -2340,6 +2355,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'; @@ -2375,6 +2391,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'; @@ -2406,6 +2423,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; @@ -2436,6 +2454,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; @@ -2463,6 +2482,7 @@ class Societe extends CommonObject * * @return int 0=No, 1=Yes */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function codeclient_modifiable() { global $conf; @@ -2497,6 +2517,7 @@ class Societe extends CommonObject * * @return int 0=No, 1=Yes */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function codefournisseur_modifiable() { global $conf; @@ -2535,6 +2556,7 @@ class Societe extends CommonObject * -3 ErrorCustomerCodeAlreadyUsed * -4 ErrorPrefixRequired */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function check_codeclient() { global $conf; @@ -2570,6 +2592,7 @@ class Societe extends CommonObject * -3 ErrorCustomerCodeAlreadyUsed * -4 ErrorPrefixRequired */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function check_codefournisseur() { global $conf; @@ -2604,6 +2627,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; @@ -2652,6 +2676,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) @@ -2680,6 +2705,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; @@ -2719,6 +2745,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; @@ -2777,6 +2804,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; @@ -2926,6 +2954,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; @@ -2975,6 +3004,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; @@ -3076,6 +3106,7 @@ class Societe extends CommonObject * * @return int 0 if success, <> 0 if error */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LoadSupplierCateg() { $this->SupplierCategories = array(); @@ -3104,6 +3135,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) @@ -3129,6 +3161,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; @@ -3403,6 +3436,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; @@ -3424,6 +3458,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); @@ -3449,6 +3484,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; @@ -3501,6 +3537,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); @@ -3665,6 +3702,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 @@ -3718,6 +3756,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 76ecf52bc30..03fa94c0dd0 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -407,6 +407,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 ba652a12d42..a9b44339930 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -215,6 +215,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; @@ -264,6 +265,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; @@ -1079,6 +1081,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; @@ -1508,6 +1511,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)) @@ -1537,6 +1541,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; @@ -1570,6 +1575,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; @@ -1841,6 +1847,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; @@ -1874,6 +1881,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; @@ -2130,8 +2138,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 @@ -2173,8 +2182,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; @@ -2333,6 +2343,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; @@ -3180,6 +3191,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(); diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index e8e637dd87a..fc45740863b 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -1320,6 +1320,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 27c1f15a297..74f5c825e6c 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1176,6 +1176,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; @@ -2452,6 +2453,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 b77706db4f2..ef8a665a978 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1192,6 +1192,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; @@ -1268,6 +1269,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; @@ -1339,6 +1341,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; @@ -1674,6 +1677,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(); @@ -1841,6 +1845,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; @@ -1952,6 +1957,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 "; @@ -1988,6 +1994,7 @@ class User extends CommonObject * * @return integer */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function update_clicktodial() { $this->db->begin(); @@ -2030,6 +2037,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; @@ -2090,6 +2098,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; @@ -2361,6 +2370,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; @@ -2409,6 +2419,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; @@ -2424,6 +2435,7 @@ class User extends CommonObject * * @return array Tableau info des attributs */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_info() { global $conf,$langs; @@ -2695,6 +2707,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 ?) @@ -2730,6 +2743,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"; @@ -2761,6 +2775,7 @@ class User extends CommonObject * * @return int <0 if KO, >0 if OK */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function load_parentof() { global $conf; @@ -2803,6 +2818,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; @@ -2941,6 +2957,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); @@ -3000,6 +3017,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; @@ -3072,6 +3090,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=''; 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 d39416d1ab4..6cb35206fe9 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -813,6 +813,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; @@ -906,6 +907,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; @@ -922,6 +924,7 @@ class UserGroup extends CommonObject * * @return array Tableau info des attributs */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_info() { global $conf,$langs; @@ -1013,4 +1016,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 50467706ab4..3bb8adbd058 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -702,6 +702,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; @@ -1032,4 +1033,3 @@ class Website extends CommonObject } } } - diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 62c034ee68d..82c71ec3f2f 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -479,6 +479,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 31c682bafee..c29adf0861f 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;