diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 375ddd0dcc0..e16dfa29fcc 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -349,9 +349,9 @@ - + 0 diff --git a/dev/translation/autotranslator.class.php b/dev/translation/autotranslator.class.php index 47d6a25ec15..2acbc2d7e10 100644 --- a/dev/translation/autotranslator.class.php +++ b/dev/translation/autotranslator.class.php @@ -73,6 +73,7 @@ class autoTranslator * * @return void */ + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function parse_refLangTranslationFiles() { diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index 57fabdecd17..9707b520277 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -232,7 +232,7 @@ abstract class ActionsAdherentCardCommon * * @return string HTML output */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function assign_post() { global $langs, $mysoc; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 2ea63cc7bfc..549bb5af29b 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -989,7 +989,7 @@ class Categorie extends CommonObject * * @return int <0 if KO, >0 if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function load_motherof() { global $conf; diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 1648c0ff8e2..21977e6fb32 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -260,33 +260,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) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 28fbe14f287..4a9b45aa54f 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -655,7 +655,7 @@ class DolGraph * @param string $fileurl Url path to show image if saved onto disk * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function draw_artichow($file,$fileurl) { global $artichow_defaultfont; @@ -844,7 +844,7 @@ class DolGraph * @param string $fileurl Url path to show image if saved onto disk. Never used here. * @return void */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function draw_jflot($file,$fileurl) { global $artichow_defaultfont; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index fb6906c3456..36e31bf2437 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -309,6 +309,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; @@ -463,6 +464,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; @@ -630,6 +632,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; diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index 43a2217d64e..e5e0dd8cc5a 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -1320,7 +1320,7 @@ class DoliDBSqlite3 extends DoliDB * @param int $day Day * @return int Formatted date */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private static function calc_daynr($year, $month, $day) { $y = $year; if ($y == 0 && $month == 0) return 0; @@ -1341,7 +1341,7 @@ class DoliDBSqlite3 extends DoliDB * @param bool $sunday_first_day_of_week ??? * @return int */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private static function calc_weekday($daynr, $sunday_first_day_of_week) { $ret = floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7); return $ret; @@ -1353,7 +1353,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $year Year * @return int Nb of days in year */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private static function calc_days_in_year($year) { return (($year & 3) == 0 && ($year%100 || ($year%400 == 0 && $year)) ? 366 : 365); @@ -1369,7 +1369,7 @@ class DoliDBSqlite3 extends DoliDB * @param string $calc_year ??? * @return string ??? */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private static function calc_week($year, $month, $day, $week_behaviour, &$calc_year) { $daynr=self::calc_daynr($year,$month,$day); $first_daynr=self::calc_daynr($year,1,1); diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 3fa1ada3b15..1bbfb8f7aa5 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -167,7 +167,7 @@ class FormProduct * @param String $final_label full label with all parents, separated by ' >> ' (completed on each call) * @return String full label with all parents, separated by ' >> ' */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function get_parent_path($tab, $final_label='') { if(empty($final_label)) $final_label = $tab['label']; diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index b52514a4195..c4839d8992d 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -398,8 +398,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/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 74616ec7d5b..9a8319e6a00 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -365,7 +365,7 @@ abstract class ActionsCardCommon * @param string $action Action string * @return string HTML output */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function assign_post($action) { global $langs, $mysoc; @@ -382,7 +382,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/user/class/user.class.php b/htdocs/user/class/user.class.php index 11f85b64382..f5e7954398a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2756,7 +2756,7 @@ class User extends CommonObject * * @return int <0 if KO, >0 if OK */ - // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps private function load_parentof() { global $conf;