Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start changing phpcs:ignore #9387

Merged
merged 41 commits into from
Sep 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3e723af
start changing phpcs:ignore
frederic34 Sep 1, 2018
e98b8e5
move phpcs:ignore
frederic34 Sep 2, 2018
47879d4
move phpcs:ignore
frederic34 Sep 2, 2018
b60f7db
move phpcs:ignore
frederic34 Sep 2, 2018
4ea582a
move phpcs:ignore
frederic34 Sep 2, 2018
04c1a7d
move phpcs:ignore
frederic34 Sep 2, 2018
2a5c994
move phpcs:ignore
frederic34 Sep 2, 2018
61c4e98
move phpcs:ignore
frederic34 Sep 2, 2018
e13a8ec
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 2, 2018
03a5aba
move phpcs:ignore
frederic34 Sep 2, 2018
35232b7
move phpcs:ignore
frederic34 Sep 2, 2018
22b9632
move phpcs:ignore
frederic34 Sep 2, 2018
2a9ef8d
move phpcs:ignore
frederic34 Sep 2, 2018
47e73bf
move phpcs:ignore
frederic34 Sep 2, 2018
489074a
move phpcs:ignore
frederic34 Sep 2, 2018
9c3352d
move phpcs:ignore
frederic34 Sep 2, 2018
e4946cc
move phpcs:ignore
frederic34 Sep 2, 2018
5f4a922
move phpcs:ignore
frederic34 Sep 3, 2018
7288335
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 3, 2018
d08b68e
move phpcs:ignore
frederic34 Sep 3, 2018
1ae1afe
move phpcs:ignore
frederic34 Sep 4, 2018
bdcac95
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 4, 2018
fd6281b
move phpcs:ignore
frederic34 Sep 4, 2018
65b74ad
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 4, 2018
48d8a44
correct merge
frederic34 Sep 4, 2018
c6cef85
move phpcs:ignore
frederic34 Sep 4, 2018
3847df1
move phpcs:ignore
frederic34 Sep 4, 2018
7799774
move phpcs:ignore
frederic34 Sep 4, 2018
ecc6c11
move phpcs:ignore
frederic34 Sep 4, 2018
f7c3ca9
move phpcs:ignore
frederic34 Sep 5, 2018
4e619dd
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 5, 2018
85df267
move phpcs:ignore
frederic34 Sep 5, 2018
4cbfa20
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 5, 2018
3ecf788
move phpcs:ignore
frederic34 Sep 6, 2018
cbf4a20
move phpcs:ignore
frederic34 Sep 6, 2018
70ba223
move phpcs:ignore
frederic34 Sep 6, 2018
ab4ae0f
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 6, 2018
2b62c4c
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 8, 2018
7e0b105
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 9, 2018
998b67f
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 12, 2018
ce76a2e
Merge remote-tracking branch 'upstream/develop' into camelCaps2
frederic34 Sep 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dev/setup/codesniffer/ruleset.xml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading