From d30d8b520165f3b3cc46f0ab8b96b6ec78edf10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 22:32:34 +0200 Subject: [PATCH] fix phpstan (#31191) * fix phpstan * fix phpstan * fix phpstan --- htdocs/core/class/extrafields.class.php | 6 +++--- phpstan.neon.dist | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 6012ea6c2cf..5416fc64f39 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -11,7 +11,7 @@ * Copyright (C) 2017 Nicolas ZABOURI * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2022 Antonin MARCHAL - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW * * 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 @@ -631,7 +631,7 @@ class ExtraFields * @param string $attrname Name of attribute * @param string $label Label of attribute * @param string $type Type of attribute ('boolean', 'int', 'varchar', 'text', 'html', 'date', 'datetime','price','phone','mail','password','url','select','checkbox', ...) - * @param int $length Length of attribute + * @param string $length Size/length of attribute ('5', '24,8', ...) * @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...) * @param int $unique Is field unique or not * @param int $required Is field required or not @@ -783,7 +783,7 @@ class ExtraFields * @param string $attrname Name of attribute * @param string $label Label of attribute * @param string $type Type of attribute - * @param int $size Length of attribute + * @param string $size Size/length of attribute ('5', '24,8', ...) * @param string $elementtype Element type ('member', 'product', 'thirdparty', ...) * @param int $unique Is field unique or not * @param int $required Is field required or not diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3f73056a52a..f4ef954ac4c 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -75,7 +75,7 @@ parameters: - '#::(options)\(\) expects int\|string#' - '# (print_barre_liste|dol_substr) expects int\|null#' - '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#' - - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|update_label|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#' + - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#' - '#on array{url: mixed} in empty\(\) does not exist.#' - '#EvalMath::trigger\(\) expects string, int given#' - '# Diff::generatePartialDiff\(\) expects array#'