Fix some PSR rules

This commit is contained in:
Laurent Destailleur 2019-03-14 16:43:19 +01:00
parent a0d8ba268e
commit cdf6e4b65a
11 changed files with 28 additions and 44 deletions

View File

@ -77,7 +77,6 @@ if ($action == 'updateMask')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'specimen')
{
$modele=GETPOST('module', 'alpha');
@ -122,7 +121,6 @@ else if ($action == 'specimen')
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
}
// Activate a model
elseif ($action == 'set')
{
@ -137,7 +135,6 @@ elseif ($action == 'del')
if ($conf->global->FACTURE_ADDON_PDF == "$value") dolibarr_del_const($db, 'FACTURE_ADDON_PDF', $conf->entity);
}
}
// Set default model
elseif ($action == 'setdoc')
{
@ -155,7 +152,6 @@ elseif ($action == 'setdoc')
$ret = addDocumentModel($value, $type, $label, $scandir);
}
}
elseif ($action == 'setmod')
{
// TODO Verifier si module numerotation choisi peut etre active
@ -163,7 +159,6 @@ elseif ($action == 'setmod')
dolibarr_set_const($db, "FACTURE_ADDON", $value, 'chaine', 0, '', $conf->entity);
}
elseif ($action == 'setribchq')
{
$rib = GETPOST('rib', 'alpha');
@ -183,7 +178,6 @@ else if ($action == 'setribchq')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'set_FACTURE_DRAFT_WATERMARK')
{
$draft = GETPOST('FACTURE_DRAFT_WATERMARK', 'alpha');
@ -219,7 +213,6 @@ else if ($action == 'set_INVOICE_FREE_TEXT')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'setforcedate')
{
$forcedate = GETPOST('forcedate', 'alpha');
@ -237,7 +230,6 @@ else if ($action == 'setforcedate')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'setDefaultPDFModulesByType')
{
$invoicetypemodels = GETPOST('invoicetypemodels');

View File

@ -69,7 +69,6 @@ if ($action == 'updateMask')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'specimen')
{
$modele=GETPOST('module', 'alpha');
@ -114,7 +113,6 @@ else if ($action == 'specimen')
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
}
}
elseif ($action == 'setribchq')
{
$rib = GETPOST('rib', 'alpha');
@ -134,7 +132,6 @@ else if ($action == 'setribchq')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'set_PROPALE_DRAFT_WATERMARK')
{
$draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha');
@ -151,7 +148,6 @@ else if ($action == 'set_PROPALE_DRAFT_WATERMARK')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'set_PROPOSAL_FREE_TEXT')
{
$freetext = GETPOST('PROPOSAL_FREE_TEXT', 'none'); // No alpha here, we want exact string
@ -169,7 +165,6 @@ else if ($action == 'set_PROPOSAL_FREE_TEXT')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
elseif ($action == 'setdefaultduration')
{
$res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity);
@ -201,13 +196,11 @@ else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
setEventMessages($langs->trans("Error"), null, 'errors');
}
}
// Activate a model
elseif ($action == 'set')
{
$ret = addDocumentModel($value, $type, $label, $scandir);
}
elseif ($action == 'del')
{
$ret = delDocumentModel($value, $type);
@ -476,7 +469,7 @@ foreach ($dirmodels as $reldir)
print '</td>';
// Info
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
$htmltooltip = $langs->trans("Name").': '.$module->name;
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
if ($module->type == 'pdf')
{

View File

@ -315,7 +315,6 @@ elseif ($modecompta=="BOOKKEEPING")
$vars[$code] = $det['NP'];
}
$result = strtr($formula, $vars);
//var_dump($result);