fix phpstan (#30989)

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
This commit is contained in:
Frédéric FRANCE 2024-09-18 02:45:54 +02:00 committed by GitHub
parent 96dfda7ece
commit d5fe4f998a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 42 additions and 38 deletions

View file

@ -258,7 +258,7 @@ $arrayofselected = is_array($toselect) ? $toselect : array();
// List of members type
if (!$rowid && $action != 'create' && $action != 'edit') {
//print dol_get_fiche_head('');
//print dol_get_fiche_head([]);
$sql = "SELECT d.rowid, d.libelle as label, d.subscription, d.amount, d.caneditamount, d.vote, d.statut as status, d.morphy, d.duration";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";

View file

@ -154,7 +154,7 @@ if (isModEnabled('accounting')) {
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans('TaxSetup'), $linkback, 'title_setup');
//print dol_get_fiche_head(null, '', '', -1);
//print dol_get_fiche_head([], '', '', -1);
if (empty($mysoc->tva_assuj)) {
print $langs->trans("YourCompanyDoesNotUseVAT").'<br>';

View file

@ -2,6 +2,7 @@
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2022 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -166,7 +167,7 @@ if ($action == 'create') {
print load_fiche_titre($langs->trans("NewBookmark"), '', 'bookmark');
print dol_get_fiche_head(null, 'bookmark', '', 0, '');
print dol_get_fiche_head([], 'bookmark', '', 0, '');
print '<table class="border centpercent tableforfieldcreate">';

View file

@ -3,7 +3,7 @@
* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -162,7 +162,7 @@ print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<input type="hidden" name="type" value="'.$type.'">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
print '<table class="border centpercent">';

View file

@ -1231,7 +1231,7 @@ if ($action == 'create') { // aaa
print '<div id="formmailbeforetitle" name="formmailbeforetitle"></div>';
print load_fiche_titre($langs->trans("TestMailing"));
print dol_get_fiche_head(null, '', '', -1);
print dol_get_fiche_head([], '', '', -1);
// Create mail form object
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
@ -1279,7 +1279,7 @@ if ($action == 'create') { // aaa
// Print mail content
print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto('<span class="opacitymedium hideonsmartphone">'.$langs->trans("AvailableVariables").'</span>', $htmltext, 1, 'helpclickable', '', 0, 3, 'emailsubstitionhelp'), 'generic');
print dol_get_fiche_head('', '', '', -1);
print dol_get_fiche_head([], '', '', -1);
print '<table class="bordernooddeven tableforfield centpercent">';
@ -1465,7 +1465,7 @@ if ($action == 'create') { // aaa
// Print mail content
print load_fiche_titre($langs->trans("EMail"), '<span class="opacitymedium">'.$form->textwithpicto($langs->trans("AvailableVariables").'</span>', $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'generic');
print dol_get_fiche_head(null, '', '', -1);
print dol_get_fiche_head([], '', '', -1);
print '<table class="bordernooddeven centpercent">';

View file

@ -12,7 +12,7 @@
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2023-2024 Benjamin Falière <benjamin.faliere@altairis.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
@ -1854,7 +1854,7 @@ if ($action == 'create' && $usercancreate) {
print '<input type="hidden" name="originmulticurrency_tx" value="'.$currency_tx.'">';
}
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
// Call Hook tabContentCreateOrder
$parameters = array();

View file

@ -406,7 +406,7 @@ if ($action == 'create') {
print '<input type="hidden" name="clos" value="0">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
print '<table class="border centpercent tableforfieldcreate">';

View file

@ -410,7 +410,7 @@ if ($action == 'create') {
print load_fiche_titre($langs->trans("NewVariousPayment"), '', 'object_payment');
print dol_get_fiche_head('', '');
print dol_get_fiche_head([], '');
print '<table class="border centpercent">';

View file

@ -8,7 +8,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2017-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023 Nick Fragoulis
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
@ -1008,7 +1008,7 @@ if ($action == 'create') {
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="facid" value="'.$object->id.'">';
print dol_get_fiche_head(null, '', '', 0);
print dol_get_fiche_head([], '', '', 0);
$rowspan = 4;
if (isModEnabled('project')) {
@ -1152,7 +1152,7 @@ if ($action == 'create') {
print '<span class="opacitymedium">'.$langs->trans("ToCreateARecurringInvoiceGeneAuto", $langs->transnoentitiesnoconv('Module2300Name')).'</span><br><br>';
print dol_get_fiche_head(null, '', '', 0);
print dol_get_fiche_head([], '', '', 0);
print '<table class="border centpercent">';

View file

@ -178,7 +178,7 @@ if ($action == 'create') {
print '<input type="hidden" name="chid" value="'.$chid.'">';
print '<input type="hidden" name="action" value="add_payment">';
print dol_get_fiche_head('', '');
print dol_get_fiche_head([], '');
print '<table class="border centpercent">';

View file

@ -178,7 +178,7 @@ if ($action == 'create') {
print '<input type="hidden" name="chid" value="'.$chid.'">';
print '<input type="hidden" name="action" value="add_payment">';
print dol_get_fiche_head('', '');
print dol_get_fiche_head([], '');
print '<table class="border centpercent">';

View file

@ -228,7 +228,7 @@ class FormTicket
print "\n<!-- Begin form TICKET -->\n";
if ($withdolfichehead) {
print dol_get_fiche_head(null, 'card', '', 0, '');
print dol_get_fiche_head([], 'card', '', 0, '');
}
print '<form method="POST" '.($withdolfichehead ? '' : 'style="margin-bottom: 30px;" ').'name="ticket" id="form_create_ticket" enctype="multipart/form-data" action="'.(!empty($this->param["returnurl"]) ? $this->param["returnurl"] : $_SERVER['PHP_SELF']).'">';

View file

@ -2510,7 +2510,7 @@ function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $di
/**
* Show tab header of a card
*
* @param array<string,array<int<0,5>,string>> $links Array of tabs (0=>url, 1=>label, 2=>code, 3=>not used, 4=>text after link, 5=>morecssonlink). Currently initialized by calling a function xxx_admin_prepare_head. Note that label into $links[$i][1] must be already HTML escaped.
* @param array<int,array<int<0,5>,string>> $links Array of tabs (0=>url, 1=>label, 2=>code, 3=>not used, 4=>text after link, 5=>morecssonlink). Currently initialized by calling a function xxx_admin_prepare_head. Note that label into $links[$i][1] must be already HTML escaped.
* @param string $active Active tab name (document', 'info', 'ldap', ....)
* @param string $title Title
* @param int $notab -1 or 0=Add tab header, 1=no tab header (if you set this to 1, using print dol_get_fiche_end() to close tab is not required), -2=Add tab header with no sepaaration under tab (to start a tab just after), -3=Add tab header but no footer separation

View file

@ -3,6 +3,7 @@
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2023 Maxime Nicolas <maxime@oarces.com>
* Copyright (C) 2023 Benjamin GREMBI <benjamin@oarces.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -128,7 +129,7 @@ if ($action == 'presend') {
print '<br>';
print load_fiche_titre($langs->trans($titreform));
print dol_get_fiche_head('', '', '', -1);
print dol_get_fiche_head([], '', '', -1);
// Create form for email
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';

View file

@ -3,6 +3,7 @@
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -213,7 +214,7 @@ if ($massaction == 'presend') {
print '<input type="hidden" name="massaction" value="confirm_presend">';
print dol_get_fiche_head(null, '', '');
print dol_get_fiche_head([], '', '');
// Create mail form
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
* Copyright (C) 2013 Florian Henry <florian.henry@open-concpt.pro>
* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -333,7 +333,7 @@ if (($action == "create") || ($action == "edit")) {
if ($action == "edit") {
print dol_get_fiche_head($head, 'card', $langs->trans("CronTask"), 0, 'cron');
} else {
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
}
print '<table class="border centpercent">';

View file

@ -387,7 +387,7 @@ if ($action == 'create') {
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
print '<table class="border centpercent">';
print '<tbody>';

View file

@ -958,7 +958,7 @@ if ($action == 'create') {
print '<input type="hidden" name="entrepot_id" value="'.GETPOSTINT('entrepot_id').'">';
}
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
print '<table class="border centpercent">';

View file

@ -1434,7 +1434,7 @@ if ($action == 'create') {
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
print '<table class="border centpercent">';
print '<tbody>';

View file

@ -196,7 +196,7 @@ if ($action == 'create' || empty($action)) {
print '<input type="hidden" name="chid" value="'.$expensereport->id.'">';
print '<input type="hidden" name="action" value="add_payment">';
print dol_get_fiche_head(null, '0', '', -1);
print dol_get_fiche_head([], '0', '', -1);
$linkback = '';
// $linkback = '<a href="' . DOL_URL_ROOT . '/expensereport/payment/list.php">' . $langs->trans("BackToList") . '</a>';

View file

@ -474,7 +474,7 @@ if ($action == 'create') {
}
} elseif ($action == 'selsocforcreatefrommodel') {
print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'intervention');
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
print '<table class="border centpercent">';

View file

@ -972,7 +972,7 @@ if ($action == 'create') {
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
print '<table class="border centpercent">';
@ -1126,7 +1126,7 @@ if ($action == 'create') {
print '<input type="hidden" name="action" value="create">'; // We go back to create action
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
if (is_object($objectsrc)) {
print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">';

View file

@ -8,7 +8,7 @@
* Copyright (C) 2012 Cedric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2017-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2023-2024 Nick Fragoulis
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
@ -908,7 +908,7 @@ if ($action == 'create') {
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="facid" value="' . $object->id . '">';
print dol_get_fiche_head(null, '', '', 0);
print dol_get_fiche_head([], '', '', 0);
$rowspan = 4;
if (isModEnabled('project')) {
@ -1056,7 +1056,7 @@ if ($action == 'create') {
print '<span class="opacitymedium">'.$langs->trans("ToCreateARecurringInvoiceGeneAuto", $langs->transnoentitiesnoconv('Module2300Name')).'</span><br><br>';
print dol_get_fiche_head(null, '', '', 0);
print dol_get_fiche_head([], '', '', 0);
print '<table class="border centpercent">';

View file

@ -9,7 +9,7 @@
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2022 Udo Tamm <dev@dolibit.de>
* Copyright (C) 2023 Sylvain Legrand <technique@infras.fr>
@ -503,7 +503,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '<input type="hidden" name="type" id="invoice_type" value="'.$object->type.'">';
print '<input type="hidden" name="societe" value="'.$obj->name.'">';
print dol_get_fiche_head(null);
print dol_get_fiche_head([]);
print '<table class="border centpercent">';

View file

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -31,7 +32,7 @@ $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOn
<?php
print load_fiche_titre($langs->trans("NewProduct"), '', 'product');
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
?>
<?php dol_htmloutput_errors((is_numeric($object->error) ? '' : $object->error), $object->errors); ?>

View file

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -31,7 +32,7 @@ $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOn
<?php
print load_fiche_titre($langs->trans("NewService"), '', 'service');
print dol_get_fiche_head('');
print dol_get_fiche_head([]);
?>
<?php dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']); ?>

View file

@ -104,7 +104,6 @@ parameters:
- '#expects string, bool\|mysqli_result\|resource given.#'
- '#( |::)((multi)?selectarray)\(\) expects array#'
- '# (reWriteAllMenus|check_authentication) expects array#'
- '# (dol_get_fiche_head) expects array<int#'
- '#::(_validateMyObject|select_company)\(\) expects array<string#'
- '# (dol_print_error|get_htmloutput_mesg|dolGetButtonTitle|dol_htmloutput_errors|dol_htmloutput_mesg) expects array<string#'
- '# getNav expects array#'