move phpcs:ignore

This commit is contained in:
Frédéric FRANCE 2018-09-02 14:01:37 +02:00
parent 04c1a7d4af
commit 2a5c994009
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
9 changed files with 94 additions and 59 deletions

View File

@ -132,6 +132,7 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Function sending an email has the adherent with the text supplied in parameter. * Function sending an email has the adherent with the text supplied in parameter.
* *
@ -147,9 +148,9 @@ class Adherent extends CommonObject
* @param string $errors_to erros to * @param string $errors_to erros to
* @return int <0 if KO, >0 if OK * @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='') 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='')
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
// Detect if message is HTML // Detect if message is HTML
@ -638,6 +639,7 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Update denormalized last subscription date. * Update denormalized last subscription date.
* This function is called when we delete a subscription for example. * This function is called when we delete a subscription for example.
@ -645,9 +647,9 @@ class Adherent extends CommonObject
* @param User $user User making change * @param User $user User making change
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_end_date($user) function update_end_date($user)
{ {
// phpcs:enable
$this->db->begin(); $this->db->begin();
// Search for last subscription id and end date // Search for last subscription id and end date
@ -993,15 +995,16 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Method to load member from its login * Method to load member from its login
* *
* @param string $login login of member * @param string $login login of member
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_login($login) function fetch_login($login)
{ {
// phpcs:enable
global $conf; global $conf;
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
@ -1023,6 +1026,7 @@ class Adherent extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Method to load member from its name * Method to load member from its name
* *
@ -1030,9 +1034,9 @@ class Adherent extends CommonObject
* @param string $lastname Lastname * @param string $lastname Lastname
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_name($firstname,$lastname) function fetch_name($firstname,$lastname)
{ {
// phpcs:enable
global $conf; global $conf;
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
@ -1195,6 +1199,7 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Fonction qui recupere pour un adherent les parametres * Fonction qui recupere pour un adherent les parametres
* first_subscription_date * first_subscription_date
@ -1204,9 +1209,9 @@ class Adherent extends CommonObject
* *
* @return int <0 si KO, >0 si OK * @return int <0 si KO, >0 si OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_subscriptions() function fetch_subscriptions()
{ {
// phpcs:enable
global $langs; global $langs;
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
@ -1750,14 +1755,15 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Function to add member into external tools mailing-list, spip, etc. * Function to add member into external tools mailing-list, spip, etc.
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function add_to_abo() function add_to_abo()
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
@ -1808,14 +1814,15 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Function to delete a member from external tools like mailing-list, spip, etc. * Function to delete a member from external tools like mailing-list, spip, etc.
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function del_to_abo() function del_to_abo()
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
@ -1988,6 +1995,7 @@ class Adherent extends CommonObject
return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode); return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Renvoi le libelle d'un statut donne * Renvoi le libelle d'un statut donne
* *
@ -1997,9 +2005,9 @@ 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 * @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 * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
{ {
// phpcs:enable
global $langs; global $langs;
$langs->load("members"); $langs->load("members");
if ($mode == 0) if ($mode == 0)
@ -2013,7 +2021,7 @@ class Adherent extends CommonObject
} }
if ($statut == 0) return $langs->trans("MemberStatusResiliated"); if ($statut == 0) return $langs->trans("MemberStatusResiliated");
} }
if ($mode == 1) elseif ($mode == 1)
{ {
if ($statut == -1) return $langs->trans("MemberStatusDraftShort"); if ($statut == -1) return $langs->trans("MemberStatusDraftShort");
if ($statut >= 1) if ($statut >= 1)
@ -2024,7 +2032,7 @@ class Adherent extends CommonObject
} }
if ($statut == 0) return $langs->trans("MemberStatusResiliatedShort"); if ($statut == 0) return $langs->trans("MemberStatusResiliatedShort");
} }
if ($mode == 2) elseif ($mode == 2)
{ {
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraftShort"); if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraftShort");
if ($statut >= 1) if ($statut >= 1)
@ -2035,7 +2043,7 @@ class Adherent extends CommonObject
} }
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliatedShort"); if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliatedShort");
} }
if ($mode == 3) elseif ($mode == 3)
{ {
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0'); if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0');
if ($statut >= 1) if ($statut >= 1)
@ -2046,7 +2054,7 @@ class Adherent extends CommonObject
} }
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5'); if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5');
} }
if ($mode == 4) elseif ($mode == 4)
{ {
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraft"); if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraft");
if ($statut >= 1) if ($statut >= 1)
@ -2057,7 +2065,7 @@ class Adherent extends CommonObject
} }
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliated"); if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliated");
} }
if ($mode == 5) elseif ($mode == 5)
{ {
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0'); if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
if ($statut >= 1) if ($statut >= 1)
@ -2068,7 +2076,7 @@ class Adherent extends CommonObject
} }
if ($statut == 0) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusResiliated").' </span>'.img_picto($langs->trans('MemberStatusResiliated'),'statut5'); if ($statut == 0) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusResiliated").' </span>'.img_picto($langs->trans('MemberStatusResiliated'),'statut5');
} }
if ($mode == 6) elseif ($mode == 6)
{ {
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0'); if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
if ($statut >= 1) if ($statut >= 1)
@ -2082,14 +2090,15 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Charge indicateurs this->nb de tableau de bord * Charge indicateurs this->nb de tableau de bord
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_state_board() function load_state_board()
{ {
// phpcs:enable
global $conf; global $conf;
$this->nb=array(); $this->nb=array();
@ -2117,15 +2126,16 @@ class Adherent extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Load indicators for dashboard (this->nbtodo and this->nbtodolate) * Load indicators for dashboard (this->nbtodo and this->nbtodolate)
* *
* @param User $user Objet user * @param User $user Objet user
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function load_board($user) function load_board($user)
{ {
// phpcs:enable
global $conf, $langs; global $conf, $langs;
if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe
@ -2260,6 +2270,7 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
* *
@ -2269,9 +2280,9 @@ class Adherent extends CommonObject
* 2=Return key only (uid=qqq) * 2=Return key only (uid=qqq)
* @return string DN * @return string DN
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0) function _load_ldap_dn($info,$mode=0)
{ {
// phpcs:enable
global $conf; global $conf;
$dn=''; $dn='';
if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS."=".$info[$conf->global->LDAP_KEY_MEMBERS].",".$conf->global->LDAP_MEMBER_DN; if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS."=".$info[$conf->global->LDAP_KEY_MEMBERS].",".$conf->global->LDAP_MEMBER_DN;
@ -2281,14 +2292,15 @@ class Adherent extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Initialise tableau info (tableau des attributs LDAP) * Initialise tableau info (tableau des attributs LDAP)
* *
* @return array Tableau info des attributs * @return array Tableau info des attributs
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info() function _load_ldap_info()
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
$info=array(); $info=array();

View File

@ -36,12 +36,12 @@ class AdherentType extends CommonObject
* @var string Name of table without prefix where object is stored * @var string Name of table without prefix where object is stored
*/ */
public $table_element = 'adherent_type'; public $table_element = 'adherent_type';
/** /**
* @var string ID to identify managed object * @var string ID to identify managed object
*/ */
public $element = 'adherent_type'; public $element = 'adherent_type';
public $picto = 'group'; public $picto = 'group';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
@ -290,14 +290,15 @@ class AdherentType extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of members' type * Return list of members' type
* *
* @return array List of types of members * @return array List of types of members
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function liste_array() function liste_array()
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
$adherenttypes = array(); $adherenttypes = array();
@ -422,6 +423,7 @@ class AdherentType extends CommonObject
return ''; return '';
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
* *
@ -431,9 +433,9 @@ class AdherentType extends CommonObject
* 2=Return key only (uid=qqq) * 2=Return key only (uid=qqq)
* @return string DN * @return string DN
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_dn($info,$mode=0) function _load_ldap_dn($info,$mode=0)
{ {
// phpcs:enable
global $conf; global $conf;
$dn=''; $dn='';
if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS_TYPES."=".$info[$conf->global->LDAP_KEY_MEMBERS_TYPES].",".$conf->global->LDAP_MEMBER_TYPE_DN; if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS_TYPES."=".$info[$conf->global->LDAP_KEY_MEMBERS_TYPES].",".$conf->global->LDAP_MEMBER_TYPE_DN;
@ -443,14 +445,15 @@ class AdherentType extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Initialize the info array (array of LDAP values) that will be used to call LDAP functions * Initialize the info array (array of LDAP values) that will be used to call LDAP functions
* *
* @return array Tableau info des attributs * @return array Tableau info des attributs
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function _load_ldap_info() function _load_ldap_info()
{ {
// phpcs:enable
global $conf,$langs; global $conf,$langs;
$info=array(); $info=array();

View File

@ -36,12 +36,12 @@ class Subscription extends CommonObject
* @var string ID to identify managed object * @var string ID to identify managed object
*/ */
public $element='subscription'; public $element='subscription';
/** /**
* @var string Name of table without prefix where object is stored * @var string Name of table without prefix where object is stored
*/ */
public $table_element='subscription'; public $table_element='subscription';
public $picto='payment'; public $picto='payment';
var $datec; // Date creation var $datec; // Date creation
@ -363,15 +363,16 @@ class Subscription extends CommonObject
return ''; return '';
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Renvoi le libelle d'un statut donne * Renvoi le libelle d'un statut donne
* *
* @param int $statut Id statut * @param int $statut Id statut
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut) function LibStatut($statut)
{ {
// phpcs:enable
global $langs; global $langs;
$langs->load("members"); $langs->load("members");
return ''; return '';

View File

@ -163,15 +163,16 @@ class Dolistore
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return tree of Dolistore categories. $this->categories must have been loaded before. * Return tree of Dolistore categories. $this->categories must have been loaded before.
* *
* @param int $parent Id of parent category * @param int $parent Id of parent category
* @return string * @return string
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_categories($parent = 0) function get_categories($parent = 0)
{ {
// phpcs:enable
if (!isset($this->categories)) die('not possible'); if (!isset($this->categories)) die('not possible');
if ($parent != 0) { if ($parent != 0) {
$html = '<ul>'; $html = '<ul>';
@ -211,14 +212,15 @@ class Dolistore
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of product formated for output * Return list of product formated for output
* *
* @return string HTML output * @return string HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_products() function get_products()
{ {
// phpcs:enable
global $langs, $conf; global $langs, $conf;
$html = ""; $html = "";
$parity = "pair"; $parity = "pair";
@ -293,38 +295,41 @@ class Dolistore
return $html; return $html;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* get previous link * get previous link
* *
* @param string $text symbol previous * @param string $text symbol previous
* @return string html previous link * @return string html previous link
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_previous_link($text = '<<') function get_previous_link($text = '<<')
{ {
// phpcs:enable
return '<a href="'.$this->get_previous_url().'" class="button">'.$text.'</a>'; return '<a href="'.$this->get_previous_url().'" class="button">'.$text.'</a>';
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* get next link * get next link
* *
* @param string $text symbol next * @param string $text symbol next
* @return string html next link * @return string html next link
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_next_link($text = '>>') function get_next_link($text = '>>')
{ {
// phpcs:enable
return '<a href="'.$this->get_next_url().'" class="button">'.$text.'</a>'; return '<a href="'.$this->get_next_url().'" class="button">'.$text.'</a>';
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* get previous url * get previous url
* *
* @return string previous url * @return string previous url
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_previous_url()
function get_previous_url()
{ {
// phpcs:enable
$param_array = array(); $param_array = array();
if ($this->start < $this->per_page) { if ($this->start < $this->per_page) {
$sub = 0; $sub = 0;
@ -340,14 +345,15 @@ class Dolistore
return $this->url."&".$param; return $this->url."&".$param;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* get next url * get next url
* *
* @return string next url * @return string next url
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function get_next_url() function get_next_url()
{ {
// phpcs:enable
$param_array = array(); $param_array = array();
if (count($this->products) < $this->per_page) { if (count($this->products) < $this->per_page) {
$add = 0; $add = 0;
@ -363,6 +369,7 @@ class Dolistore
return $this->url."&".$param; return $this->url."&".$param;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* version compare * version compare
* *
@ -370,9 +377,9 @@ class Dolistore
* @param string $v2 version 2 * @param string $v2 version 2
* @return int result of compare * @return int result of compare
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function version_compare($v1, $v2) function version_compare($v1, $v2)
{ {
// phpcs:enable
$v1 = explode('.', $v1); $v1 = explode('.', $v1);
$v2 = explode('.', $v2); $v2 = explode('.', $v2);
$ret = 0; $ret = 0;

View File

@ -344,15 +344,16 @@ class Localtax extends CommonObject
return $solde; return $solde;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Total de la localtax des factures emises par la societe. * Total de la localtax des factures emises par la societe.
* *
* @param int $year Year * @param int $year Year
* @return int ??? * @return int ???
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_collectee($year = 0) function localtax_sum_collectee($year = 0)
{ {
// phpcs:enable
$sql = "SELECT sum(f.localtax) as amount"; $sql = "SELECT sum(f.localtax) as amount";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1";
if ($year) if ($year)
@ -383,15 +384,16 @@ class Localtax extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* localtax payed * localtax payed
* *
* @param int $year Year * @param int $year Year
* @return int ??? * @return int ???
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_payee($year = 0) function localtax_sum_payee($year = 0)
{ {
// phpcs:enable
$sql = "SELECT sum(f.total_localtax) as total_localtax"; $sql = "SELECT sum(f.total_localtax) as total_localtax";
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
@ -424,6 +426,7 @@ class Localtax extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* localtax payed * localtax payed
* Total de la localtax payed * Total de la localtax payed
@ -431,9 +434,9 @@ class Localtax extends CommonObject
* @param int $year Year * @param int $year Year
* @return int ??? * @return int ???
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function localtax_sum_reglee($year = 0) function localtax_sum_reglee($year = 0)
{ {
// phpcs:enable
$sql = "SELECT sum(f.amount) as amount"; $sql = "SELECT sum(f.amount) as amount";
$sql .= " FROM ".MAIN_DB_PREFIX."localtax as f"; $sql .= " FROM ".MAIN_DB_PREFIX."localtax as f";
@ -579,15 +582,16 @@ class Localtax extends CommonObject
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Update the link betwen localtax payment and the line into llx_bank * Update the link betwen localtax payment and the line into llx_bank
* *
* @param int $id Id bank account * @param int $id Id bank account
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function update_fk_bank($id) function update_fk_bank($id)
{ {
// phpcs:enable
$sql = 'UPDATE '.MAIN_DB_PREFIX.'localtax SET fk_bank = '.$id; $sql = 'UPDATE '.MAIN_DB_PREFIX.'localtax SET fk_bank = '.$id;
$sql.= ' WHERE rowid = '.$this->id; $sql.= ' WHERE rowid = '.$this->id;
$result = $this->db->query($sql); $result = $this->db->query($sql);
@ -639,6 +643,7 @@ class Localtax extends CommonObject
return $this->LibStatut($this->statut,$mode); return $this->LibStatut($this->statut,$mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Renvoi le libelle d'un statut donne * Renvoi le libelle d'un statut donne
* *
@ -646,9 +651,9 @@ class Localtax extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @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
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($status, $mode=0) function LibStatut($status, $mode=0)
{ {
// phpcs:enable
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
return ''; return '';

View File

@ -36,12 +36,12 @@ class Holiday extends CommonObject
* @var string ID to identify managed object * @var string ID to identify managed object
*/ */
public $element='holiday'; public $element='holiday';
/** /**
* @var string Name of table without prefix where object is stored * @var string Name of table without prefix where object is stored
*/ */
public $table_element='holiday'; public $table_element='holiday';
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $fk_element = 'fk_holiday'; var $fk_element = 'fk_holiday';
public $picto = 'holiday'; public $picto = 'holiday';
@ -921,6 +921,7 @@ class Holiday extends CommonObject
return $this->LibStatut($this->statut, $mode, $this->date_debut); return $this->LibStatut($this->statut, $mode, $this->date_debut);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Returns the label of a statut * Returns the label of a statut
* *
@ -929,9 +930,9 @@ class Holiday extends CommonObject
* @param date $startdate Date holiday should start * @param date $startdate Date holiday should start
* @return string Label * @return string Label
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LibStatut($statut, $mode=0, $startdate='') function LibStatut($statut, $mode=0, $startdate='')
{ {
// phpcs:enable
global $langs; global $langs;
if ($mode == 0) if ($mode == 0)
@ -942,7 +943,7 @@ class Holiday extends CommonObject
if ($statut == 4) return $langs->trans('CancelCP'); if ($statut == 4) return $langs->trans('CancelCP');
if ($statut == 5) return $langs->trans('RefuseCP'); if ($statut == 5) return $langs->trans('RefuseCP');
} }
if ($mode == 2) elseif ($mode == 2)
{ {
$pictoapproved='statut6'; $pictoapproved='statut6';
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
@ -952,7 +953,7 @@ class Holiday extends CommonObject
if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5').' '.$langs->trans('CancelCP'); if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5').' '.$langs->trans('CancelCP');
if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5').' '.$langs->trans('RefuseCP'); if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5').' '.$langs->trans('RefuseCP');
} }
if ($mode == 3) elseif ($mode == 3)
{ {
$pictoapproved='statut6'; $pictoapproved='statut6';
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
@ -962,7 +963,7 @@ class Holiday extends CommonObject
if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5'); if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5');
if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5'); if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5');
} }
if ($mode == 5) elseif ($mode == 5)
{ {
$pictoapproved='statut6'; $pictoapproved='statut6';
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
@ -972,7 +973,7 @@ class Holiday extends CommonObject
if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5'); if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5');
if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5'); if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5');
} }
if ($mode == 6) elseif ($mode == 6)
{ {
$pictoapproved='statut6'; $pictoapproved='statut6';
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4'; if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
@ -1580,15 +1581,16 @@ class Holiday extends CommonObject
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Return list of people with permission to validate leave requests. * Return list of people with permission to validate leave requests.
* Search for permission "approve leave requests" * Search for permission "approve leave requests"
* *
* @return array Array of user ids * @return array Array of user ids
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function fetch_users_approver_holiday() function fetch_users_approver_holiday()
{ {
// phpcs:enable
$users_validator=array(); $users_validator=array();
$sql = "SELECT DISTINCT ur.fk_user"; $sql = "SELECT DISTINCT ur.fk_user";

View File

@ -32,12 +32,12 @@ class Establishment extends CommonObject
* @var string ID to identify managed object * @var string ID to identify managed object
*/ */
public $element='establishment'; public $element='establishment';
/** /**
* @var string Name of table without prefix where object is stored * @var string Name of table without prefix where object is stored
*/ */
public $table_element='establishment'; public $table_element='establishment';
public $table_element_line = ''; public $table_element_line = '';
public $fk_element = 'fk_establishment'; public $fk_element = 'fk_establishment';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
@ -265,6 +265,7 @@ class Establishment extends CommonObject
return $this->LibStatut($this->status,$mode); return $this->LibStatut($this->status,$mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Give a label from a status * Give a label from a status
* *
@ -272,35 +273,35 @@ 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 * @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($status,$mode=0) function LibStatut($status,$mode=0)
{ {
// phpcs:enable
global $langs; global $langs;
if ($mode == 0) if ($mode == 0)
{ {
return $langs->trans($this->statuts[$status]); return $langs->trans($this->statuts[$status]);
} }
if ($mode == 1) elseif ($mode == 1)
{ {
return $langs->trans($this->statuts_short[$status]); return $langs->trans($this->statuts_short[$status]);
} }
if ($mode == 2) elseif ($mode == 2)
{ {
if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]),'statut5').' '.$langs->trans($this->statuts_short[$status]); if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]),'statut5').' '.$langs->trans($this->statuts_short[$status]);
if ($status==1) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts_short[$status]); if ($status==1) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts_short[$status]);
} }
if ($mode == 3) elseif ($mode == 3)
{ {
if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut5'); if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut5');
if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4'); if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4');
} }
if ($mode == 4) elseif ($mode == 4)
{ {
if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut5').' '.$langs->trans($this->statuts[$status]); if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut5').' '.$langs->trans($this->statuts[$status]);
if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts[$status]); if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts[$status]);
} }
if ($mode == 5) elseif ($mode == 5)
{ {
if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5'); if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5');
if ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut4'); if ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut4');

View File

@ -64,6 +64,7 @@ class ActionsCardProduct
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Assign custom values for canvas (for example into this->tpl to be used by templates) * Assign custom values for canvas (for example into this->tpl to be used by templates)
* *
@ -72,9 +73,9 @@ class ActionsCardProduct
* @param string $ref Ref of object * @param string $ref Ref of object
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id=0, $ref='') function assign_values(&$action, $id=0, $ref='')
{ {
// phpcs:enable
global $limit, $offset, $sortfield, $sortorder; global $limit, $offset, $sortfield, $sortorder;
global $conf, $langs, $user, $mysoc, $canvas; global $conf, $langs, $user, $mysoc, $canvas;
global $form, $formproduct; global $form, $formproduct;
@ -295,6 +296,7 @@ class ActionsCardProduct
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Fetch datas list and save into ->list_datas * Fetch datas list and save into ->list_datas
* *
@ -304,9 +306,9 @@ class ActionsCardProduct
* @param string $sortorder Sort order ('ASC' or 'DESC') * @param string $sortorder Sort order ('ASC' or 'DESC')
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LoadListDatas($limit, $offset, $sortfield, $sortorder) function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{ {
// phpcs:enable
global $conf, $langs; global $conf, $langs;
$this->getFieldList(); $this->getFieldList();

View File

@ -63,6 +63,7 @@ class ActionsCardService
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Assign custom values for canvas (for example into this->tpl to be used by templates) * Assign custom values for canvas (for example into this->tpl to be used by templates)
* *
@ -71,9 +72,9 @@ class ActionsCardService
* @param string $ref Ref of object * @param string $ref Ref of object
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function assign_values(&$action, $id=0, $ref='') function assign_values(&$action, $id=0, $ref='')
{ {
// phpcs:enable
global $limit, $offset, $sortfield, $sortorder; global $limit, $offset, $sortfield, $sortorder;
global $conf, $langs, $user, $mysoc, $canvas; global $conf, $langs, $user, $mysoc, $canvas;
global $form, $formproduct; global $form, $formproduct;
@ -273,6 +274,7 @@ class ActionsCardService
} }
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Fetch datas list and save into ->list_datas * Fetch datas list and save into ->list_datas
* *
@ -282,9 +284,9 @@ class ActionsCardService
* @param string $sortorder Sort order ('ASC' or 'DESC') * @param string $sortorder Sort order ('ASC' or 'DESC')
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
function LoadListDatas($limit, $offset, $sortfield, $sortorder) function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{ {
// phpcs:enable
global $conf; global $conf;
global $search_categ,$sall,$sref,$search_barcode,$snom,$catid; global $search_categ,$sall,$sref,$search_barcode,$snom,$catid;