2
0
forked from Wavyzz/dolibarr

Qual: Fix phan/phpstan notices (#31259)

# Qual: Fix phan/phpstan notices

Fix notices by adjusting phpdoc
This commit is contained in:
MDW
2024-10-04 08:25:17 +02:00
committed by GitHub
parent 88879e0708
commit 6e01a60f59
3 changed files with 12 additions and 11 deletions

View File

@@ -12424,7 +12424,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
* @param string $text Optional : short label on button. Can be escaped HTML content or full simple text.
* @param string $actionType 'default', 'danger', 'email', 'clone', 'cancel', 'delete', ...
*
* @param string|array<int,array{lang:string,enabled:bool,perm:bool,label:string,url:string,urlroot:string}> $url Url for link or array of subbutton description
* @param string|array<int,array{lang:string,enabled:bool,perm:bool,label:string,url:string,urlroot?:string,isDropDown?:int<0,1>}> $url Url for link or array of subbutton description
*
* Example when an array is used:
* $arrayforbutaction = array(
@@ -12434,7 +12434,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
* @param string $id Attribute id of action button. Example 'action-delete'. This can be used for full ajax confirm if this code is reused into the ->formconfirm() method.
* @param int|boolean $userRight User action right
* // phpcs:disable
* @param array<string,mixed> $params = [ // Various params for future : recommended rather than adding more function arguments
* @param array{confirm?:array{url?:string,title?:string,content?:string,action-btn-label?:string,cancel-btn-label?:string,modal?:bool},attr?:array<string,mixed>,areDropdownButtons?:bool,backtopage?:string,lang?:string,enabled?:bool,perm?:int<0,1>,label?:string,url?:string,isDropdown?:int<0,1>,isDropDown?:int<0,1>} $params = [ // Various params for future : recommended rather than adding more function arguments
* 'attr' => [ // to add or override button attributes
* 'xxxxx' => '', // your xxxxx attribute you want
* 'class' => 'reposition', // to add more css class to the button class attribute
@@ -12447,7 +12447,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
* 'cancel-btn-label' => '', // Override label of cancel button, if empty default label use "CloseDialog" lang key
* 'content' => '', // Override text of content, if empty default content use "ConfirmBtnCommonContent" lang key
* 'modal' => true, // true|false to display dialog as a modal (with dark background)
* 'isDropDrown' => false, // true|false to display dialog as a dropdown list (css dropdown-item with dark background)
* 'isDropDown' => false, // true|false to display dialog as a dropdown list (css dropdown-item with dark background)
* ],
* ]
* // phpcs:enable
@@ -12468,7 +12468,6 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url =
$out = '';
// @phan-suppress-next-line PhanTypeInvalidDimOffset
if (isset($params["areDropdownButtons"]) && $params["areDropdownButtons"] === false) {
foreach ($url as $button) {
if (!empty($button['lang'])) {

View File

@@ -247,7 +247,7 @@ class Ticket extends CommonObject
public $ip;
/**
* @var Ticket Save the ticket before an update operation (for triggers)
* @var static Save the ticket before an update operation (for triggers)
*/
public $oldcopy;

View File

@@ -114,6 +114,8 @@ parameters:
- '# (?:Holiday::getNextNumRef\(\)|get_localtax|pdf_pagefoot|societe_prepare_head) expects Societe#'
- '# (?:Common(?:DocGenerator::get(?:(?:ExtrafieldsInHtml|_substitutionarray_lines)\(\))|Object::printO(?:(?:bject|rigin)Line\(\)))) expects CommonObjectLine#'
- '#colorHexToHsl expects float\|false, true#'
- '#function dolGetButtonAction expects array\{confirm\?: array.*confirm: true} given.#'
internalErrorsCountLimit: 50
cache:
nodesByFileCountMax: 512