rule for private function is different

This commit is contained in:
Frédéric FRANCE 2018-08-14 10:21:34 +02:00
parent d30874750f
commit 3210181a3d
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
12 changed files with 43 additions and 37 deletions

View File

@ -349,9 +349,9 @@
<!--<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps"> <!--<rule ref="PEAR.NamingConventions.ValidFunctionName.NotCamelCaps">
<severity>0</severity> <severity>0</severity>
</rule>--> </rule>-->
<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps"> <!--<rule ref="PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps">
<severity>0</severity> <severity>0</severity>
</rule> </rule>-->
<rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore"> <rule ref="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore">
<severity>0</severity> <severity>0</severity>
</rule> </rule>

View File

@ -73,6 +73,7 @@ class autoTranslator
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function parse_refLangTranslationFiles() private function parse_refLangTranslationFiles()
{ {

View File

@ -232,7 +232,7 @@ abstract class ActionsAdherentCardCommon
* *
* @return string HTML output * @return string HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function assign_post() private function assign_post()
{ {
global $langs, $mysoc; global $langs, $mysoc;

View File

@ -989,7 +989,7 @@ class Categorie extends CommonObject
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function load_motherof() private function load_motherof()
{ {
global $conf; global $conf;

View File

@ -260,33 +260,34 @@ abstract class ActionsContactCardCommon
* *
* @return string HTML output * @return string HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function assign_post() private function assign_post()
{ {
global $langs, $mysoc; global $langs, $mysoc;
$this->object->old_name = $_POST["old_name"]; $this->object->old_name = $_POST["old_name"];
$this->object->old_firstname = $_POST["old_firstname"]; $this->object->old_firstname = $_POST["old_firstname"];
$this->object->socid = $_POST["socid"]; $this->object->socid = $_POST["socid"];
$this->object->lastname = $_POST["name"]; $this->object->lastname = $_POST["name"];
$this->object->firstname = $_POST["firstname"]; $this->object->firstname = $_POST["firstname"];
$this->object->civility_id = $_POST["civility_id"]; $this->object->civility_id = $_POST["civility_id"];
$this->object->poste = $_POST["poste"]; $this->object->poste = $_POST["poste"];
$this->object->address = $_POST["address"]; $this->object->address = $_POST["address"];
$this->object->zip = $_POST["zipcode"]; $this->object->zip = $_POST["zipcode"];
$this->object->town = $_POST["town"]; $this->object->town = $_POST["town"];
$this->object->fk_departement = $_POST["state_id"]; $this->object->fk_departement = $_POST["state_id"];
$this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id; $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
$this->object->state_id = $_POST["state_id"]; $this->object->state_id = $_POST["state_id"];
$this->object->phone_pro = $_POST["phone_pro"]; $this->object->phone_pro = $_POST["phone_pro"];
$this->object->phone_perso = $_POST["phone_perso"]; $this->object->phone_perso = $_POST["phone_perso"];
$this->object->phone_mobile = $_POST["phone_mobile"]; $this->object->phone_mobile = $_POST["phone_mobile"];
$this->object->fax = $_POST["fax"]; $this->object->fax = $_POST["fax"];
$this->object->email = $_POST["email"]; $this->object->email = $_POST["email"];
$this->object->jabberid = $_POST["jabberid"]; $this->object->jabberid = $_POST["jabberid"];
$this->object->priv = $_POST["priv"]; $this->object->priv = $_POST["priv"];
$this->object->note = $_POST["note"]; $this->object->note = $_POST["note"];
$this->object->canvas = $_POST["canvas"]; $this->object->canvas = $_POST["canvas"];
// We set country_id, and country_code label of the chosen country // We set country_id, and country_code label of the chosen country
if ($this->object->country_id) if ($this->object->country_id)

View File

@ -655,7 +655,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk * @param string $fileurl Url path to show image if saved onto disk
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function draw_artichow($file,$fileurl) private function draw_artichow($file,$fileurl)
{ {
global $artichow_defaultfont; global $artichow_defaultfont;
@ -844,7 +844,7 @@ class DolGraph
* @param string $fileurl Url path to show image if saved onto disk. Never used here. * @param string $fileurl Url path to show image if saved onto disk. Never used here.
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function draw_jflot($file,$fileurl) private function draw_jflot($file,$fileurl)
{ {
global $artichow_defaultfont; global $artichow_defaultfont;

View File

@ -309,6 +309,7 @@ class ExtraFields
* @param string $enabled Condition to have the field enabled or not * @param string $enabled Condition to have the field enabled or not
* @return int <=0 if KO, >0 if OK * @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') 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; global $conf,$user;
@ -463,6 +464,7 @@ class ExtraFields
* @param string $elementtype Element type ('member', 'product', 'thirdparty', ...) * @param string $elementtype Element type ('member', 'product', 'thirdparty', ...)
* @return int < 0 if KO, 0 if nothing is done, 1 if OK * @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') private function delete_label($attrname, $elementtype='member')
{ {
global $conf; global $conf;
@ -630,6 +632,7 @@ class ExtraFields
* @param int $totalizable Is extrafield totalizable on list * @param int $totalizable Is extrafield totalizable on list
* @return int <=0 if KO, >0 if OK * @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) 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; global $conf, $user;

View File

@ -1320,7 +1320,7 @@ class DoliDBSqlite3 extends DoliDB
* @param int $day Day * @param int $day Day
* @return int Formatted date * @return int Formatted date
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private static function calc_daynr($year, $month, $day) { private static function calc_daynr($year, $month, $day) {
$y = $year; $y = $year;
if ($y == 0 && $month == 0) return 0; if ($y == 0 && $month == 0) return 0;
@ -1341,7 +1341,7 @@ class DoliDBSqlite3 extends DoliDB
* @param bool $sunday_first_day_of_week ??? * @param bool $sunday_first_day_of_week ???
* @return int * @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) { private static function calc_weekday($daynr, $sunday_first_day_of_week) {
$ret = floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7); $ret = floor(($daynr + 5 + ($sunday_first_day_of_week ? 1 : 0)) % 7);
return $ret; return $ret;
@ -1353,7 +1353,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $year Year * @param string $year Year
* @return int Nb of days in 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) private static function calc_days_in_year($year)
{ {
return (($year & 3) == 0 && ($year%100 || ($year%400 == 0 && $year)) ? 366 : 365); return (($year & 3) == 0 && ($year%100 || ($year%400 == 0 && $year)) ? 366 : 365);
@ -1369,7 +1369,7 @@ class DoliDBSqlite3 extends DoliDB
* @param string $calc_year ??? * @param string $calc_year ???
* @return string ??? * @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) { private static function calc_week($year, $month, $day, $week_behaviour, &$calc_year) {
$daynr=self::calc_daynr($year,$month,$day); $daynr=self::calc_daynr($year,$month,$day);
$first_daynr=self::calc_daynr($year,1,1); $first_daynr=self::calc_daynr($year,1,1);

View File

@ -167,7 +167,7 @@ class FormProduct
* @param String $final_label full label with all parents, separated by ' >> ' (completed on each call) * @param String $final_label full label with all parents, separated by ' >> ' (completed on each call)
* @return String full label with all parents, separated by ' >> ' * @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='') { private function get_parent_path($tab, $final_label='') {
if(empty($final_label)) $final_label = $tab['label']; if(empty($final_label)) $final_label = $tab['label'];

View File

@ -398,8 +398,9 @@ class Productbatch extends CommonObject
/** /**
* Clean fields (triming) * Clean fields (triming)
* *
* @return void * @return void
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function clean_param() private function clean_param()
{ {
if (isset($this->fk_product_stock)) $this->fk_product_stock=(int) trim($this->fk_product_stock); if (isset($this->fk_product_stock)) $this->fk_product_stock=(int) trim($this->fk_product_stock);

View File

@ -365,7 +365,7 @@ abstract class ActionsCardCommon
* @param string $action Action string * @param string $action Action string
* @return string HTML output * @return string HTML output
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function assign_post($action) private function assign_post($action)
{ {
global $langs, $mysoc; global $langs, $mysoc;
@ -382,7 +382,7 @@ abstract class ActionsCardCommon
$this->object->town = $_POST["town"]; $this->object->town = $_POST["town"];
$this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id; $this->object->country_id = $_POST["country_id"]?$_POST["country_id"]:$mysoc->country_id;
$this->object->state_id = $_POST["state_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->fax = $_POST["fax"];
$this->object->email = $_POST["email"]; $this->object->email = $_POST["email"];
$this->object->url = $_POST["url"]; $this->object->url = $_POST["url"];

View File

@ -2756,7 +2756,7 @@ class User extends CommonObject
* *
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function load_parentof() private function load_parentof()
{ {
global $conf; global $conf;