diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index a2414d4521c..cf1c36f7c31 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -4182,12 +4182,6 @@ parameters: count: 3 path: ../../../htdocs/core/lib/invoice.lib.php - - - message: '#^Parameter \#1 \$array \(array\{mixed, mixed, mixed, mixed, mixed, non\-falsy\-string\}\) of array_values is already a list, call has no effect\.$#' - identifier: arrayValues.list - count: 1 - path: ../../../htdocs/core/lib/invoice.lib.php - - message: '#^Result of \|\| is always true\.$#' identifier: booleanOr.alwaysTrue @@ -4758,12 +4752,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/modRecruitment.class.php - - - message: '#^Property DolibarrModules\:\:\$export_special_array \(array\\}\|string\>\>\) does not accept non\-empty\-array\\}\|string\>\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modStock.class.php - - message: '#^Property DolibarrModules\:\:\$export_permission \(array\\>\) does not accept non\-empty\-array\\>\.$#' identifier: assign.propertyType @@ -4812,18 +4800,6 @@ parameters: count: 2 path: ../../../htdocs/core/modules/oauth/stripelive_oauthcallback.php - - - message: '#^Variable \$response might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/modules/printing/printgcp.modules.php - - - - message: '#^Variable \$token might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/core/modules/printing/printgcp.modules.php - - message: '#^Comparison operation "\>" between 1 and 0 is always true\.$#' identifier: greater.alwaysTrue @@ -4854,12 +4830,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php - - - message: '#^Variable \$objectdetail might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -4896,12 +4866,6 @@ parameters: count: 2 path: ../../../htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php - - - message: '#^Variable \$listlines might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -4920,12 +4884,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/societe/doc/doc_generic_odt.modules.php - - - message: '#^Variable \$contactstatic might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/modules/societe/doc/doc_generic_odt.modules.php - - message: '#^Right side of \|\| is always false\.$#' identifier: booleanOr.rightAlwaysFalse @@ -5004,12 +4962,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php - - - message: '#^Variable \$contactobject might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -5028,18 +4980,6 @@ parameters: count: 1 path: ../../../htdocs/core/photos_resize.php - - - message: '#^Variable \$dolibarr_main_data_root might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/photos_resize.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/core/photos_resize.php - - message: '#^Loose comparison using \=\= between 1 and 2 will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -5052,78 +4992,12 @@ parameters: count: 1 path: ../../../htdocs/core/search_page.php - - - message: '#^Variable \$id might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/tpl/bloc_comment.tpl.php - - - - message: '#^Variable \$idcomment might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/core/tpl/bloc_comment.tpl.php - - - - message: '#^Variable \$title might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/bloc_showhide.tpl.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../../htdocs/core/tpl/contacts.tpl.php - - - message: '#^Variable \$filearray might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/document_actions_post_headers.tpl.php - - - - message: '#^Variable \$permissiontoadd might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/tpl/document_actions_post_headers.tpl.php - - - - message: '#^Variable \$sortfield might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/document_actions_post_headers.tpl.php - - - - message: '#^Variable \$sortorder might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/document_actions_post_headers.tpl.php - - - - message: '#^Variable \$object might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_array_fields.tpl.php - - - - message: '#^Variable \$i might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_print_fields.tpl.php - - - - message: '#^Variable \$totalarray might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/tpl/extrafields_list_print_fields.tpl.php - - - - message: '#^Variable \$param might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/extrafields_list_search_title.tpl.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -5136,12 +5010,6 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/filemanager.tpl.php - - - message: '#^Variable \$sql might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/tpl/list_print_total.tpl.php - - message: '#^Left side of && is always true\.$#' identifier: booleanAnd.leftAlwaysTrue @@ -5160,42 +5028,12 @@ parameters: count: 1 path: ../../../htdocs/core/tpl/objectline_create.tpl.php - - - message: '#^Variable \$i might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$var might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/objectline_edit.tpl.php - - - - message: '#^Variable \$action might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/objectline_title.tpl.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse count: 1 path: ../../../htdocs/core/tpl/objectline_view.tpl.php - - - message: '#^Variable \$objp might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/core/tpl/objectline_view.tpl.php - - - - message: '#^Variable \$langs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/core/tpl/originproductline.tpl.php - - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -5262,12 +5100,6 @@ parameters: count: 1 path: ../../../htdocs/debugbar/class/autoloader.php - - - message: '#^Variable \$objectsrc might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/delivery/card.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -5280,30 +5112,12 @@ parameters: count: 1 path: ../../../htdocs/document.php - - - message: '#^If condition is always false\.$#' - identifier: if.alwaysFalse - count: 1 - path: ../../../htdocs/don/paiement/list.php - - - - message: '#^Left side of \|\| is always false\.$#' - identifier: booleanOr.leftAlwaysFalse - count: 1 - path: ../../../htdocs/don/paiement/list.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse count: 1 path: ../../../htdocs/don/paiement/list.php - - - message: '#^Variable \$arrayofselected might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/don/paiement/list.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -5334,12 +5148,6 @@ parameters: count: 1 path: ../../../htdocs/ecm/search.php - - - message: '#^Variable \$param might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/ecm/tpl/enablefiletreeajax.tpl.php - - message: '#^Call to function is_array\(\) with list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -5490,18 +5298,6 @@ parameters: count: 1 path: ../../../htdocs/expedition/class/expeditionligne.class.php - - - message: '#^Variable \$mesgs might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/expedition/contact.php - - - - message: '#^Variable \$objectsrc might not be defined\.$#' - identifier: variable.undefined - count: 8 - path: ../../../htdocs/expedition/contact.php - - message: '#^Loose comparison using \=\= between ''commande''\|null and ''propal'' will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -5514,12 +5310,6 @@ parameters: count: 2 path: ../../../htdocs/expedition/dispatch.php - - - message: '#^Variable \$objectsrc might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/expedition/document.php - - message: '#^Call to function method_exists\(\) with Expedition and ''fetch_lines'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -5532,24 +5322,12 @@ parameters: count: 1 path: ../../../htdocs/expedition/list.php - - - message: '#^Variable \$objectsrc might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/expedition/note.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue count: 1 path: ../../../htdocs/expedition/shipment.php - - - message: '#^Variable \$product might not be defined\.$#' - identifier: variable.undefined - count: 6 - path: ../../../htdocs/expedition/shipment.php - - message: '#^Variable \$socid might not be defined\.$#' identifier: variable.undefined @@ -5688,12 +5466,6 @@ parameters: count: 1 path: ../../../htdocs/fichinter/card.php - - - message: '#^Variable \$classname might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/fichinter/card.php - - message: '#^Right side of && is always false\.$#' identifier: booleanAnd.rightAlwaysFalse @@ -5724,12 +5496,6 @@ parameters: count: 10 path: ../../../htdocs/fourn/card.php - - - message: '#^Variable \$num might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/fourn/card.php - - message: '#^Variable \$contact might not be defined\.$#' identifier: variable.undefined @@ -5850,12 +5616,6 @@ parameters: count: 2 path: ../../../htdocs/fourn/commande/card.php - - - message: '#^Variable \$classname might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/fourn/commande/card.php - - message: '#^Right side of && is always false\.$#' identifier: booleanAnd.rightAlwaysFalse @@ -5868,12 +5628,6 @@ parameters: count: 2 path: ../../../htdocs/fourn/commande/dispatch.php - - - message: '#^Variable \$product might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/fourn/commande/dispatch.php - - message: '#^Loose comparison using \=\= between 0\|1\|2\|3\|4\|5\|9 and 7 will always evaluate to false\.$#' identifier: equal.alwaysFalse @@ -5886,12 +5640,6 @@ parameters: count: 1 path: ../../../htdocs/fourn/commande/list.php - - - message: '#^Variable \$socid might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../../htdocs/fourn/contact.php - - message: '#^Variable \$maxlength might not be defined\.$#' identifier: variable.undefined @@ -5916,12 +5664,6 @@ parameters: count: 2 path: ../../../htdocs/fourn/facture/card.php - - - message: '#^Variable \$classname might not be defined\.$#' - identifier: variable.undefined - count: 3 - path: ../../../htdocs/fourn/facture/card.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -6012,12 +5754,6 @@ parameters: count: 1 path: ../../../htdocs/holiday/card_group.php - - - message: '#^Variable \$errors might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/holiday/card_group.php - - message: '#^Call to function method_exists\(\) with \$this\(Holiday\) and ''getLibStatut'' will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -6072,12 +5808,6 @@ parameters: count: 2 path: ../../../htdocs/holiday/define_holiday.php - - - message: '#^Variable \$morefilter might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/holiday/list.php - - message: '#^Variable \$search_month_update might not be defined\.$#' identifier: variable.undefined @@ -6090,30 +5820,12 @@ parameters: count: 1 path: ../../../htdocs/holiday/list.php - - - message: '#^Variable \$arraytypeleaves might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/holiday/month_report.php - - message: '#^Ternary operator condition is always false\.$#' identifier: ternary.alwaysFalse count: 1 path: ../../../htdocs/holiday/view_log.php - - - message: '#^Variable \$search_status might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/holiday/view_log.php - - - - message: '#^Variable \$user might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/holiday/view_log.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -6330,12 +6042,6 @@ parameters: count: 1 path: ../../../htdocs/hrm/establishment/card.php - - - message: '#^Variable \$k might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/hrm/evaluation_card.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -9318,12 +9024,6 @@ parameters: count: 1 path: ../../../htdocs/reception/list.php - - - message: '#^Variable \$type might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/reception/list.php - - message: '#^If condition is always true\.$#' identifier: if.alwaysTrue @@ -10452,12 +10152,6 @@ parameters: count: 1 path: ../../../htdocs/webhook/class/target.class.php - - - message: '#^Left side of && is always true\.$#' - identifier: booleanAnd.leftAlwaysTrue - count: 1 - path: ../../../htdocs/webhook/class/target.class.php - - message: '#^Variable \$soc might not be defined\.$#' identifier: variable.undefined @@ -10722,12 +10416,6 @@ parameters: count: 1 path: ../../../htdocs/website/samples/wrapper.php - - - message: '#^Variable \$num in isset\(\) always exists and is not nullable\.$#' - identifier: isset.variable - count: 1 - path: ../../../scripts/bank/export-bank-receipts.php - - message: '#^Result of \|\| is always false\.$#' identifier: booleanOr.alwaysFalse