diff --git a/dev/build/phpstan/phpstan-baseline.neon b/dev/build/phpstan/phpstan-baseline.neon index c06023c7b89..4e98d2d655e 100644 --- a/dev/build/phpstan/phpstan-baseline.neon +++ b/dev/build/phpstan/phpstan-baseline.neon @@ -12162,12 +12162,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php - - - message: '#^Property mod_asset_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/asset/mod_asset_standard.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -12276,24 +12270,12 @@ parameters: count: 1 path: ../../../htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php - - - message: '#^Property mod_bom_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/bom/mod_bom_standard.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType count: 1 path: ../../../htdocs/core/modules/cheque/doc/pdf_blochet.class.php - - - message: '#^Property mod_chequereceipt_mint\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/cheque/mod_chequereceipt_mint.php - - message: '#^Parameter \#1 \$object of method CommonDocGenerator\:\:get_substitutionarray_each_var_object\(\) expects array\, Commande given\.$#' identifier: argument.type @@ -12486,12 +12468,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php - - - message: '#^Property mod_commande_marbre\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/commande/mod_commande_marbre.php - - message: '#^Parameter \#1 \$object of method CommonDocGenerator\:\:get_substitutionarray_each_var_object\(\) expects array\, Contrat given\.$#' identifier: argument.type @@ -12630,12 +12606,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/delivery/doc/pdf_typhon.modules.php - - - message: '#^Property mod_delivery_jade\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/delivery/mod_delivery_jade.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -12792,12 +12762,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/expedition/doc/pdf_rouget.modules.php - - - message: '#^Property mod_expedition_safor\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/expedition/mod_expedition_safor.php - - message: '#^Parameter \#3 \$posy of method pdf_standard_expensereport\:\:tablePayments\(\) expects int, float given\.$#' identifier: argument.type @@ -12852,12 +12816,6 @@ parameters: count: 6 path: ../../../htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php - - - message: '#^Property mod_expensereport_jade\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/expensereport/mod_expensereport_jade.php - - message: '#^Parameter \#1 \$object of method CommonDocGenerator\:\:get_substitutionarray_each_var_object\(\) expects array\, Facture given\.$#' identifier: argument.type @@ -13344,12 +13302,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php - - - message: '#^Property mod_pacific\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/fichinter/mod_pacific.php - - message: '#^Variable \$max might not be defined\.$#' identifier: variable.undefined @@ -13374,12 +13326,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php - - - message: '#^Property mod_evaluation_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/hrm/mod_evaluation_standard.php - - message: '#^Call to function is_array\(\) with non\-empty\-list\ will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -13848,24 +13794,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/modPrelevement.class.php - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProduct.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProduct.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 2 - path: ../../../htdocs/core/modules/modProduct.class.php - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' identifier: assign.propertyType @@ -13890,66 +13818,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/modProduct.class.php - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProductBatch.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProductBatch.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 2 - path: ../../../htdocs/core/modules/modProductBatch.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProjet.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProjet.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProjet.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProjet.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 2 - path: ../../../htdocs/core/modules/modProjet.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 1 - path: ../../../htdocs/core/modules/modProjet.class.php - - - - message: '#^Property DolibarrModules\:\:\$const \(array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#' - identifier: assign.propertyType - count: 7 - path: ../../../htdocs/core/modules/modProjet.class.php - - message: '#^Property DolibarrModules\:\:\$import_convertvalue_array \(array\\>\) does not accept non\-empty\-array\\>\.$#' identifier: assign.propertyType @@ -14364,12 +14232,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/mrp/doc/pdf_vinci.modules.php - - - message: '#^Property mod_mo_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/mrp/mod_mo_standard.php - - message: '#^Negated boolean expression is always true\.$#' identifier: booleanNot.alwaysTrue @@ -14388,12 +14250,6 @@ parameters: count: 2 path: ../../../htdocs/core/modules/oauth/stripelive_oauthcallback.php - - - message: '#^Property mod_payment_cicada\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/payment/mod_payment_cicada.php - - message: '#^Variable \$response might not be defined\.$#' identifier: variable.undefined @@ -14502,18 +14358,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/product/modules_product.class.php - - - message: '#^Property mod_lot_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/product_batch/mod_lot_standard.php - - - - message: '#^Property mod_sn_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/product_batch/mod_sn_standard.php - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -14586,12 +14430,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/project/doc/pdf_timespent.modules.php - - - message: '#^Property mod_project_simple\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/project/mod_project_simple.php - - message: '#^Call to function is_array\(\) with array will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -14634,12 +14472,6 @@ parameters: count: 2 path: ../../../htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php - - - message: '#^Property mod_task_simple\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/project/task/mod_task_simple.php - - message: '#^Parameter \#1 \$object of method CommonDocGenerator\:\:get_substitutionarray_each_var_object\(\) expects array\, Propal given\.$#' identifier: argument.type @@ -14826,12 +14658,6 @@ parameters: count: 2 path: ../../../htdocs/core/modules/propale/doc/pdf_cyan.modules.php - - - message: '#^Property mod_propale_marbre\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/propale/mod_propale_marbre.php - - message: '#^Call to function is_object\(\) with object will always evaluate to true\.$#' identifier: function.alreadyNarrowedType @@ -15120,12 +14946,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php - - - message: '#^Property mod_stocktransfer_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php - - message: '#^Parameter \#1 \$object of method CommonDocGenerator\:\:get_substitutionarray_each_var_object\(\) expects array\, FactureFournisseur given\.$#' identifier: argument.type @@ -15390,12 +15210,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php - - - message: '#^Property mod_commande_fournisseur_muguet\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php - - message: '#^Variable \$max might not be defined\.$#' identifier: variable.undefined @@ -15444,12 +15258,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php - - - message: '#^Property mod_supplier_payment_bronan\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php - - message: '#^Parameter \#1 \$line of method CommonDocGenerator\:\:get_substitutionarray_lines\(\) expects CommonObjectLine, CommonObject\|stdClass given\.$#' identifier: argument.type @@ -15600,24 +15408,12 @@ parameters: count: 1 path: ../../../htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php - - - message: '#^Property mod_supplier_proposal_marbre\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php - - message: '#^Variable \$contactobject might not be defined\.$#' identifier: variable.undefined count: 1 path: ../../../htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php - - - message: '#^Property mod_ticket_simple\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/ticket/mod_ticket_simple.php - - message: '#^Variable \$contactobject might not be defined\.$#' identifier: variable.undefined @@ -15654,12 +15450,6 @@ parameters: count: 1 path: ../../../htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php - - - message: '#^Property mod_workstation_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/core/modules/workstation/mod_workstation_standard.php - - message: '#^Negated boolean expression is always false\.$#' identifier: booleanNot.alwaysFalse @@ -17113,8 +16903,8 @@ parameters: path: ../../../htdocs/ecm/dir_add_card.php - - message: '#^Variable \$extrafields might not be defined\.$#' - identifier: variable.undefined + message: '#^Parameter \#1 \$object of function ecm_prepare_head expects EcmDirectory, CommonObject given\.$#' + identifier: argument.type count: 1 path: ../../../htdocs/ecm/dir_card.php @@ -21318,12 +21108,6 @@ parameters: count: 1 path: ../../../htdocs/includes/odtphp/Segment.php - - - message: '#^Property Segment\:\:\$name has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/includes/odtphp/Segment.php - - message: '#^Property Segment\:\:\$odf has no type specified\.$#' identifier: missingType.property @@ -21336,18 +21120,6 @@ parameters: count: 1 path: ../../../htdocs/includes/odtphp/Segment.php - - - message: '#^Property Segment\:\:\$xml has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/includes/odtphp/Segment.php - - - - message: '#^Property Segment\:\:\$xmlParsed has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/includes/odtphp/Segment.php - - message: '#^Class SegmentIterator implements generic interface RecursiveIterator but does not specify its types\: TKey, TValue$#' identifier: missingType.generics @@ -24222,12 +23994,6 @@ parameters: count: 2 path: ../../../htdocs/partnership/class/partnershiputils.class.php - - - message: '#^Property mod_partnership_standard\:\:\$prefix has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../../htdocs/partnership/core/modules/partnership/mod_partnership_standard.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse @@ -25134,12 +24900,6 @@ parameters: count: 8 path: ../../../htdocs/product/price.php - - - message: '#^Variable \$db might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../../htdocs/product/price.php - - message: '#^Variable \$extrafield_values might not be defined\.$#' identifier: variable.undefined @@ -25242,12 +25002,6 @@ parameters: count: 1 path: ../../../htdocs/product/reassortlot.php - - - message: '#^Variable \$extrafields might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../../htdocs/product/reassortlot.php - - message: '#^Variable \$type might not be defined\.$#' identifier: variable.undefined diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 65d97c5a1e7..598f3de73fe 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -188,7 +188,7 @@ return [ 'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/modules_facture.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/fichinter/mod_pacific.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanTypeMismatchProperty'], diff --git a/htdocs/core/modules/asset/mod_asset_standard.php b/htdocs/core/modules/asset/mod_asset_standard.php index d3db8afc832..9e6f8e128ea 100644 --- a/htdocs/core/modules/asset/mod_asset_standard.php +++ b/htdocs/core/modules/asset/mod_asset_standard.php @@ -1,8 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2022-2024 Frédéric France - * Copyright (C) 2022 Frédéric France + * Copyright (C) 2022-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -39,6 +38,9 @@ class mod_asset_standard extends ModeleNumRefAsset */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'ASSET'; /** diff --git a/htdocs/core/modules/bom/mod_bom_standard.php b/htdocs/core/modules/bom/mod_bom_standard.php index e4d93ed4014..d4c75c1068d 100644 --- a/htdocs/core/modules/bom/mod_bom_standard.php +++ b/htdocs/core/modules/bom/mod_bom_standard.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -37,6 +37,9 @@ class mod_bom_standard extends ModeleNumRefBoms */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'BOM'; /** diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php index be85808b48d..7facfcedfbb 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -37,6 +37,9 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'CHK'; /** diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index 348f0839022..34ad5e13b4c 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -37,6 +37,9 @@ class mod_commande_marbre extends ModeleNumRefCommandes */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'CO'; /** diff --git a/htdocs/core/modules/delivery/mod_delivery_jade.php b/htdocs/core/modules/delivery/mod_delivery_jade.php index 37e6112b81c..50cd56bda13 100644 --- a/htdocs/core/modules/delivery/mod_delivery_jade.php +++ b/htdocs/core/modules/delivery/mod_delivery_jade.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Rodolphe Quiedeville * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -59,6 +59,9 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder */ public $name = 'Jade'; + /** + * @var string prefix + */ public $prefix = 'BL'; diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index 55f109e47d5..6ddd5231a67 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -36,6 +36,9 @@ class mod_expedition_safor extends ModelNumRefExpedition */ public $version = 'dolibarr'; + /** + * @var string prefix + */ public $prefix = 'SH'; /** diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 60600810b1f..886f671a9cf 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -36,6 +36,9 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'ER'; /** diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index 15ee3e339b3..f6eaa326c75 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2008 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -38,6 +38,9 @@ class mod_pacific extends ModeleNumRefFicheinter */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'FI'; /** diff --git a/htdocs/core/modules/hrm/mod_evaluation_standard.php b/htdocs/core/modules/hrm/mod_evaluation_standard.php index 56555a4b8f7..70a65e99913 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_standard.php +++ b/htdocs/core/modules/hrm/mod_evaluation_standard.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -38,6 +38,9 @@ class mod_evaluation_standard extends ModeleNumRefEvaluation */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'EVAL'; /** diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index a2de9b27688..7b87d30b1f4 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -8,7 +8,8 @@ * Copyright (C) 2014 Christophe Battarel * Copyright (C) 2014 Cedric Gross * Copyright (C) 2020-2021 Alexandre Spangaro - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * 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 @@ -78,29 +79,30 @@ class modProduct extends DolibarrModules $this->langfiles = array("products", "companies", "stocks", "bills"); // Constants - $this->const = array(); - $r = 0; + $this->const = [ + [ + "PRODUCT_CODEPRODUCT_ADDON", + "chaine", + "mod_codeproduct_leopard", + 'Module to control product codes', + 0, + ], + [ - $this->const[$r][0] = "PRODUCT_CODEPRODUCT_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "mod_codeproduct_leopard"; - $this->const[$r][3] = 'Module to control product codes'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "PRODUCT_PRICE_UNIQ"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = 'pricing rule by default'; - $this->const[$r][4] = 0; - $r++; - - /*$this->const[$r][0] = "PRODUCT_ADDON_PDF"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "standard"; - $this->const[$r][3] = 'Default module for document generation'; - $this->const[$r][4] = 0; - $r++;*/ + "PRODUCT_PRICE_UNIQ", + "chaine", + "1", + 'pricing rule by default', + 0, + ], + /*[ + "PRODUCT_ADDON_PDF", + "chaine", + "standard", + 'Default module for document generation', + 0, + ],*/ + ]; // Boxes $this->boxes = array( @@ -162,17 +164,25 @@ class modProduct extends DolibarrModules $this->menu = 1; // This module adds menu entries. They are coded into menu manager. /* We can't enable this here because it must be enabled in both product and service module and this creates duplicate inserts - $r=0; - $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=admintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode - 'type'=>'left', // This is a Left menu entry - 'titre'=>'ProductVatMassChange', - 'url'=>'/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools', - 'langs'=>'products', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>300, - 'enabled'=>'isModEnabled("product") && preg_match(\'/^(admintools|all)/\',$leftmenu)', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. - 'perms'=>'1', // Use 'perms'=>'$user->hasRight("mymodule","level1","level2")' if you want your menu with a permission rules - 'target'=>'', - 'user'=>0); // 0=Menu for internal users, 1=external users, 2=both + $r = 0; + $this->menu[$r] = array( + // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'fk_menu' => 'fk_mainmenu=home,fk_leftmenu=admintools', + // This is a Left menu entry + 'type' => 'left', + 'titre' => 'ProductVatMassChange', + 'url' => '/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools', + // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'langs' => 'products', + 'position' => 300, + // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected. + 'enabled' => 'isModEnabled("product") && preg_match(\'/^(admintools|all)/\',$leftmenu)', + // Use 'perms'=>'$user->hasRight("mymodule","level1","level2")' if you want your menu with a permission rules + 'perms' => '1', + 'target' => '', + // 0=Menu for internal users, 1=external users, 2=both + 'user' => 0 + ); $r++; */ diff --git a/htdocs/core/modules/modProductBatch.class.php b/htdocs/core/modules/modProductBatch.class.php index b0c6a41ea8b..e64ffe6c7c4 100644 --- a/htdocs/core/modules/modProductBatch.class.php +++ b/htdocs/core/modules/modProductBatch.class.php @@ -1,9 +1,10 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013-2014 Cedric GROSS - * Copyright (C) 2024 MDW +/* Copyright (C) 2003 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013-2014 Cedric GROSS + * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * 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 @@ -74,27 +75,25 @@ class modProductBatch extends DolibarrModules $this->requiredby = array(); // List of module ids to disable if this one is disabled $this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->phpmin = array(7, 0); // Minimum version of PHP required by module - $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->langfiles = array("productbatch"); // Constants - // Constants - $this->const = array(); - $r = 0; - - $this->const[$r][0] = "PRODUCTBATCH_LOT_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "mod_lot_free"; - $this->const[$r][3] = 'Module to control lot number'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "PRODUCTBATCH_SN_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "mod_sn_free"; - $this->const[$r][3] = 'Module to control serial number'; - $this->const[$r][4] = 0; - $r++; + $this->const = [ + [ + "PRODUCTBATCH_LOT_ADDON", + "chaine", + "mod_lot_free", + "Module to control lot number", + 0, + ], + [ + "PRODUCTBATCH_SN_ADDON", + "chaine", + "mod_sn_free", + "Module to control serial number", + 0, + ], + ]; $this->tabs = array(); diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index 77247881f2a..3019a0f590d 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -1,13 +1,13 @@ - * Copyright (C) 2004-2014 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2014 Charles-Fr BENKE - * Copyright (C) 2023 Gauthier VERDOL - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2003-2005 Rodolphe Quiedeville + * Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014 Charles-Fr BENKE + * Copyright (C) 2023 Gauthier VERDOL + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -74,57 +74,57 @@ class modProjet extends DolibarrModules $this->langfiles = array('projects'); // Constants - $this->const = array(); - $r = 0; - - $this->const[$r][0] = "PROJECT_ADDON_PDF"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "baleine"; - $this->const[$r][3] = 'Name of PDF/ODT project manager class'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "PROJECT_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "mod_project_simple"; - $this->const[$r][3] = 'Name of Numbering Rule project manager class'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "PROJECT_ADDON_PDF_ODT_PATH"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/projects"; - $this->const[$r][3] = ""; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "PROJECT_TASK_ADDON_PDF"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = ""; - $this->const[$r][3] = 'Name of PDF/ODT tasks manager class'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "PROJECT_TASK_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "mod_task_simple"; - $this->const[$r][3] = 'Name of Numbering Rule task manager class'; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "PROJECT_TASK_ADDON_PDF_ODT_PATH"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/tasks"; - $this->const[$r][3] = ""; - $this->const[$r][4] = 0; - $r++; - - $this->const[$r][0] = "PROJECT_USE_OPPORTUNITIES"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "1"; - $this->const[$r][3] = ""; - $this->const[$r][4] = 0; - $r++; + $this->const = [ + [ + "PROJECT_ADDON_PDF", + "chaine", + "baleine", + "Name of PDF/ODT project manager class", + 0, + ], + [ + "PROJECT_ADDON", + "chaine", + "mod_project_simple", + "Name of Numbering Rule project manager class", + 0, + ], + [ + "PROJECT_ADDON_PDF_ODT_PATH", + "chaine", + "DOL_DATA_ROOT/doctemplates/projects", + "", + 0, + ], + [ + "PROJECT_TASK_ADDON_PDF", + "chaine", + "", + "Name of PDF/ODT tasks manager class", + 0, + ], + [ + "PROJECT_TASK_ADDON", + "chaine", + "mod_task_simple", + "Name of Numbering Rule task manager class", + 0, + ], + [ + "PROJECT_TASK_ADDON_PDF_ODT_PATH", + "chaine", + "DOL_DATA_ROOT/doctemplates/tasks", + "", + 0, + ], + [ + "PROJECT_USE_OPPORTUNITIES", + "chaine", + "1", + "", + 0, + ], + ]; // Boxes $this->boxes = array( diff --git a/htdocs/core/modules/mrp/mod_mo_standard.php b/htdocs/core/modules/mrp/mod_mo_standard.php index 599ceef2c0d..039ec18eb61 100644 --- a/htdocs/core/modules/mrp/mod_mo_standard.php +++ b/htdocs/core/modules/mrp/mod_mo_standard.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -37,6 +37,9 @@ class mod_mo_standard extends ModeleNumRefMos */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'MO'; /** diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index e8dfe7810a4..e9e3a414949 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * 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 @@ -36,6 +37,9 @@ class mod_payment_cicada extends ModeleNumRefPayments */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'PAY'; /** diff --git a/htdocs/core/modules/product_batch/mod_lot_standard.php b/htdocs/core/modules/product_batch/mod_lot_standard.php index b3f8f9d99c2..209a811120c 100644 --- a/htdocs/core/modules/product_batch/mod_lot_standard.php +++ b/htdocs/core/modules/product_batch/mod_lot_standard.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2021 Christophe Battarel - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -38,6 +38,9 @@ class mod_lot_standard extends ModeleNumRefBatch */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'LOT'; /** diff --git a/htdocs/core/modules/product_batch/mod_sn_standard.php b/htdocs/core/modules/product_batch/mod_sn_standard.php index 4c4ab482bc0..b59e77a3e94 100644 --- a/htdocs/core/modules/product_batch/mod_sn_standard.php +++ b/htdocs/core/modules/product_batch/mod_sn_standard.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2021 Christophe Battarel - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -38,6 +38,9 @@ class mod_sn_standard extends ModeleNumRefBatch */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'SN'; /** diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index 5319b83156e..d6ad1781294 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -1,7 +1,7 @@ * Copyright (C) 2010 Laurent Destailleur - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -39,6 +39,9 @@ class mod_project_simple extends ModeleNumRefProjects */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'PJ'; /** diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index ed85363c7af..3647b6104fa 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -1,7 +1,7 @@ * Copyright (C) 2010 Laurent Destailleur - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -39,6 +39,9 @@ class mod_task_simple extends ModeleNumRefTask */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'TK'; /** diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index b6396ca96a0..4d2042dfa40 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -39,6 +39,9 @@ class mod_propale_marbre extends ModeleNumRefPropales */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'PR'; /** diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php index 2df9df5bbc5..e2f2335cb82 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -39,6 +39,9 @@ class mod_stocktransfer_standard extends ModeleNumRefStockTransfer */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'ST'; /** diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php index 2e5efa815f1..1599ca8e222 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -56,6 +56,9 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders */ public $name = 'Muguet'; + /** + * @var string prefix + */ public $prefix = 'PO'; // PO for "Purchase Order" diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php index 98a512c4246..8d9192cc6ff 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -37,6 +37,9 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'SPAY'; /** diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index 4c4c2486a29..ca34cc22b9f 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -39,6 +39,9 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'RQ'; // RQ = Request for quotation /** diff --git a/htdocs/core/modules/ticket/mod_ticket_simple.php b/htdocs/core/modules/ticket/mod_ticket_simple.php index 59db009125f..576da3eff83 100644 --- a/htdocs/core/modules/ticket/mod_ticket_simple.php +++ b/htdocs/core/modules/ticket/mod_ticket_simple.php @@ -1,7 +1,7 @@ * Copyright (C) 2010 Laurent Destailleur - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -38,6 +38,9 @@ class mod_ticket_simple extends ModeleNumRefTicket */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'TS'; /** diff --git a/htdocs/core/modules/workstation/mod_workstation_standard.php b/htdocs/core/modules/workstation/mod_workstation_standard.php index e8f51af201c..7950cd488f2 100644 --- a/htdocs/core/modules/workstation/mod_workstation_standard.php +++ b/htdocs/core/modules/workstation/mod_workstation_standard.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2020 Gauthier VERDOL - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -38,6 +38,9 @@ class mod_workstation_standard extends ModeleNumRefWorkstation */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'WKSTATION'; /** diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index b81fe141b32..fcfff57f74a 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/ecm/class/htmlecm.form.class.php'; /** * @var Conf $conf * @var DoliDB $db + * @var ExtraFields $extrafields * @var HookManager $hookmanager * @var Translate $langs * @var User $user diff --git a/htdocs/includes/odtphp/Segment.php b/htdocs/includes/odtphp/Segment.php index 3e8675c65a9..95b1c75d35c 100644 --- a/htdocs/includes/odtphp/Segment.php +++ b/htdocs/includes/odtphp/Segment.php @@ -16,8 +16,24 @@ class SegmentException extends Exception */ class Segment implements IteratorAggregate, Countable { + /** + * @var string + */ protected $xml; + + /** + * @var string + */ + protected $savxml; + + /** + * @var string + */ protected $xmlParsed = ''; + + /** + * @var string + */ protected $name; protected $children = array(); protected $vars = array(); @@ -30,7 +46,7 @@ class Segment implements IteratorAggregate, Countable * * @param string $name name of the segment to construct * @param string $xml XML tree of the segment - * @param string $odf odf + * @param Odf $odf odf */ public function __construct($name, $xml, $odf) { diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php index 710fbc60d38..90c84a2909f 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2024 MDW + * Copyright (C) 2025 Frédéric France * * 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 @@ -37,6 +38,9 @@ class mod_partnership_standard extends ModeleNumRefPartnership */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + /** + * @var string prefix + */ public $prefix = 'PSHIP'; /** diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 2ca40d0bad0..c0d130de0db 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -11,7 +11,7 @@ * Copyright (C) 2015-2023 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Ferran Marcet - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2024 MDW * Copyright (C) 2024 Mélina Joum @@ -45,13 +45,6 @@ require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_expression.cl require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -$prodcustprice = null; -if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { - require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; - - $prodcustprice = new ProductCustomerPrice($db); -} - /** * @var Conf $conf * @var DoliDB $db @@ -61,6 +54,13 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT * @var User $user */ +$prodcustprice = null; +if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; + + $prodcustprice = new ProductCustomerPrice($db); +} + // Load translation files required by the page $langs->loadLangs(array('products', 'bills', 'companies', 'other')); diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 7093fedc7b4..d2f3caf3442 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -7,7 +7,7 @@ * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2019 Juanjo Menent * Copyright (C) 2021 Noé Cendrier - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * * 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 @@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; /** * @var Conf $conf * @var DoliDB $db + * @var ExtraFields $extrafields * @var HookManager $hookmanager * @var Translate $langs * @var User $user @@ -54,7 +55,7 @@ $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choi $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$mode = GETPOST('mode', 'aZ'); +$mode = GETPOST('mode', 'aZ'); $sref = GETPOST("sref", 'alpha'); $snom = GETPOST("snom", 'alpha');