Enable more PHPCS rules

This commit is contained in:
Laurent Destailleur 2020-04-25 19:27:42 +02:00
parent 068a890c36
commit 6caa872280
9 changed files with 25 additions and 36 deletions

View File

@ -120,13 +120,6 @@
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
<severity>0</severity>
</rule>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceBeforeEquals">
<severity>0</severity>
</rule>
<!-- Disallow several spaces after comma -->
<!-- We want to allow this because we want to be able to align params on several similare functions on different lines -->
<rule ref="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma">

View File

@ -271,19 +271,19 @@ if ($resql)
print '<input type="submit" class="button buttongen" name="delete" value="'.$langs->trans("Delete").'">';
print '<input type="hidden" name="norss" value="'.$idrss.'">';
print '</td>';
print "</tr>"."\n";
print '</tr>'."\n";
print '<tr class="oddeven">';
print "<td width=\"100px\">".$langs->trans("Title")."</td>";
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_title_".$idrss."\" value=\"".dol_escape_htmltag($conf->global->$keyrsstitle)."\"></td>";
print "</tr>"."\n";
print '</tr>'."\n";
print '<tr class="oddeven">';
print "<td>".$langs->trans("URL")."</td>";
print "<td><input type=\"text\" class=\"flat minwidth300\" name=\"external_rss_urlrss_".$idrss."\" value=\"".dol_escape_htmltag($conf->global->$keyrssurl)."\"></td>";
print "</tr>"."\n";
print '</tr>'."\n";
print '<tr class="oddeven">';
@ -301,7 +301,7 @@ if ($resql)
print '</div>';
}
print "</td>";
print "</tr>"."\n";
print '</tr>'."\n";
// Logo
if ($result > 0 && empty($rss->error))
@ -315,7 +315,7 @@ if ($resql)
if ($imageurl) print '<img height="32" src="'.$imageurl.'">';
else print $langs->trans("None");
print '</td>';
print "</tr>"."\n";
print '</tr>'."\n";
}
// Active
@ -323,7 +323,7 @@ if ($resql)
print '<tr class="oddeven">';
print '<td>'.$langs->trans('WidgetEnabled').'</td>';
print '<td>'.yn($active).'</td>';
print "</tr>"."\n";
print '</tr>'."\n";
print '</table>'."\n";

View File

@ -387,7 +387,7 @@ if ($mode == 'feature')
$filedata = dol_buildpath($moduledir.'/sql/data.sql');
if (dol_is_file($filedata))
{
$text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql'.')';
$text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql)';
}
else $text .= $langs->trans("No");

View File

@ -154,9 +154,11 @@ if ($year)
{
$tfile = $dir.'/'.$year.'/'.$file;
$relativepath = $year.'/'.$file;
print '<tr class="oddeven">'.'<td><a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?modulepart=facture_paiement&amp;file='.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a></td>';
print '<tr class="oddeven">';
print '<td><a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?modulepart=facture_paiement&amp;file='.urlencode($relativepath).'">'.img_pdf().' '.$file.'</a></td>';
print '<td class="right">'.dol_print_size(dol_filesize($tfile)).'</td>';
print '<td class="right">'.dol_print_date(dol_filemtime($tfile), "dayhour").'</td></tr>';
print '<td class="right">'.dol_print_date(dol_filemtime($tfile), "dayhour").'</td>';
print '</tr>';
}
}
closedir($handle);

View File

@ -1507,8 +1507,8 @@ class SMTPs
}
// always end related and end alternative after inline images
$content .= "--".$this->_getBoundary('related')."--"."\r\n";
$content .= "\r\n"."--".$this->_getBoundary('alternative')."--"."\r\n";
$content .= "--".$this->_getBoundary('related')."--\r\n";
$content .= "\r\n--".$this->_getBoundary('alternative')."--\r\n";
$content .= "\r\n";
}
else

View File

@ -667,7 +667,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print load_fiche_titre($langs->trans('Consumption'), '', '', 0, '', '', $newlinetext);
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder noshadow centpercent'.' nobottom'.'">';
print '<table class="noborder noshadow centpercent nobottom'.'">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Product").'</td>';

View File

@ -2048,7 +2048,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES))
print '<tr class="oddeven">';
print "<td>".$langs->trans("Default")."</td>";
print "<td>"."</td>";
print "<td></td>";
print '<td class="center">'.$langs->trans($object->price_base_type)."</td>";
print '<td class="right">';

View File

@ -1049,14 +1049,12 @@ if ($resql)
{
// Inventory code
print '<td><a href="'
.DOL_URL_ROOT.'/product/stock/movement_card.php'
.'?id='.$objp->entrepot_id
.'&amp;search_inventorycode='.$objp->inventorycode
.'&amp;search_type_mouvement='.$objp->type_mouvement
.DOL_URL_ROOT.'/product/stock/movement_card.php?id='.urlencode($objp->entrepot_id)
.'&search_inventorycode='.urlencode($objp->inventorycode)
.'&search_type_mouvement='.urlencode($objp->type_mouvement)
.'">'
.$objp->inventorycode
.'</a>'
.'</td>';
.$objp->inventorycode
.'</a></td>';
}
if (!empty($arrayfields['m.label']['checked']))
{

View File

@ -1086,15 +1086,11 @@ if ($resql)
if (!empty($arrayfields['m.inventorycode']['checked']))
{
// Inventory code
print '<td>'.'<a href="'
.DOL_URL_ROOT.'/product/stock/movement_card.php'
.'?id='.$objp->entrepot_id
.'&amp;search_inventorycode='.$objp->inventorycode
.'&amp;search_type_mouvement='.$objp->type_mouvement
.'">'
.$objp->inventorycode
.'</a>'
.'</td>';
print '<td><a href="'
.DOL_URL_ROOT.'/product/stock/movement_card.php?id='.urlencode($objp->entrepot_id)
.'&search_inventorycode='.urlencode($objp->inventorycode)
.'&search_type_mouvement='.urlencode($objp->type_mouvement)
.'">'.$objp->inventorycode.'</a></td>';
}
if (!empty($arrayfields['m.label']['checked']))
{