Skip to content

Commit

Permalink
fix phpstan (Dolibarr#31479)
Browse files Browse the repository at this point in the history
* fix phpstan

* fix phpstan
  • Loading branch information
frederic34 authored Oct 20, 2024
1 parent 76d801d commit a185fb4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/class/html.formprojet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public function selectTasks($socid = -1, $selected = 0, $htmlname = 'taskid', $m
// Use select2 selector
if (empty($option_only) && !empty($conf->use_javascript_ajax)) {
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
$comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus);
$comboenhancement = ajax_combobox($htmlname, [], 0, $forcefocus);
$out .= $comboenhancement;
$morecss .= ' minwidth150imp';
}
Expand Down Expand Up @@ -906,7 +906,7 @@ public function selectInvoiceAndLine($selectedInvoiceId = 0, $selectedLineId = 0
if (empty($lineOnly)) {
if (!empty($conf->use_javascript_ajax)) {
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
$comboenhancement = ajax_combobox($htmlNameInvoiceLine, '', 0, 0);
$comboenhancement = ajax_combobox($htmlNameInvoiceLine, [], 0, 0);
$out .= $comboenhancement;
$morecss = 'minwidth200imp maxwidth500';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/ajax.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ function ajax_dialog($title, $message, $w = 350, $h = 150)
* TODO: It is used when COMPANY_USE_SEARCH_TO_SELECT and CONTACT_USE_SEARCH_TO_SELECT are set by html.formcompany.class.php. Should use ajax_autocompleter instead like done by html.form.class.php for select_produits.
*
* @param string $htmlname Name of html select field ('myid' or '.myclass')
* @param array<array{method:string,url:string,htmlname:string,params:array<string,string>}> $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @param array<array{method:string,url:string,htmlname:string,params?:array<string,string>}> $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
* @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete
* @param int $forcefocus Force focus on field
* @param string $widthTypeOfAutocomplete 'resolve' or 'off'
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ parameters:
- '#::(_validateMyObject|select_company)\(\) expects array<string#'
- '# getCommonSubstitutionArray expects array#'
- '# ldap_search expects array\|LDAP#'
- '# ajax_combobox expects array#'
- '# FormWebPortal::selectForForms\(\) expects int, array#'
- '# Lettering::getBankLinesFromFkDocAndDocType\(\) expects array#'
- '# (Odf) constructor expects #'
Expand Down

0 comments on commit a185fb4

Please sign in to comment.