forked from Wavyzz/dolibarr
Qual: Fix some CommonIncoterm/DocGenerator/People typings (#30940)
* Fix extraparams property typing * Fix argument typing * Fix 'status' argument type in calls to dolGetButtonTitle * Fix argument2 for price to 1 (was 2) * Fix deliveryreceipt argument * Fix PHPDoc dol_sort_array * Fix range for int argument * Fix arg type for str_pad and add some PHPDoc * Fix natsort value for dol_sort_array * Fix arguments on calls to dol_sort_array * Reduce phpstan exceptions * Qual: Add type hints for Stripe objects # Qual: Add type hints for Stripe objects Suggest the more specific implementation of the StripObject. * Typing, initialisation * Qual: Fix undeclared variables * Update phan baseline * Update baseline * Qual: Add type hints for Stripe objects # Qual: Add type hints for Stripe objects Suggest the more specific implementation of the StripObject. * Add PHPDoc for host class properties * Ignore false positive (phan) for deprecated property * Improve typing * Update baseline
This commit is contained in:
@@ -838,7 +838,7 @@ function dolObfuscateEmail($mail, $replace = "*", $nbreplace = 8, $nbdisplaymail
|
||||
* Return lines of an html table from an array
|
||||
* Used by array2table function only
|
||||
*
|
||||
* @param array $data Array of data
|
||||
* @param array<null|int|float|string> $data Array of data
|
||||
* @param string $troptions Options for tr
|
||||
* @param string $tdoptions Options for td
|
||||
* @return string
|
||||
@@ -847,7 +847,7 @@ function array2tr($data, $troptions = '', $tdoptions = '')
|
||||
{
|
||||
$text = '<tr '.$troptions.'>';
|
||||
foreach ($data as $key => $item) {
|
||||
$text .= '<td '.$tdoptions.'>'.$item.'</td>';
|
||||
$text .= '<td '.$tdoptions.'>'.((string) $item).'</td>';
|
||||
}
|
||||
$text .= '</tr>';
|
||||
return $text;
|
||||
@@ -856,7 +856,7 @@ function array2tr($data, $troptions = '', $tdoptions = '')
|
||||
/**
|
||||
* Return an html table from an array
|
||||
*
|
||||
* @param array $data Array of data
|
||||
* @param array<int|string,null|string|int|float> $data Array of data
|
||||
* @param int $tableMarkup Table markup
|
||||
* @param string $tableoptions Options for table
|
||||
* @param string $troptions Options for tr
|
||||
@@ -874,8 +874,8 @@ function array2table($data, $tableMarkup = 1, $tableoptions = '', $troptions = '
|
||||
$text .= array2tr($item, $troptions, $tdoptions);
|
||||
} else {
|
||||
$text .= '<tr '.$troptions.'>';
|
||||
$text .= '<td '.$tdoptions.'>'.$key.'</td>';
|
||||
$text .= '<td '.$tdoptions.'>'.$item.'</td>';
|
||||
$text .= '<td '.$tdoptions.'>'.((string) $key).'</td>';
|
||||
$text .= '<td '.$tdoptions.'>'.((string) $item).'</td>';
|
||||
$text .= '</tr>';
|
||||
}
|
||||
}
|
||||
@@ -1406,7 +1406,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
||||
$maskrefclient_maskbefore = '{'.$maskrefclient.'}';
|
||||
$maskrefclient_maskafter = $maskrefclient_clientcode;
|
||||
if (dol_strlen($maskrefclient_maskcounter) > 0) {
|
||||
$maskrefclient_maskafter .= str_pad($maskrefclient_counter, dol_strlen($maskrefclient_maskcounter), "0", STR_PAD_LEFT);
|
||||
$maskrefclient_maskafter .= str_pad((string) $maskrefclient_counter, dol_strlen($maskrefclient_maskcounter), "0", STR_PAD_LEFT);
|
||||
}
|
||||
$numFinal = str_replace($maskrefclient_maskbefore, $maskrefclient_maskafter, $numFinal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user