Skip to content

Commit

Permalink
move phpcs:ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Sep 3, 2018
1 parent 7288335 commit d08b68e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1,457 deletions.
14 changes: 9 additions & 5 deletions htdocs/core/class/extrafields.class.php
Expand Up @@ -95,7 +95,7 @@ class ExtraFields
* @var string Error code (or message)
*/
public $error='';

var $errno;


Expand Down Expand Up @@ -293,6 +293,7 @@ private function create($attrname, $type='varchar', $length=255, $elementtype='m
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Add description of a new optional attribute
*
Expand All @@ -316,9 +317,9 @@ private function create($attrname, $type='varchar', $length=255, $elementtype='m
* @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')
{
// phpcs:enable
global $conf,$user;

if ($elementtype == 'thirdparty') $elementtype='societe';
Expand Down Expand Up @@ -463,16 +464,17 @@ function delete($attrname, $elementtype='member')
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Delete description of an optional attribute
*
* @param string $attrname Code of attribute to delete
* @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')
{
// phpcs:enable
global $conf;

if ($elementtype == 'thirdparty') $elementtype='societe';
Expand Down Expand Up @@ -612,6 +614,7 @@ function update($attrname, $label, $type, $length, $elementtype, $unique=0, $req
}
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Modify description of personalized attribute
*
Expand All @@ -636,9 +639,9 @@ function update($attrname, $label, $type, $length, $elementtype, $unique=0, $req
* @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)
{
// phpcs:enable
global $conf, $user;
dol_syslog(get_class($this)."::update_label ".$attrname.", ".$label.", ".$type.", ".$size.", ".$elementtype.", ".$unique.", ".$required.", ".$pos.", ".$alwayseditable.", ".$perms.", ".$list.", ".$default.", ".$computed.", ".$entity.", ".$langfile.", ".$enabled.", ".$totalizable);

Expand Down Expand Up @@ -748,16 +751,17 @@ private function update_label($attrname,$label,$type,$size,$elementtype,$unique=
}


// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Load array this->attributes, or old this->attribute_xxx like attribute_label, attribute_type, ...
*
* @param string $elementtype Type of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...).
* @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)
{
// phpcs:enable
global $conf;

if (empty($elementtype)) return array();
Expand Down

0 comments on commit d08b68e

Please sign in to comment.