From 2d02bec9ba68d2c9a30a5dee9380615097d4bf4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 9 Sep 2024 03:13:43 +0200 Subject: [PATCH] fix phpstan (#30882) * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan --- htdocs/public/company/new.php | 4 ++-- htdocs/public/eventorganization/attendee_new.php | 2 +- htdocs/public/members/new.php | 2 +- htdocs/public/partnership/new.php | 2 +- htdocs/public/project/index.php | 2 +- htdocs/public/project/new.php | 2 +- htdocs/public/project/suggestbooth.php | 2 +- htdocs/public/project/suggestconference.php | 2 +- htdocs/public/ticket/create_ticket.php | 3 ++- phpstan.neon.dist | 1 - 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/public/company/new.php b/htdocs/public/company/new.php index dbea6169b6b..82dfe6dd5e7 100644 --- a/htdocs/public/company/new.php +++ b/htdocs/public/company/new.php @@ -4,7 +4,7 @@ * Copyright (C) 2006-2013 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 J. Fernando Lagrange - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2018 Alexandre Spangaro * Copyright (C) 2021 Waël Almoman * Copyright (C) 2022 Udo Tamm @@ -302,7 +302,7 @@ $extrafields->fetch_name_optionals_label($objectsoc->table_element); // fetch op llxHeaderVierge($langs->trans("ContactUs")); print '
'; -print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"') . '   ' . $langs->trans("ContactUs"), '', '', 0, 0, 'center'); +print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"') . '   ' . $langs->trans("ContactUs"), '', '', 0, '', 'center'); print '
'; diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index 90702047898..013e90e4614 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -697,7 +697,7 @@ print '
'; // Sub banner print '
'; -print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, 0, 'center'); +print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, '', 'center'); // Welcome message print ''.$langs->trans("EvntOrgWelcomeMessage").''; print '
'; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index b77ebc86ce4..1e0e31a847a 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -518,7 +518,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); // fetch optio llxHeaderVierge($langs->trans("NewSubscription")); print '
'; -print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"').'   '.$langs->trans("NewSubscription"), '', '', 0, 0, 'center'); +print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"').'   '.$langs->trans("NewSubscription"), '', '', 0, '', 'center'); print '
'; diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php index 57461142b2d..25d44c2f851 100644 --- a/htdocs/public/partnership/new.php +++ b/htdocs/public/partnership/new.php @@ -554,7 +554,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); // fetch optio llxHeaderVierge($langs->trans("NewPartnershipRequest")); print '
'; -print load_fiche_titre(img_picto('', 'hands-helping', 'class="pictofixedwidth"').'   '.$langs->trans("NewPartnershipRequest"), '', '', 0, 0, 'center'); +print load_fiche_titre(img_picto('', 'hands-helping', 'class="pictofixedwidth"').'   '.$langs->trans("NewPartnershipRequest"), '', '', 0, '', 'center'); print '
'; diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index 7557c30d8eb..934b67ee5c5 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -233,7 +233,7 @@ print '
'; // Sub banner print '
'; -print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, 0, 'center'); +print load_fiche_titre($langs->trans("NewRegistration"), '', '', 0, '', 'center'); // Welcome message print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage").''; print '
'; diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index a3eb7e096cf..94a8fa24dd2 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -457,7 +457,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); // fetch optio llxHeaderVierge($langs->trans("NewContact")); -print load_fiche_titre($langs->trans("NewContact"), '', '', 0, 0, 'center'); +print load_fiche_titre($langs->trans("NewContact"), '', '', 0, '', 'center'); print '
'; diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index a734f34838e..c0a181dd16e 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -560,7 +560,7 @@ print '
'; // Sub banner print '
'; -print load_fiche_titre($langs->trans("NewSuggestionOfBooth"), '', '', 0, 0, 'center'); +print load_fiche_titre($langs->trans("NewSuggestionOfBooth"), '', '', 0, '', 'center'); // Welcome message print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage").''; print '
'; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 548026e2856..676e1d5b05e 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -497,7 +497,7 @@ print '
'; // Sub banner print '
'; -print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, 0, 'center'); +print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, '', 'center'); // Welcome message print ''.$langs->trans("EvntOrgRegistrationWelcomeMessage").''; print '
'; diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 6a56fd7985e..00f637d8736 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -3,6 +3,7 @@ * Copyright (C) 2016 Christophe Battarel * Copyright (C) 2023 Laurent Destailleur * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -533,7 +534,7 @@ if ($action != "infos_success") { $formticket->param = array('returnurl' => $_SERVER['PHP_SELF'].($conf->entity > 1 ? '?entity='.$conf->entity : '')); - print load_fiche_titre($langs->trans('NewTicket'), '', '', 0, 0, 'marginleftonly'); + print load_fiche_titre($langs->trans('NewTicket'), '', '', 0, '', 'marginleftonly'); if (!getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM')) { $langs->load("errors"); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 078fac3cbf0..fdbe4201093 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -87,7 +87,6 @@ parameters: - '#get_next_value expects string, int given#' - '#pdf_writeLinkedObjects expects string, int given#' - '#dol_print_phone expects string, int given#' - - '#load_fiche_titre expects string, int given#' - '#dol_move expects string, int given#' - '#expects int, float#' - '#expects int, array\|string given.#'