diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index b8ddcebf18c48..79b16bdbf55ce 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -238,9 +238,9 @@ - + diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 3d1445b0ccebb..123b7f6157db8 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -64,7 +64,7 @@ function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey) // Translate //ini_set('default_charset','UTF-8'); ini_set('default_charset',$this->_outputpagecode); - $this->parse_refLangTranslationFiles(); + $this->parseRefLangTranslationFiles(); } /** @@ -72,8 +72,7 @@ function __construct($_destlang,$_refLang,$_langDir,$_limittofile,$_apikey) * * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - private function parse_refLangTranslationFiles() + private function parseRefLangTranslationFiles() { $files = $this->getTranslationFilesArray($this->_refLang); diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index ba6f53e37851a..4929e118a3bbf 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -535,15 +535,16 @@ function info($id) } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Account deactivated * * @param int $id Id * @return int <0 if KO, >0 if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function account_desactivate($id) { + // phpcs:enable $result = $this->checkUsage(); if ($result > 0) { @@ -569,15 +570,16 @@ function account_desactivate($id) } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Account activated * * @param int $id Id * @return int <0 if KO, >0 if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function account_activate($id) { + // phpcs:enable $this->db->begin(); $sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account "; @@ -608,6 +610,7 @@ function getLibStatut($mode=0) return $this->LibStatut($this->status,$mode); } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Renvoi le libelle d'un statut donne * @@ -615,9 +618,9 @@ function getLibStatut($mode=0) * @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) { + // phpcs:enable global $langs; $langs->loadLangs(array("users")); @@ -627,27 +630,27 @@ function LibStatut($statut,$mode=0) if ($statut == 1) return $langs->trans('Enabled'); if ($statut == 0) return $langs->trans('Disabled'); } - if ($mode == 1) + elseif ($mode == 1) { if ($statut == 1) return $langs->trans('Enabled'); if ($statut == 0) return $langs->trans('Disabled'); } - if ($mode == 2) + elseif ($mode == 2) { if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); } - if ($mode == 3) + elseif ($mode == 3) { if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4'); if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5'); } - if ($mode == 4) + elseif ($mode == 4) { if ($statut == 1) return img_picto($langs->trans('Enabled'),'statut4').' '.$langs->trans('Enabled'); if ($statut == 0) return img_picto($langs->trans('Disabled'),'statut5').' '.$langs->trans('Disabled'); } - if ($mode == 5) + elseif ($mode == 5) { if ($statut == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'),'statut4'); if ($statut == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'),'statut5'); diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index dc34d0adf40d5..058bdb3dddb43 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -271,6 +271,7 @@ function getLibType($mode=0) return $this->LibType($this->nature,$mode); } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return type of an accounting journal * @@ -278,9 +279,9 @@ function getLibType($mode=0) * @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) { + // phpcs:enable global $langs; $langs->loadLangs(array("accountancy")); diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 86835eb2c2608..5d9572da684c7 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1548,15 +1548,16 @@ function fetchAllPerMvt($piecenum, $mode='') return 1; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Export bookkeping * * @param string $model Model * @return int Result */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function export_bookkeping($model = 'ebp') { + // phpcs:enable global $conf; $sql = "SELECT rowid, doc_date, doc_type,"; @@ -1701,11 +1702,12 @@ public function transformTransaction($direction=0,$piece_num='') */ } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return list of accounts with label by chart of accounts * - * @param string $selectid Preselected chart of accounts - * @param string $htmlname Name of field in html form + * @param string $selectid Preselected chart of accounts + * @param string $htmlname Name of field in html form * @param int $showempty Add an empty field * @param array $event Event options * @param int $select_in Value is a aa.rowid (0 default) or aa.account_number (1) @@ -1713,9 +1715,9 @@ public function transformTransaction($direction=0,$piece_num='') * @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 = '') { + // phpcs:enable global $conf; require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; @@ -1772,15 +1774,16 @@ function select_account($selectid, $htmlname = 'account', $showempty = 0, $event return $out; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Description of a root accounting account * * @param string $account Accounting account * @return string Root account */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_compte_racine($account = null) { + // phpcs:enable global $conf; $pcgver = $conf->global->CHARTOFACCOUNTS; @@ -1813,15 +1816,16 @@ function get_compte_racine($account = null) } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Description of accounting account * * @param string $account Accounting account * @return string Account desc */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_compte_desc($account = null) { + // phpcs:enable global $conf; $pcgver = $conf->global->CHARTOFACCOUNTS; diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index fe91fc744363c..b84534af37a62 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -75,16 +75,17 @@ function getObject($id) //} } - /** + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + /** * Set content of ->tpl array, to use into template * * @param string $action Type of action * @param int $id Id * @return string HTML output */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function assign_values(&$action, $id) { + // phpcs:enable global $conf, $langs, $user, $canvas; global $form, $formcompany, $objsoc; @@ -233,14 +234,15 @@ function assign_values(&$action, $id) } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Assign POST values into object * * @return string HTML output */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function assign_post() { + // phpcs:enable global $langs, $mysoc; $this->object->old_name = $_POST["old_name"]; diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index c5d6a89a15202..be7af41e894b8 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -67,6 +67,7 @@ private function getTitle($action) return $out; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Assign custom values for canvas * @@ -74,9 +75,9 @@ private function getTitle($action) * @param int $id Id * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function assign_values(&$action, $id) { + // phpcs:enable global $limit, $offset, $sortfield, $sortorder; global $conf, $db, $langs, $user; global $form; @@ -121,6 +122,7 @@ function assign_values(&$action, $id) } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Fetch datas list and save into ->list_datas * @@ -130,9 +132,9 @@ function assign_values(&$action, $id) * @param string $sortorder Sort order ('ASC' or 'DESC') * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LoadListDatas($limit, $offset, $sortfield, $sortorder) { + // phpcs:enable global $conf, $langs; //$this->getFieldList(); diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 7a4df8ec3901c..90f20ca323d39 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -138,6 +138,7 @@ function __construct($db) } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Function sending an email has the adherent with the text supplied in parameter. * @@ -153,9 +154,9 @@ function __construct($db) * @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='') { + // phpcs:enable global $conf,$langs; // Detect if message is HTML @@ -644,6 +645,7 @@ function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdp } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Update denormalized last subscription date. * This function is called when we delete a subscription for example. @@ -651,9 +653,9 @@ function update($user,$notrigger=0,$nosyncuser=0,$nosyncuserpass=0,$nosyncthirdp * @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) { + // phpcs:enable $this->db->begin(); // Search for last subscription id and end date @@ -999,15 +1001,16 @@ function setThirdPartyId($thirdpartyid) } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Method to load member from its login * * @param string $login login of member * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_login($login) { + // phpcs:enable global $conf; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; @@ -1029,6 +1032,7 @@ function fetch_login($login) } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Method to load member from its name * @@ -1036,9 +1040,9 @@ function fetch_login($login) * @param string $lastname Lastname * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_name($firstname,$lastname) { + // phpcs:enable global $conf; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; @@ -1201,6 +1205,7 @@ function fetch($rowid,$ref='',$fk_soc='',$ref_ext='',$fetch_optionals=true,$fetc } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Fonction qui recupere pour un adherent les parametres * first_subscription_date @@ -1210,9 +1215,9 @@ function fetch($rowid,$ref='',$fk_soc='',$ref_ext='',$fetch_optionals=true,$fetc * * @return int <0 si KO, >0 si OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function fetch_subscriptions() { + // phpcs:enable global $langs; require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; @@ -1756,14 +1761,15 @@ function resiliate($user) } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Function to add member into external tools mailing-list, spip, etc. * * @return int <0 if KO, >0 if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function add_to_abo() { + // phpcs:enable global $conf,$langs; include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; @@ -1814,14 +1820,15 @@ function add_to_abo() } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Function to delete a member from external tools like mailing-list, spip, etc. * * @return int <0 if KO, >0 if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function del_to_abo() { + // phpcs:enable global $conf,$langs; include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; @@ -1994,6 +2001,7 @@ function getLibStatut($mode=0) return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode); } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Renvoi le libelle d'un statut donne * @@ -2003,9 +2011,9 @@ function getLibStatut($mode=0) * @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) { + // phpcs:enable global $langs; $langs->load("members"); if ($mode == 0) @@ -2019,7 +2027,7 @@ function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) } if ($statut == 0) return $langs->trans("MemberStatusResiliated"); } - if ($mode == 1) + elseif ($mode == 1) { if ($statut == -1) return $langs->trans("MemberStatusDraftShort"); if ($statut >= 1) @@ -2030,7 +2038,7 @@ function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) } 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) @@ -2041,7 +2049,7 @@ function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) } 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) @@ -2052,7 +2060,7 @@ function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) } 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) @@ -2063,7 +2071,7 @@ function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) } 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) @@ -2074,7 +2082,7 @@ function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) } if ($statut == 0) return ''.$langs->trans("MemberStatusResiliated").' '.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) @@ -2088,14 +2096,15 @@ function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0) } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Charge indicateurs this->nb de tableau de bord * * @return int <0 if KO, >0 if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_state_board() { + // phpcs:enable global $conf; $this->nb=array(); @@ -2123,15 +2132,16 @@ function load_state_board() } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @param User $user Objet user * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function load_board($user) { + // phpcs:enable global $conf, $langs; if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe @@ -2266,6 +2276,7 @@ function initAsSpecimen() } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * @@ -2275,9 +2286,9 @@ function initAsSpecimen() * 2=Return key only (uid=qqq) * @return string DN */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_dn($info,$mode=0) { + // phpcs:enable global $conf; $dn=''; if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS."=".$info[$conf->global->LDAP_KEY_MEMBERS].",".$conf->global->LDAP_MEMBER_DN; @@ -2287,14 +2298,15 @@ function _load_ldap_dn($info,$mode=0) } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Initialise tableau info (tableau des attributs LDAP) * * @return array Tableau info des attributs */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_info() { + // phpcs:enable global $conf,$langs; $info=array(); diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index ba2f2306092c9..a9d7fd7ead3eb 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -300,14 +300,15 @@ function fetch($rowid) } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return list of members' type * * @return array List of types of members */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function liste_array() { + // phpcs:enable global $conf,$langs; $adherenttypes = array(); @@ -432,6 +433,7 @@ function getLibStatut() return ''; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * @@ -441,9 +443,9 @@ function getLibStatut() * 2=Return key only (uid=qqq) * @return string DN */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_dn($info,$mode=0) { + // phpcs:enable global $conf; $dn=''; if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS_TYPES."=".$info[$conf->global->LDAP_KEY_MEMBERS_TYPES].",".$conf->global->LDAP_MEMBER_TYPE_DN; @@ -453,14 +455,15 @@ function _load_ldap_dn($info,$mode=0) } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Initialize the info array (array of LDAP values) that will be used to call LDAP functions * * @return array Tableau info des attributs */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function _load_ldap_info() { + // phpcs:enable global $conf,$langs; $info=array(); diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 85b024a1582bf..1c64560cf79a8 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -366,15 +366,16 @@ function getLibStatut($mode=0) return ''; } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Renvoi le libelle d'un statut donne * * @param int $statut Id statut * @return string Label */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function LibStatut($statut) { + // phpcs:enable global $langs; $langs->load("members"); return ''; diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index c4dae079c3c35..859b9140f8697 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -163,15 +163,16 @@ function getRemoteData($options = array('start' => 0, 'end' => 10, 'per_page' => } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Return tree of Dolistore categories. $this->categories must have been loaded before. * * @param int $parent Id of parent category * @return string */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps function get_categories($parent = 0) { + // phpcs:enable if (!isset($this->categories)) die('not possible'); if ($parent != 0) { $html = '