fix phpstan (#28514)

* fix phpstan

* fix phpstan

* fix phpstan
This commit is contained in:
Frédéric FRANCE 2024-02-28 23:42:23 +01:00 committed by GitHub
parent 648a58e869
commit 32a4947590
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View file

@ -10,6 +10,7 @@
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
* 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
@ -662,7 +663,7 @@ class FormOther
* @param string $morecss More css
* @return void
*/
public function selectProjectTasks($selectedtask = '', $projectid = 0, $htmlname = 'task_parent', $modeproject = 0, $modetask = 0, $mode = 0, $useempty = 0, $disablechildoftaskid = 0, $filteronprojstatus = '', $morecss = '')
public function selectProjectTasks($selectedtask = 0, $projectid = 0, $htmlname = 'task_parent', $modeproject = 0, $modetask = 0, $mode = 0, $useempty = 0, $disablechildoftaskid = 0, $filteronprojstatus = '', $morecss = '')
{
global $user, $langs;
@ -998,7 +999,7 @@ class FormOther
* @param int $y Hauteur de l'image en pixels
* @return void
*/
public function CreateColorIcon($color, $module, $name, $x = '12', $y = '12')
public function CreateColorIcon($color, $module, $name, $x = 12, $y = 12)
{
// phpcs:enable
global $conf;

View file

@ -2,6 +2,7 @@
/* Copyright (c) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.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
@ -143,12 +144,12 @@ class FormProjets extends Form
* @param string $filterkey Key to filter on title or ref
* @param int $nooutput No print output. Return it only.
* @param int $forceaddid Force to add project id in list, event if not qualified
* @param int $htmlid Html id to use instead of htmlname
* @param string $htmlid Html id to use instead of htmlname
* @param string $morecss More CSS
* @param string $morefilter More filters (Must be a sql sanitized string)
* @return int|string|array HTML string or array of option or <0 if KO
*/
public function select_projects_list($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500', $morefilter = '')
public function select_projects_list($socid = -1, $selected = 0, $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500', $morefilter = '')
{
// phpcs:enable
global $user, $conf, $langs;
@ -334,7 +335,7 @@ class FormProjets extends Form
* @param User $usertofilter User object to use for filtering
* @return int Nbr of tasks if OK, <0 if KO
*/
public function selectTasks($socid = -1, $selected = '', $htmlname = 'taskid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500', $projectsListId = '', $showmore = 'all', $usertofilter = null)
public function selectTasks($socid = -1, $selected = 0, $htmlname = 'taskid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500', $projectsListId = '', $showmore = 'all', $usertofilter = null)
{
global $user, $conf, $langs;
@ -520,7 +521,7 @@ class FormProjets extends Form
* Build a HTML select list of element of same thirdparty to suggest to link them to project
*
* @param string $table_element Table of the element to update
* @param string $socid If of thirdparty to use as filter or 'id1,id2,...'
* @param int|string $socid If of thirdparty to use as filter or 'id1,id2,...'
* @param string $morecss More CSS
* @param int $limitonstatus Add filters to limit length of list to opened status (for example to avoid ERR_RESPONSE_HEADERS_TOO_BIG on project/element.php page). TODO To implement
* @param string $projectkey Equivalent key to fk_projet for actual table_element
@ -802,7 +803,7 @@ class FormProjets extends Form
* @param int $selectedInvoiceId Id invoice preselected
* @param int $selectedLineId Id invoice line preselected
* @param string $htmlNameInvoice Name of HTML select for Invoice
* @param int $htmlNameInvoiceLine Name of HTML select for Invoice Line
* @param string $htmlNameInvoiceLine Name of HTML select for Invoice Line
* @param string $morecss More css added to the select component
* @param array $filters Array of filters
* @param int $lineOnly return only option for line