Skip to content

Commit

Permalink
Merge pull request #9387 from frederic34/camelCaps2
Browse files Browse the repository at this point in the history
start changing phpcs:ignore
  • Loading branch information
eldy committed Sep 12, 2018
2 parents b1d9846 + ce76a2e commit 963d5ee
Show file tree
Hide file tree
Showing 266 changed files with 2,944 additions and 1,874 deletions.
4 changes: 2 additions & 2 deletions dev/setup/codesniffer/ruleset.xml
Expand Up @@ -238,9 +238,9 @@
<!--<rule ref="PEAR.Commenting.FunctionComment.MissingReturn">
<severity>0</severity>
</rule>-->
<rule ref="PEAR.Commenting.FunctionComment.Missing">
<!--<rule ref="PEAR.Commenting.FunctionComment.Missing">
<severity>0</severity>
</rule>
</rule>-->

<rule ref="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />

Expand Down
5 changes: 2 additions & 3 deletions dev/translation/autotranslator.class.php
Expand Up @@ -64,16 +64,15 @@ 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();
}

/**
* Parse file
*
* @return void
*/
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
private function parse_refLangTranslationFiles()
private function parseRefLangTranslationFiles()
{

$files = $this->getTranslationFilesArray($this->_refLang);
Expand Down
19 changes: 11 additions & 8 deletions htdocs/accountancy/class/accountingaccount.class.php
Expand Up @@ -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) {
Expand All @@ -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 ";
Expand Down Expand Up @@ -608,16 +610,17 @@ function getLibStatut($mode=0)
return $this->LibStatut($this->status,$mode);
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Renvoi le libelle d'un statut donne
*
* @param int $statut Id statut
* @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"));

Expand All @@ -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');
Expand Down
3 changes: 2 additions & 1 deletion htdocs/accountancy/class/accountingjournal.class.php
Expand Up @@ -271,16 +271,17 @@ function getLibType($mode=0)
return $this->LibType($this->nature,$mode);
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Return type of an accounting journal
*
* @param int $nature Id type
* @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"));
Expand Down
16 changes: 10 additions & 6 deletions htdocs/accountancy/class/bookkeeping.class.php
Expand Up @@ -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,";
Expand Down Expand Up @@ -1701,21 +1702,22 @@ 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)
* @param int $select_out Set value returned by select 0=rowid (default), 1=account_number
* @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';
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
8 changes: 5 additions & 3 deletions htdocs/adherents/canvas/actions_adherentcard_common.class.php
Expand Up @@ -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;

Expand Down Expand Up @@ -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"];
Expand Down
Expand Up @@ -67,16 +67,17 @@ private function getTitle($action)
return $out;
}

// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Assign custom values for canvas
*
* @param string $action Type of 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;
Expand Down Expand Up @@ -121,6 +122,7 @@ function assign_values(&$action, $id)
}


// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/**
* Fetch datas list and save into ->list_datas
*
Expand All @@ -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();
Expand Down

0 comments on commit 963d5ee

Please sign in to comment.