diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 72d62adf07b..bd8bb9a3462 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,27 +9,29 @@ */ return [ // # Issue statistics: - // PhanPluginUnknownPropertyType : 2060+ occurrences - // PhanPossiblyUndeclaredGlobalVariable : 1350+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 1220+ occurrences - // PhanPluginUnknownObjectMethodCall : 1050+ occurrences - // PhanUndeclaredProperty : 900+ occurrences - // PhanPluginUnknownArrayMethodParamType : 750+ occurrences - // PhanUndeclaredGlobalVariable : 730+ occurrences - // PhanPluginUnknownArrayMethodReturnType : 580+ occurrences - // PhanPossiblyUndeclaredVariable : 410+ occurrences - // PhanTypeMismatchProperty : 270+ occurrences - // PhanPluginUnknownArrayFunctionParamType : 190+ occurrences - // PhanTypeMismatchArgumentNullableInternal : 160+ occurrences + // PhanPluginUnknownPropertyType : 1780+ occurrences + // PhanPossiblyUndeclaredGlobalVariable : 1340+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 1150+ occurrences + // PhanUndeclaredProperty : 920+ occurrences + // PhanPluginUnknownObjectMethodCall : 760+ occurrences + // PhanPluginUnknownArrayMethodParamType : 730+ occurrences + // PhanUndeclaredGlobalVariable : 720+ occurrences + // PhanPluginUnknownArrayMethodReturnType : 540+ occurrences + // PhanPossiblyUndeclaredVariable : 360+ occurrences + // PhanTypeMismatchProperty : 240+ occurrences + // PhanPluginUnknownArrayFunctionReturnType : 230+ occurrences + // PhanPluginUnknownArrayFunctionParamType : 180+ occurrences // PhanTypeExpectedObjectPropAccess : 150+ occurrences - // PhanUndeclaredMethod : 100+ occurrences + // PhanTypeMismatchArgumentNullableInternal : 150+ occurrences + // PhanPluginUnknownArrayPropertyType : 110+ occurrences + // PhanUndeclaredMethod : 95+ occurrences + // PhanPluginUndeclaredVariableIsset : 70+ occurrences // PhanPluginEmptyStatementIf : 65+ occurrences // PhanRedefineFunction : 55+ occurrences // PhanTypeMismatchDimFetch : 50+ occurrences - // PhanTypeSuspiciousNonTraversableForeach : 40+ occurrences - // PhanEmptyForeach : 20+ occurrences + // PhanTypeSuspiciousNonTraversableForeach : 45+ occurrences // PhanPossiblyNullTypeMismatchProperty : 20+ occurrences - // PhanRedefinedClassReference : 20+ occurrences + // PhanEmptyForeach : 15+ occurrences // PhanTypeComparisonFromArray : 15+ occurrences // PhanTypeExpectedObjectPropAccessButGotNull : 15+ occurrences // PhanUndeclaredConstant : 15+ occurrences @@ -38,89 +40,81 @@ return [ // PhanPluginDuplicateExpressionBinaryOp : 10+ occurrences // PhanPluginSuspiciousParamPosition : 10+ occurrences // PhanTypeMismatchDimFetchNullable : 10+ occurrences - // PhanEmptyFQSENInClasslike : 5 occurrences + // PhanTypeMismatchPropertyProbablyReal : 6 occurrences // PhanInvalidFQSENInClasslike : 4 occurrences - // PhanParamTooMany : 4 occurrences - // PhanRedefineClass : 3 occurrences - // PhanTypeConversionFromArray : 3 occurrences + // PhanPluginDuplicateArrayKey : 4 occurrences + // PhanEmptyFQSENInClasslike : 3 occurrences + // PhanParamTooMany : 2 occurrences // PhanAccessMethodProtected : 1 occurrence // PhanAccessPropertyStaticAsNonStatic : 1 occurrence - // PhanParamSignatureMismatch : 1 occurrence - // PhanPluginRedundantReturnComment : 1 occurrence - // PhanTypeArraySuspiciousNull : 1 occurrence - // PhanTypeMismatchReturn : 1 occurrence // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ 'htdocs/accountancy/admin/productaccount.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/accountancy/bookkeeping/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/bookkeeping/listbyaccount.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/accountancy/class/accountancyimport.class.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/accountancy/class/accountingaccount.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/accountancy/class/accountingjournal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/class/accountingaccount.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/accountancy/class/accountingjournal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/class/api_accountancy.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/accountancy/class/bookkeeping.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/class/lettering.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/accountancy/customer/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/journal/bankjournal.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/journal/expensereportsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/accountancy/journal/sellsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/accountancy/journal/sellsjournal.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/accountancy/journal/variousjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/supplier/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/tpl/export_journal.tpl.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/adherents/admin/member.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], + 'htdocs/adherents/admin/member.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => ['PhanPluginUnknownObjectMethodCall', /* Traverses Adherent as array, ignore */ 'PhanTypeSuspiciousNonTraversableForeach'], + 'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => [/* Traverses Adherent as array, ignore */ 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/adherents/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/adherents/class/adherent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/adherents/class/adherent_type.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/adherents/class/adherent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/adherents/class/adherent_type.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/class/adherentstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/adherents/class/api_members.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/adherents/class/api_subscriptions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/adherents/class/subscription.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/adherents/class/subscription.class.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/adherents/list.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/adherents/note.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/adherents/stats/geo.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/adherents/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/adherents/subscription.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/subscription/list.php' => ['PhanEmptyForeach'], - 'htdocs/adherents/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/adherents/type.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/admin/agenda_extsites.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/agenda_other.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/admin/agenda_reminder.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/admin/bank.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/bank.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/bank_extrafields.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/bankline_extrafields.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/barcode.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/admin/barcode.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/admin/bom.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/chequereceipts.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/admin/company.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/contract.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/admin/contract.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/delais.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch'], - 'htdocs/admin/delivery.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/admin/delivery.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/dict.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/admin/dolistore/class/dolistore.class.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/admin/ecm.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/emailcollector_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], + 'htdocs/admin/emailcollector_card.php' => ['PhanUndeclaredMethod'], 'htdocs/admin/emailcollector_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/eventorganization.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/expedition.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/admin/expensereport.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/expensereport_rules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/expensereport.php' => ['PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/admin/expensereport_rules.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/external_rss.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/fichinter.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/admin/fichinter.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/geoipmaxmind.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/admin/holiday.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/hrm.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/holiday.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/ihm.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/invoice.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/invoice.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/invoice_situation.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/admin/knowledgemanagement.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/knowledgemanagement.php' => [/* write_file, ignored: */ 'PhanUndeclaredMethod'], 'htdocs/admin/ldap_groups.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/ldap_users.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/admin/loan.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -132,26 +126,23 @@ return [ 'htdocs/admin/menus/edit.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/modulehelp.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], 'htdocs/admin/modules.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], - 'htdocs/admin/mrp.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/admin/mrp.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/mrp_extrafields.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/multicurrency.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/oauthlogintokens.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/admin/order.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/admin/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/admin/pdf.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/perms.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/admin/propal.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/admin/propal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/receiptprinter.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable'], - 'htdocs/admin/reception_setup.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/admin/reception_setup.php' => [/* write_file, ignored: */ 'PhanUndeclaredMethod', /* Real bug scandir, ignored: */ 'PhanUndeclaredProperty'], 'htdocs/admin/security.php' => ['PhanUndeclaredProperty'], 'htdocs/admin/security_file.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/spip.php' => ['PhanTypeMismatchDimFetch'], - 'htdocs/admin/stock.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], - 'htdocs/admin/stocktransfer.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], + 'htdocs/admin/stock.php' => ['PhanUndeclaredMethod'], + 'htdocs/admin/stocktransfer.php' => ['PhanUndeclaredMethod'], 'htdocs/admin/supplier_invoice.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/supplier_order.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/supplier_payment.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/supplier_proposal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/admin/supplier_payment.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', /* Actual issue: scandir access */ 'PhanUndeclaredProperty'], + 'htdocs/admin/supplier_proposal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], 'htdocs/admin/syslog.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/admin/system/constall.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/system/database-tables.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -167,9 +158,10 @@ return [ 'htdocs/admin/translation.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/admin/user.php' => ['PhanUndeclaredMethod'], 'htdocs/admin/usergroup.php' => ['PhanUndeclaredMethod'], - 'htdocs/admin/webhook.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/webhook.php' => ['PhanEmptyForeach'], 'htdocs/admin/website.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/workstation.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], + 'htdocs/admin/workstation.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/ai/lib/ai.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/api/class/api.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], @@ -179,9 +171,9 @@ return [ 'htdocs/asset/admin/setup.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/asset/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/asset/class/asset.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/asset/class/assetaccountancycodes.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanTypeMismatchProperty'], + 'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/asset/class/assetaccountancycodes.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/asset/class/assetmodel.class.php' => ['PhanUndeclaredProperty'], 'htdocs/asset/depreciation.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/asset/disposal.php' => ['PhanPluginEmptyStatementIf'], @@ -192,35 +184,40 @@ return [ 'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/asterisk/wrapper.php' => ['PhanRedefineFunction'], - 'htdocs/barcode/codeinit.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/barcode/codeinit.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/blockedlog/admin/blockedlog_list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/blockedlog/ajax/block-info.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/blockedlog/ajax/check_signature.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/blockedlog/class/blockedlog.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'], + 'htdocs/blockedlog/lib/blockedlog.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bom/bom_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bom/bom_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/bom/bom_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/bom/bom_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bom/class/api_boms.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/bom/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/bom/class/bom.class.php' => ['PhanPluginUnknownArrayMethodParamType'], + 'htdocs/bom/lib/bom.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bom/tpl/objectline_create.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/bom/tpl/objectline_edit.tpl.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bom/tpl/objectline_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/availabilities_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/availabilities_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/bookcal/availabilities_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/bookcal/availabilities_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bookcal/booking_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/bookcal/calendar_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/calendar_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/bookcal/calendar_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/bookcal/class/availabilities.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/bookcal/class/calendar.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/bookcal/calendar_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/bookcal/class/availabilities.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchProperty', /* Missing getNextValue class, ignored */ 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/bookcal/class/calendar.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchProperty', /* Missing getNextValue class, ignored */ 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/bookcal/lib/bookcal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/bookcal/lib/bookcal_availabilities.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bookmarks/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bookmarks/class/bookmark.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/categories/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchProperty'], + 'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'], 'htdocs/categories/edit.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], 'htdocs/categories/index.php' => ['PhanTypeMismatchDimFetch'], 'htdocs/categories/info.php' => ['PhanTypeMismatchDimFetch'], @@ -230,22 +227,23 @@ return [ 'htdocs/collab/index.php' => ['PhanParamTooMany', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/comm/action/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/comm/action/class/actioncommreminder.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/comm/action/class/api_agendaevents.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchProperty'], - 'htdocs/comm/action/class/ical.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/comm/action/class/api_agendaevents.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'], + 'htdocs/comm/action/class/cactioncomm.class.php' => ['PhanPluginUnknownArrayPropertyType'], + 'htdocs/comm/action/class/ical.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/comm/action/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/comm/action/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], + 'htdocs/comm/action/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], 'htdocs/comm/action/info.php' => ['PhanUndeclaredProperty'], - 'htdocs/comm/action/list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/comm/action/pertype.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], - 'htdocs/comm/action/peruser.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/comm/action/list.php' => ['PhanTypeMismatchProperty'], + 'htdocs/comm/action/pertype.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch'], + 'htdocs/comm/action/peruser.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray'], 'htdocs/comm/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/comm/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/comm/mailing/card.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/comm/mailing/cibles.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/comm/mailing/class/advtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], + 'htdocs/comm/mailing/class/advtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/comm/mailing/index.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/comm/propal/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/propal/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], @@ -258,7 +256,7 @@ return [ 'htdocs/commande/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/commande/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/commande/class/commandestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/commande/customer.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], @@ -270,8 +268,9 @@ return [ 'htdocs/compta/bank/annuel.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/bankentries_list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/bank/class/account.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/compta/bank/class/account.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/class/api_bankaccounts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/bank/class/bankcateg.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/compta/bank/class/paymentvarious.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/compta/bank/graph.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/line.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -317,7 +316,7 @@ return [ 'htdocs/compta/paiement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch'], 'htdocs/compta/paiement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/paiement/cheque/card.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/compta/paiement/cheque/class/remisecheque.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], + 'htdocs/compta/paiement/cheque/class/remisecheque.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], 'htdocs/compta/paiement/cheque/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/compta/paiement/class/cpaiement.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/compta/paiement/class/paiement.class.php' => ['PhanEmptyForeach', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -332,18 +331,20 @@ return [ 'htdocs/compta/prelevement/create.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/prelevement/demandes.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/prelevement/factures.php' => ['PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/compta/prelevement/line.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/prelevement/orders_list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/compta/prelevement/stats.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/resultat/clientfourn.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/resultat/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/resultat/result.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/sociales/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/compta/sociales/class/cchargesociales.class.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/compta/sociales/class/cchargesociales.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/compta/sociales/class/chargesociales.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/sociales/class/paymentsocialcontribution.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/sociales/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/sociales/info.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/sociales/payments.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/compta/sociales/list.php' => ['PhanPluginUndeclaredVariableIsset'], + 'htdocs/compta/sociales/payments.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/stats/byratecountry.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/compta/stats/cabyprodserv.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/stats/cabyuser.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], @@ -361,9 +362,9 @@ return [ 'htdocs/compta/tva/info.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/tva/payments.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/tva/quadri_detail.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/contact/canvas/actions_contactcard_common.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], + 'htdocs/contact/canvas/actions_contactcard_common.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/contact/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/contact/class/contact.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], + 'htdocs/contact/class/contact.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/contact/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contact/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contact/perso.php' => ['PhanTypeMismatchProperty'], @@ -385,7 +386,7 @@ return [ 'htdocs/core/actions_linkedfiles.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/actions_massactions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/actions_sendmails.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], @@ -397,6 +398,7 @@ return [ 'htdocs/core/ajax/onlineSign.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/ajax/saveinplace.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/core/ajax/selectobject.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/ajax/selectsearchbox.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/core/ajax/ziptown.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/boxes/box_accountancy_last_manual_entries.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_accountancy_suspense_account.php' => ['PhanPluginUnknownArrayMethodParamType'], @@ -419,6 +421,7 @@ return [ 'htdocs/core/boxes/box_factures_fourn.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_factures_fourn_imp.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_factures_imp.php' => ['PhanPluginUnknownArrayMethodParamType'], + 'htdocs/core/boxes/box_fediverse.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_ficheinter.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_fournisseurs.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_funnel_of_prospection.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], @@ -459,22 +462,23 @@ return [ 'htdocs/core/boxes/box_supplier_orders_awaiting_reception.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/boxes/box_task.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/boxes/box_validated_projects.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/modules_boxes.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/core/boxes/modules_boxes.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/CSMSFile.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/canvas.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/ccountry.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/cgenericdic.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commonhookactions.class.php' => ['PhanPluginUnknownArrayMethodParamType'], + 'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], + 'htdocs/core/class/commonhookactions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/commonincoterm.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], 'htdocs/core/class/commoninvoice.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/class/commonobject.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], + 'htdocs/core/class/commonobject.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/core/class/commonobjectline.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/commonorder.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/commonpeople.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commonsocialnetworks.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], - 'htdocs/core/class/commonstickergenerator.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/class/commonsocialnetworks.class.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/class/commonstickergenerator.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/conf.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'], + 'htdocs/core/class/cproductnature.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/ctypent.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/ctyperesource.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/cunits.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], @@ -484,12 +488,13 @@ return [ 'htdocs/core/class/dolgeoip.class.php' => ['PhanTypeMismatchProperty'], 'htdocs/core/class/dolgeophp.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/core/class/dolgraph.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], - 'htdocs/core/class/dolreceiptprinter.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], + 'htdocs/core/class/dolreceiptprinter.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], 'htdocs/core/class/emailsenderprofile.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/evalmath.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/events.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/class/extrafields.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], - 'htdocs/core/class/extralanguages.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/core/class/extrafields.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], + 'htdocs/core/class/extralanguages.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], + 'htdocs/core/class/fediverseparser.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/class/fileupload.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch'], 'htdocs/core/class/fiscalyear.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/google.class.php' => ['PhanPluginUnknownPropertyType'], @@ -505,13 +510,13 @@ return [ 'htdocs/core/class/html.formmargin.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], 'htdocs/core/class/html.formother.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/html.formprojet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/class/html.formsetup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/class/html.formsetup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/html.formsms.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccessButGotNull'], - 'htdocs/core/class/html.formticket.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/class/html.formticket.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/html.formwebsite.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/infobox.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/class/interfaces.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/class/ldap.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/class/ldap.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/link.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/notify.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/openid.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], @@ -519,13 +524,13 @@ return [ 'htdocs/core/class/smtps.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'], 'htdocs/core/class/stats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], 'htdocs/core/class/timespent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/core/class/translate.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/class/translate.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/class/utils.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/validate.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/class/vcard.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], + 'htdocs/core/class/vcard.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/core/commonfieldsinexport.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/commonfieldsinimport.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/db/Database.interface.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/db/mysqli.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray'], 'htdocs/core/db/pgsql.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], @@ -534,55 +539,89 @@ return [ 'htdocs/core/extrafieldsinimport.inc.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/get_info.php' => ['PhanPluginSuspiciousParamPosition'], - 'htdocs/core/lib/accounting.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/lib/accounting.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', /* Bug : reference to id of module, not declared */ 'PhanUndeclaredProperty'], + 'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], - 'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/lib/date.lib.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/categories.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], + 'htdocs/core/lib/contact.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/contract.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/cron.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'], + 'htdocs/core/lib/date.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/doc.lib.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/fichinter.lib.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/ftp.lib.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/lib/functions2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/lib/donation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/ecm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/emailing.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/eventorganization.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/expedition.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/expensereport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/fichinter.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'], + 'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/fiscalyear.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/fourn.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/ftp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/functions.lib.php' => ['PhanPluginDuplicateArrayKey'], + 'htdocs/core/lib/functions2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/functions_ch.lib.php' => ['PhanTypeMismatchDimFetch'], 'htdocs/core/lib/functionsnumtoword.lib.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/geturl.lib.php' => ['PhanPluginConstantVariableNull', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/lib/images.lib.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/geturl.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/holiday.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/hrm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/images.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/import.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/intracommreport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/invoice.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/invoice2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/lib/ldap.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/memory.lib.php' => ['PhanTypeMismatchDimFetch'], + 'htdocs/core/lib/ldap.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/loan.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/mailmanspip.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/memory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'], 'htdocs/core/lib/modulebuilder.lib.php' => ['PhanTypeMismatchDimFetch'], - 'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/pdf.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/product.lib.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/project.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/propal.lib.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/oauth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/openid_connect.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/order.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/payments.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/pdf.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/prelevement.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/lib/product.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/lib/project.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/propal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'], + 'htdocs/core/lib/receiptprinter.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/reception.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/report.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], + 'htdocs/core/lib/resource.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/salaries.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/security.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/lib/security2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/sendings.lib.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/lib/sendings.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/lib/signature.lib.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/supplier_proposal.lib.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/lib/tax.lib.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/lib/ticket.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], + 'htdocs/core/lib/socialnetwork.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/stock.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/supplier_proposal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'], + 'htdocs/core/lib/takepos.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/tax.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/lib/ticket.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/treeview.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/usergroups.lib.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/lib/website.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/trip.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/usergroups.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/lib/vat.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/core/lib/website.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], 'htdocs/core/modules/action/modules_action.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/bank/doc/pdf_ban.modules.php' => ['PhanUndeclaredMethod'], 'htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/core/modules/barcode/doc/phpbarcode.modules.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/barcode/mod_barcode_product_standard.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/barcode/modules_barcode.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], @@ -592,20 +631,19 @@ return [ 'htdocs/core/modules/commande/mod_commande_saphir.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/commande/modules_commande.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/modules/dons/html_cerfafr.modules.php' => ['PhanPluginDuplicateExpressionAssignmentOperation'], 'htdocs/core/modules/dons/modules_don.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expensereport/mod_expensereport_sand.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/export/export_csviso.modules.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/modules/export/export_csvutf8.modules.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/modules/export/export_excel2007.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/export/export_tsv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/modules/export/export_csviso.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchPropertyProbablyReal'], + 'htdocs/core/modules/export/export_csvutf8.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchPropertyProbablyReal'], + 'htdocs/core/modules/export/export_excel2007.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchPropertyProbablyReal'], + 'htdocs/core/modules/export/export_tsv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchPropertyProbablyReal'], 'htdocs/core/modules/export/exportcsv.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/export/modules_export.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -618,13 +656,13 @@ return [ 'htdocs/core/modules/fichinter/mod_pacific.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], + 'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeMismatchPropertyProbablyReal'], + 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeMismatchPropertyProbablyReal'], 'htdocs/core/modules/import/modules_import.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'], 'htdocs/core/modules/mailings/advthirdparties.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/mailings/contacts1.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/mailings/eventorganization.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/mailings/modules_mailings.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/core/modules/mailings/modules_mailings.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/core/modules/mailings/partnership.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/mailings/thirdparties.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/mailings/thirdparties_services_expired.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], @@ -645,7 +683,8 @@ return [ 'htdocs/core/modules/oauth/stripelive_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/modules/oauth/stripetest_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/modules/payment/mod_payment_ant.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/printing/modules_printing.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], 'htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/printsheet/modules_labels.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], @@ -671,8 +710,8 @@ return [ 'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], 'htdocs/core/modules/stock/modules_stock.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod', /* Typing issues, ignored */ 'PhanUndeclaredProperty'], + 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/stocktransfer/modules_stocktransfer.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], @@ -685,7 +724,7 @@ return [ 'htdocs/core/modules/supplier_order/modules_commandefournisseur.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], 'htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/syslog/logHandler.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], @@ -698,21 +737,24 @@ return [ 'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/search_page.php' => ['PhanEmptyForeach', 'PhanPluginBothLiteralsBinaryOp'], 'htdocs/core/tpl/advtarget.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/ajaxrow.tpl.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/ajaxrow.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/bloc_comment.tpl.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/card_presend.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/tpl/card_presend.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/tpl/commonfields_add.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/core/tpl/commonfields_edit.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], 'htdocs/core/tpl/commonfields_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/core/tpl/contacts.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/document_actions_post_headers.tpl.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/contacts.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/document_actions_post_headers.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/extrafields_edit.tpl.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/core/tpl/extrafields_list_print_fields.tpl.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/extrafields_list_search_title.tpl.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/core/tpl/extrafields_view.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/tpl/filemanager.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/formlayoutai.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/login.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/tpl/massactions_pre.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/tpl/notes.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/tpl/filemanager.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/formlayoutai.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/list_print_total.tpl.php' => ['PhanPluginUndeclaredVariableIsset'], + 'htdocs/core/tpl/login.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/tpl/massactions_pre.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/tpl/notes.tpl.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/tpl/object_discounts.tpl.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/tpl/objectline_create.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/tpl/objectline_edit.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], @@ -723,7 +765,8 @@ return [ 'htdocs/core/tpl/passwordreset.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/resource_add.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/tpl/resource_view.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/triggers/dolibarrtriggers.class.php' => ['PhanPluginUnknownArrayPropertyType'], + 'htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/core/triggers/interface_50_modEventOrganization_EventOrganization.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php' => ['PhanPluginUnknownObjectMethodCall'], @@ -737,26 +780,29 @@ return [ 'htdocs/cron/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/datapolicy/class/datapolicy.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/datapolicy/class/datapolicycron.class.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/datapolicy/lib/datapolicy.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/dav/dav.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/debugbar/class/DataCollector/DolConfigCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolMemoryCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/debugbar/class/DataCollector/DolPhpCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/debugbar/class/DataCollector/DolPhpCollector.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/debugbar/class/DataCollector/DolQueryCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolRequestDataCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolTimeDataCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/debugbar/class/DataCollector/DolibarrCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/debugbar/class/TraceableDB.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/debugbar/class/TraceableDB.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/delivery/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/delivery/class/delivery.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/delivery/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/document.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/admin/donation.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/don/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/don/card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/don/class/api_donations.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/don/class/don.class.php' => ['PhanParamTooMany', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/don/class/donstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/don/class/paymentdonation.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/document.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/don/index.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/don/info.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/don/list.php' => ['PhanTypeMismatchProperty'], 'htdocs/don/note.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], @@ -764,9 +810,9 @@ return [ 'htdocs/don/payment/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/don/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/don/stats/index.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/don/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/don/tpl/linkedobjectblock.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/ecm/ajax/ecmdatabase.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/ecm/class/ecmdirectory.class.php' => ['PhanPossiblyUndeclaredVariable'], + 'htdocs/ecm/class/ecmdirectory.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/ecm/class/ecmfiles.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/ecm/class/htmlecm.form.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/ecm/dir_card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -776,6 +822,7 @@ return [ 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanInvalidFQSENInClasslike', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/emailcollector/class/emailcollectoraction.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/emailcollector/class/emailcollectorfilter.class.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/emailcollector/lib/emailcollector.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/eventorganization/class/conferenceorbooth.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/eventorganization/conferenceorbooth_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -784,6 +831,7 @@ return [ 'htdocs/eventorganization/conferenceorboothattendee_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/eventorganization/conferenceorboothattendee_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/eventorganization/core/actions_massactions_mail.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/eventorganization/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/expedition/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/expedition/class/api_shipments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], @@ -793,7 +841,7 @@ return [ 'htdocs/expedition/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/expedition/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/expedition/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/expedition/list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/expedition/list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/expedition/note.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/expedition/shipment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/expedition/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], @@ -801,7 +849,6 @@ return [ 'htdocs/expensereport/class/api_expensereports.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/expensereport/class/expensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/expensereport/class/expensereport_ik.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/expensereport/class/expensereport_rule.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/expensereport/class/expensereportstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/expensereport/payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], @@ -818,19 +865,19 @@ return [ 'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/fichinter/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], - 'htdocs/fichinter/class/fichinter.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/fichinter/class/fichinter.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/fichinter/class/fichinterstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/filefunc.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/filefunc.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/fourn/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/fourn/class/api_supplier_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/class/fournisseur.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/fourn/class/fournisseur.commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], 'htdocs/fourn/class/fournisseur.facture-rec.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/fourn/class/fournisseur.facture.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/fourn/class/fournisseur.facture.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], 'htdocs/fourn/class/fournisseur.product.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], 'htdocs/fourn/class/paiementfourn.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/commande/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], @@ -866,7 +913,7 @@ return [ 'htdocs/hrm/class/skill.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/hrm/class/skilldet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/hrm/class/skillrank.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/hrm/compare.php' => ['PhanPluginUnknownArrayFunctionParamType'], + 'htdocs/hrm/compare.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/hrm/core/tpl/objectline_view.tpl.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/hrm/core/tpl/skilldet.fiche.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/hrm/evaluation_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -876,6 +923,12 @@ return [ 'htdocs/hrm/job_agenda.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/job_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/hrm/job_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/hrm/lib/hrm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/hrm/lib/hrm_job.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/hrm/lib/hrm_position.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/hrm/lib/hrm_skill.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/hrm/lib/hrm_skilldet.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/hrm/lib/hrm_skillrank.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/hrm/position_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/position_card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/position_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], @@ -883,27 +936,31 @@ return [ 'htdocs/hrm/skill_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/hrm/skill_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/skill_tab.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/imports/class/import.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/imports/class/import.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/imports/emptyexample.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/imports/import.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/imports/import.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/install/check.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/install/fileconf.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/install/inc.php' => ['PhanRedefineFunction'], + 'htdocs/install/fileconf.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/install/inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanRedefineFunction'], 'htdocs/install/index.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/install/repair.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/install/repair.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/install/step2.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], + 'htdocs/install/step5.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/install/upgrade.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/install/upgrade2.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/intracommreport/admin/intracommreport.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/intracommreport/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/intracommreport/class/intracommreport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/intracommreport/list.php' => ['PhanAccessPropertyStaticAsNonStatic', 'PhanPluginUnknownObjectMethodCall'], + 'htdocs/intracommreport/list.php' => [/* Dynamic access of IntracommReport::$type */ 'PhanAccessPropertyStaticAsNonStatic', 'PhanPluginUndeclaredVariableIsset'], 'htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php' => [/* Missing KnowledgeRecord->date */ 'PhanUndeclaredProperty'], 'htdocs/knowledgemanagement/knowledgerecord_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/knowledgemanagement/knowledgerecord_card.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/knowledgemanagement/knowledgerecord_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/knowledgemanagement/lib/knowledgemanagement_knowledgerecord.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/loan/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/loan/class/loan.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/loan/class/loanschedule.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], @@ -913,12 +970,16 @@ return [ 'htdocs/loan/note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/loan/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/loan/schedule.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/mailmanspip/class/mailmanspip.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/margin/customerMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/margin/lib/margins.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/margin/productMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/master.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/modulebuilder/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/mrp/class/api_mos.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/mrp/class/mo.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], + 'htdocs/mrp/class/mo.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], + 'htdocs/mrp/lib/mrp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/mrp/lib/mrp_mo.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/mrp/mo_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/mo_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/mo_movements.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -930,8 +991,8 @@ return [ 'htdocs/opcachepreload.php' => ['PhanEmptyForeach'], 'htdocs/opensurvey/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], - 'htdocs/opensurvey/lib/opensurvey.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/opensurvey/list.php' => ['PhanEmptyForeach', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/opensurvey/lib/opensurvey.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/opensurvey/list.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/opensurvey/results.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/opensurvey/wizard/create_survey.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -940,13 +1001,16 @@ return [ 'htdocs/partnership/class/partnership_type.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/partnership/class/partnershiputils.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/partnership/core/modules/partnership/modules_partnership.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/partnership/lib/partnership.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/partnership/partnership_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/partnership/partnership_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/partnership/partnership_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/paypal/lib/paypal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/printing/admin/printing.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/printing/index.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/printing/lib/printing.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/product/admin/dynamic_prices.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall'], + 'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/admin/product_lot.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/product/admin/product_tools.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -957,7 +1021,7 @@ return [ 'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], 'htdocs/product/class/html.formproduct.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], + 'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/product/class/productbatch.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], 'htdocs/product/class/productcustomerprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/product/class/productfournisseurprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], @@ -967,11 +1031,13 @@ return [ 'htdocs/product/dynamic_price/class/price_global_variable.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], 'htdocs/product/dynamic_price/class/price_global_variable_updater.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], 'htdocs/product/dynamic_price/class/price_parser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/product/index.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/product/inventory/card.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/inventory/inventory.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/product/inventory/lib/inventory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/product/inventory/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/product/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/reassortlot.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -993,8 +1059,8 @@ return [ 'htdocs/product/stock/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/stock/massstockmove.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/stock/movement_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/movement_card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/product.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/stock/productlot_card.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/productlot_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1006,6 +1072,8 @@ return [ 'htdocs/product/stock/stockatdate.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/stocktransfer/class/stocktransfer.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], 'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/product/stock/stocktransfer/stocktransfer_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/product/stock/stocktransfer/stocktransfer_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1018,18 +1086,18 @@ return [ 'htdocs/projet/admin/project.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/ajax/projects.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/card.php' => ['PhanEmptyFQSENInClasslike', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/projet/class/api_projects.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/projet/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/projet/class/api_projects.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/class/api_tasks.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/projet/class/project.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/projet/class/project.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/class/projectstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/projet/class/task.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/class/taskstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/projet/contact.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/element.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/projet/element.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/projet/ganttchart.inc.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/ganttview.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/graph_opportunities.inc.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/projet/graph_opportunities.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/index.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/projet/list.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -1040,7 +1108,7 @@ return [ 'htdocs/projet/tasks/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/note.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/task.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/public/agenda/agendaexport.php' => ['PhanRedefineFunction'], 'htdocs/public/bookcal/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'], @@ -1061,12 +1129,13 @@ return [ 'htdocs/public/payment/paymentko.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], 'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/project/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/public/project/new.php' => ['PhanEmptyFQSENInClasslike', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanUndeclaredProperty'], + 'htdocs/public/project/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanUndeclaredProperty'], 'htdocs/public/project/suggestbooth.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/project/suggestconference.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/stripe/ipn.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'], 'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -1090,19 +1159,22 @@ return [ 'htdocs/reception/class/receptionstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/reception/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/reception/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/reception/list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/reception/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/reception/note.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/reception/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/recruitment/admin/setup.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall'], + 'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], 'htdocs/recruitment/class/api_recruitments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php' => ['PhanUndeclaredProperty'], 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php' => ['PhanUndeclaredProperty'], 'htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/recruitment/index.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/recruitment/lib/recruitment.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/recruitment/lib/recruitment_recruitmentjobposition.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/recruitment/recruitmentcandidature_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/recruitment/recruitmentcandidature_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentcandidature_document.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1115,13 +1187,13 @@ return [ 'htdocs/recruitment/recruitmentjobposition_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/recruitment/recruitmentjobposition_note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/resource/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/resource/class/dolresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], + 'htdocs/resource/class/dolresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/resource/class/html.formresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeExpectedObjectPropAccess'], 'htdocs/resource/element_resource.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/salaries/admin/salaries.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/salaries/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/salaries/class/api_salaries.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/salaries/class/paymentsalary.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/salaries/class/paymentsalary.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/salaries/class/salariesstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/salaries/class/salary.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/salaries/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1134,17 +1206,16 @@ return [ 'htdocs/societe/ajax/ajaxcompanies.php' => ['PhanUndeclaredProperty'], 'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/societe/canvas/actions_card_common.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], - 'htdocs/societe/canvas/company/actions_card_company.class.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/societe/canvas/individual/actions_card_individual.class.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/societe/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/societe/checkvat/checkVatPopup.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/societe/class/api_contacts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], + 'htdocs/societe/class/client.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/societe/class/companybankaccount.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/societe/class/companypaymentmode.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/societe/class/societeaccount.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], 'htdocs/societe/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/societe/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/societe/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/paymentmodes.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/societe/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/project.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1155,6 +1226,7 @@ return [ 'htdocs/stripe/charge.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/stripe/class/stripe.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/stripe/lib/stripe.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/stripe/payout.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/stripe/transaction.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/supplier_proposal/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -1162,17 +1234,17 @@ return [ 'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/supplier_proposal/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/support/inc.php' => ['PhanRedefineFunction'], + 'htdocs/support/inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanRedefineFunction'], 'htdocs/takepos/admin/orderprinters.php' => ['PhanTypeMismatchDimFetch'], - 'htdocs/takepos/admin/setup.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/takepos/admin/terminal.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/takepos/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/takepos/floors.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/takepos/freezone.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/takepos/index.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/takepos/invoice.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/takepos/pay.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/takepos/public/menu.php' => ['PhanUndeclaredProperty'], - 'htdocs/takepos/split.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/takepos/split.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/theme/eldy/badges.inc.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/btn.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'], @@ -1180,20 +1252,20 @@ return [ 'htdocs/theme/eldy/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/main_menu_fa_icons.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/eldy/progress.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/theme/eldy/style.css.php' => ['PhanRedefinedClassReference', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/theme/eldy/style.css.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/badges.inc.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/btn.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/flags-sprite.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/progress.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/theme/md/style.css.php' => ['PhanRedefinedClassReference', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/theme/md/style.css.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/ticket/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ticket/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/ticket/class/actions_ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/ticket/class/api_tickets.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ticket/class/cticketcategory.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/ticket/class/ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], + 'htdocs/ticket/class/ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/ticket/class/ticketstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/ticket/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ticket/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], @@ -1204,7 +1276,7 @@ return [ 'htdocs/user/bank.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/user/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/user/class/api_users.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/user/class/user.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanRedefinedClassReference', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/user/class/user.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/user/class/usergroup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/user/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/user/group/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1212,57 +1284,66 @@ return [ 'htdocs/user/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/param_ihm.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/passwordforgotten.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/user/perms.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanRedefinedClassReference'], + 'htdocs/user/perms.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/variants/ajax/get_attribute_values.php' => ['PhanTypeComparisonFromArray'], 'htdocs/variants/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], + 'htdocs/variants/lib/variants.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/variants/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/variants/tpl/productattributevalueline_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/viewimage.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanRedefineFunction'], 'htdocs/webhook/ajax/webhook.php' => ['PhanPluginUnknownObjectMethodCall'], + 'htdocs/webhook/class/api_webhook.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/webhook/class/target.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty'], + 'htdocs/webhook/lib/webhook.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/webhook/lib/webhook_target.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/webhook/target_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/webhook/target_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/webportal/class/context.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/webportal/class/context.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/webportal/class/controller.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], + 'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/webportal/class/webPortalTheme.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/webportal/class/webportalorder.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalpartnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/webportal/class/webportalpropal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_actioncomm.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanUndeclaredProperty'], + 'htdocs/webportal/lib/webportal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/webservices/server_actioncomm.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], 'htdocs/webservices/server_category.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_contact.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_order.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_other.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_contact.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_order.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_other.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/webservices/server_payment.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_productorservice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_project.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_supplier_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_thirdparty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_user.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_productorservice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_project.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_supplier_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_thirdparty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_user.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/website/class/website.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/website/class/websitepage.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/website/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/website/lib/websiteaccount.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/website/samples/wrapper.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/website/websiteaccount_card.php' => ['PhanUndeclaredProperty'], 'htdocs/workstation/class/api_workstations.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/workstation/class/workstation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'], 'htdocs/workstation/class/workstationresource.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/workstation/class/workstationusergroup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/workstation/lib/workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/workstation/lib/workstation_workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/workstation/workstation_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/workstation/workstation_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/workstation/workstation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/zapier/class/api_zapier.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/zapier/class/hook.class.php' => ['PhanUndeclaredProperty'], + 'htdocs/zapier/lib/zapier.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'internal' => ['PhanUndeclaredConstant'], ], // 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed. diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index e86e44d43d3..22f33364671 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -257,10 +257,12 @@ return [ 'filtert' => 'int', 'forceall' => 'int<0,1>', 'form' => '\Form', + 'formcompany' => '\FormCompany', 'hookmanager' => '\HookManager', 'inputalsopricewithtax' => 'int<0,1>', 'langs' => '\Translate', 'leftmenu' => 'string', + 'linkedObjectBlock' => '\CommonObject[]', // See htdocs/core/class/html.form.class.php 'mainmenu' => 'string', 'menumanager' => '\MenuManager', 'mysoc' => '\Societe', @@ -268,6 +270,7 @@ return [ 'obj' => '\CommonObject', // Deprecated 'object_rights' => 'int|stdClass', 'objectoffield' => '\CommonObject', + 'objsoc' => '\Societe', 'senderissupplier' => 'int<0,2>', 'user' => '\User', 'website' => 'string', // See discussion https://github.com/Dolibarr/dolibarr/pull/28891#issuecomment-2002268334 // Disable because Phan infers Website type @@ -444,10 +447,10 @@ return [ 'PhanPluginRedundantAssignment', // Not essential, useless 'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences - 'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled into config_extended only. - 'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled into config_extended only. + 'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled in config_extended only. + 'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled in config_extended only. 'PhanUndeclaredGlobalVariable', // Too many false positives on .tpl.php files. Is enabled into config_extended only. - 'PhanPluginUnknownObjectMethodCall', // False positive for some class. Is enabled into config_extended only. + // 'PhanPluginUnknownObjectMethodCall', // False positive for some class. Is enabled in config_extended only. ], // You can put relative paths to internal stubs in this config option. // Phan will continue using its detailed type annotations, diff --git a/htdocs/adherents/admin/member.php b/htdocs/adherents/admin/member.php index 5a6a10d4fa3..2077d61dd9b 100644 --- a/htdocs/adherents/admin/member.php +++ b/htdocs/adherents/admin/member.php @@ -63,6 +63,8 @@ $modulepart = GETPOST('modulepart', 'aZ09'); include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; +global $conf; + if ($action == 'set_default') { $ret = addDocumentModel($value, $type, $label, $scandir); $res = true; @@ -181,7 +183,7 @@ if ($action == 'set_default') { } } - $consttype = GETPOST('consttype', 'alpha'); + $consttype = GETPOSTINT('consttype'); $constnote = GETPOST('constnote'); $res = dolibarr_set_const($db, $constname, $constvalue, $choices[$consttype], 0, $constnote, $conf->entity); @@ -295,7 +297,7 @@ foreach ($arrayofmodules as $file => $modCodeMember) { print ''."\n"; print ''.$modCodeMember->name.''."\n"; print ''.$modCodeMember->info($langs).''."\n"; - print ''.$modCodeMember->getExample($langs).''."\n"; + print ''.$modCodeMember->getExample().''."\n"; if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == "$file") { print ''."\n"; @@ -389,6 +391,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force doc_generic_member_odt|pdf_standard_member $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 8f19af346a2..a6a80a2f976 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -539,7 +539,7 @@ class Subscription extends CommonObject * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) - * @param array $arraydata Array of data + * @param array{selected:?int,member:?Adherent,bank:?Account} $arraydata Array of data * @return string HTML Code for Kanban thumb. */ public function getKanbanView($option = '', $arraydata = null) diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index 62a3a08aa49..21db449c9e9 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -29,7 +29,9 @@ echo "\n"; global $user; $langs = $GLOBALS['langs']; +'@phan-var-force Translate $langs'; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; +'@phan-var-force Subscription[] $linkedObjectBlock'; $langs->load("members"); $total = 0; diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 994537b515d..4585a6be6fd 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -256,6 +256,8 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { require_once $dir.'/'.$file; $module = new $classname($db, new ActionComm($db)); + '@phan-var-force ModeleAction $module'; + print ''."\n"; print ""; print(empty($module->name) ? $name : $module->name); diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index e33a7ba9f0d..f81d347f004 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -346,6 +346,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModeleBankAccountDoc $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -359,7 +361,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } @@ -468,7 +470,7 @@ if (getDolGlobalInt('BANK_COLORIZE_MOVEMENT')) { print ''.$langs->trans("BankColorizeMovementName".$key).""; // Color print ''; - print $formother->selectColor((GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) ? GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) : getDolGlobalString($color)), "BANK_COLORIZE_MOVEMENT_COLOR".$key, 'bankmovementcolorconfig', 1, '', 'right hideifnotset'); + print $formother->selectColor((GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) ? GETPOST("BANK_COLORIZE_MOVEMENT_COLOR".$key) : getDolGlobalString($color)), "BANK_COLORIZE_MOVEMENT_COLOR".$key, 'bankmovementcolorconfig', 1, array(), 'right hideifnotset'); print ''; print ""; $i++; diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index e16f64d1515..94c655315bc 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -173,6 +173,8 @@ foreach ($dirbarcode as $reldir) { $classname = "mod".ucfirst($filebis); $module = new $classname($db); + '@phan-var-force ModeleBarCode $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -288,6 +290,9 @@ if (isModEnabled('societe')) { } $modBarCode = new $file(); + + '@phan-var-force ModeleNumRefBarCode $modBarCode'; + print ''; print ''.(isset($modBarCode->name) ? $modBarCode->name : $modBarCode->nom)."\n"; print $modBarCode->info($langs); diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index bd4aa161136..67be5735c80 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -212,6 +212,8 @@ foreach ($dirmodels as $reldir) { $module = new $classname($db); + '@phan-var-force ModeleNumRefBoms $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index c42cd594fb8..da9a81fefdb 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -247,6 +247,8 @@ foreach ($dirmodels as $reldir) { /** @var ModelNumRefContracts $module */ $module = new $file($db); + '@phan-var-force ModelNumRefContracts $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -383,6 +385,8 @@ foreach ($dirmodels as $reldir) { /** @var ModelePDFContract $module */ $module = new $classname($db); + '@phan-var-force ModelePDFContract $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -396,7 +400,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php index c607f19922a..21bfe663100 100644 --- a/htdocs/admin/delivery.php +++ b/htdocs/admin/delivery.php @@ -259,6 +259,8 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) { $module = new $file(); + '@phan-var-force ModeleNumRefDeliveryOrder $module'; + if ($module->isEnabled()) { // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -392,6 +394,8 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFDeliveryOrder $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -405,7 +409,7 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index cf3685d531e..a3648c44a68 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -130,6 +130,7 @@ class Dolistore // Call dol_syslog("Call API with opt = ".var_export($opt, true)); $xml = $this->api->get($opt); + // @phan-suppress-next-line PhanPluginUnknownObjectMethodCall $this->categories = $xml->categories->children(); } catch (PrestaShopWebserviceException $e) { // Here we are dealing with errors @@ -185,6 +186,7 @@ class Dolistore $xml = $this->api->get($opt2); $products = array(); + // @phan-suppress-next-line PhanPluginUnknownObjectMethodCall foreach ($xml->products->children() as $product) { $products[] = (int) $product['id']; } @@ -199,6 +201,7 @@ class Dolistore $xml = $this->api->get($opt2); $products = array(); + // @phan-suppress-next-line PhanPluginUnknownObjectMethodCall foreach ($xml->category->associations->products->children() as $product) { $products[] = (int) $product->id; } @@ -213,6 +216,7 @@ class Dolistore // Call API to get the detail dol_syslog("Call API with opt = ".var_export($opt, true)); $xml = $this->api->get($opt); + // @phan-suppress-next-line PhanPluginUnknownObjectMethodCall $this->products = $xml->products->children(); } catch (PrestaShopWebserviceException $e) { // Here we are dealing with errors diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index e07083da604..614d40d93f7 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -457,6 +457,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea throw new Exception("Failed to refresh access token: ".$e->getMessage()); } + // @phan-suppress-next-line PhanPluginUnknownObjectMethodCall $tokenobj->setRefreshToken($refreshtoken); $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); } diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 71e45792074..940c016b07f 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -203,6 +203,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.$file.'.php'; $module = new $file(); + '@phan-var-force ModelNumRefExpedition $module'; if ($module->isEnabled()) { // Show modules according to features level @@ -340,6 +341,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePdfExpedition $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -353,7 +356,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 6eee65a50a8..c8b57520e24 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -228,6 +228,8 @@ foreach ($dirmodels as $reldir) { $module = new $file($db); + '@phan-var-force ModeleNumRefExpenseReport $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -237,7 +239,7 @@ foreach ($dirmodels as $reldir) { } if ($module->isEnabled()) { - print ''.$module->nom."\n"; + print ''.$module->getName($langs)."\n"; print $module->info($langs); print ''; @@ -359,6 +361,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModeleExpenseReport $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -372,7 +376,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 4e4ef01d9f0..8440bee8e74 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -3,6 +3,7 @@ * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017 Pierre-Henry Favre * Copyright (C) 2018-2019 Frédéric France + * 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 @@ -355,7 +356,7 @@ foreach ($rules as $rule) { echo ''; } -if (count($rules) == 0) { +if (!is_array($rules) || count($rules) == 0) { print ''.$langs->trans("None").''; } diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 033eceeaa89..39907889faf 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -295,6 +295,8 @@ foreach ($dirmodels as $reldir) { $module = new $file(); + '@phan-var-force ModeleNumRefFicheinter $module'; + if ($module->isEnabled()) { // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -305,7 +307,7 @@ foreach ($dirmodels as $reldir) { } - print ''.$module->nom."\n"; + print ''.$module->getName($langs)."\n"; print $module->info($langs); print ''; @@ -432,6 +434,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFFicheinter $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -445,7 +449,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 2e0206eaa87..9b2fa611935 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -205,6 +205,8 @@ foreach ($dirmodels as $reldir) { $module = new $file($db); + '@phan-var-force ModelNumRefHolidays $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -345,6 +347,9 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { require_once $dir.'/'.$file; $module = new $classname($db); + + '@phan-var-force ModelePDFHoliday $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -358,7 +363,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index b7d2ad03244..1a4b8fe0f43 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -262,6 +262,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $module = new $file($db); + '@phan-var-force ModeleNumRefEvaluation $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -405,6 +407,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFEvaluation $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -418,7 +422,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/invoice.php b/htdocs/admin/invoice.php index 4b891294de5..c35809945ba 100644 --- a/htdocs/admin/invoice.php +++ b/htdocs/admin/invoice.php @@ -333,6 +333,8 @@ foreach ($dirmodels as $reldir) { $module = new $classname($db); + '@phan-var-force ModeleNumRefFactures $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -528,6 +530,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFFactures $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -544,7 +548,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/knowledgemanagement.php b/htdocs/admin/knowledgemanagement.php index fdd77fa01db..cbd2d51dde1 100644 --- a/htdocs/admin/knowledgemanagement.php +++ b/htdocs/admin/knowledgemanagement.php @@ -213,6 +213,7 @@ if ($action == 'edit') { print ''; print ''; + // @phan-suppress-next-line PhanEmptyForeach foreach ($arrayofparameters as $constname => $val) { if ($val['enabled'] == 1) { $setupnotempty++; @@ -280,6 +281,7 @@ if ($action == 'edit') { print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; print ''; + // @phan-suppress-next-line PhanEmptyForeach foreach ($arrayofparameters as $constname => $val) { if ($val['enabled'] == 1) { $setupnotempty++; @@ -379,6 +381,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $module = new $file($db); + '@phan-var-force ModeleNumRefKnowledgeRecord $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -520,6 +524,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file; $module = new $className($db); + '@phan-var-force ModelePDFKnowledgeRecord $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -533,7 +539,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { print(empty($module->name) ? $name : $module->name); print "'; @@ -409,6 +411,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFPropales $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -422,7 +426,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; + print '\n"; print ''; @@ -350,6 +352,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePdfReception $module'; + $modulequalified = 1; if (isset($module->version) && $module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -363,7 +367,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "'; @@ -367,6 +369,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db, new FactureFournisseur($db)); + '@phan-var-force ModelePDFSuppliersInvoices $module'; + print "\n"; print "'; @@ -379,6 +381,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db, new CommandeFournisseur($db)); + '@phan-var-force ModeleNumRefSuppliersOrders $module'; + print "\n"; print "'."\n"; print "\n"; print "'; @@ -413,7 +413,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "'; // Ligne info remises tiers @@ -2273,6 +2273,7 @@ if ($action == 'create' && $usercancreate) { if (array_key_exists('facture', $object->linkedObjects)) { foreach ($object->linkedObjects['facture'] as $invoice) { + '@phan-var-force Facture $invoice'; if ($invoice->type == Facture::TYPE_DEPOSIT) { $eligibleForDepositGeneration = false; break; @@ -2286,6 +2287,7 @@ if ($action == 'create' && $usercancreate) { if (array_key_exists('facture', $proposal->linkedObjects)) { foreach ($proposal->linkedObjects['facture'] as $invoice) { + '@phan-var-force Facture $invoice'; if ($invoice->type == Facture::TYPE_DEPOSIT) { $eligibleForDepositGeneration = false; break 2; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 56c2b663c59..229d9073e30 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -450,7 +450,8 @@ class RemiseCheque extends CommonObject } $obj = new $classname(); - '@phan-var-force CommonNumRefGenerator $obj'; + '@phan-var-force ModeleNumRefChequeReceipts $obj'; + $numref = ""; $numref = $obj->getNextValue($mysoc, $this); @@ -459,7 +460,7 @@ class RemiseCheque extends CommonObject * set up mask. */ if ($mode != 'last' && !$numref) { - dol_print_error($db, "ChequeReceipts::getNextNumRef ".$obj->error); + dol_print_error($db, "ChequeReceipts::getNextValue ".$obj->error); return ""; } @@ -591,7 +592,7 @@ class RemiseCheque extends CommonObject $classname = 'BordereauCheque'.ucfirst($model); $docmodel = new $classname($this->db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModeleChequeReceipts $docmodel'; $sql = "SELECT b.banque, b.emetteur, b.amount, b.num_chq"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 58007cdf65f..bf5dc089bbc 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -173,12 +173,9 @@ if ($year > 0) { $sql .= " OR (cs.periode IS NULL AND cs.date_ech between '".$db->idate(dol_get_first_day($year))."' AND '".$db->idate(dol_get_last_day($year))."')"; $sql .= ")"; } -if (preg_match('/^cs\./', $sortfield) - || preg_match('/^c\./', $sortfield) - || preg_match('/^pc\./', $sortfield) - || preg_match('/^pct\./', $sortfield) - || preg_match('/^u\./', $sortfield) - || preg_match('/^ba\./', $sortfield)) { +if ($sortfield !== null + && preg_match('/^(cs|c|pc|pct|u|ba)\./', $sortfield) +) { $sql .= $db->order($sortfield, $sortorder); } diff --git a/htdocs/compta/tva/payments.php b/htdocs/compta/tva/payments.php index 0f2df75eb04..c403c4e9364 100644 --- a/htdocs/compta/tva/payments.php +++ b/htdocs/compta/tva/payments.php @@ -201,11 +201,9 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) { $sql .= " OR (tva.datev IS NULL AND tva.datev between '" . $db->idate(dol_get_first_day($year)) . "' AND '" . $db->idate(dol_get_last_day($year)) . "')"; $sql .= ")"; } - if (preg_match('/^cs\./', $sortfield) - || preg_match('/^tva\./', $sortfield) - || preg_match('/^ptva\./', $sortfield) - || preg_match('/^pct\./', $sortfield) - || preg_match('/^bank\./', $sortfield)) { + if ($sortfield !== null + && preg_match('/^(cs|tva|ptva|pct|bank)\./', $sortfield) + ) { $sql .= $db->order($sortfield, $sortorder); } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 6b445b482c1..1ebcf93b2a3 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -584,7 +584,7 @@ if (empty($reshook)) { } $tva_tx = str_replace('*', '', $tva_tx); $desc = $product_desc; - $fk_unit = GETPOST('units', 'alpha'); + $fk_unit = GETPOSTINT('units'); $pu_ht_devise = price2num($price_ht_devise, 'MU'); $pu_ttc_devise = price2num($price_ttc_devise, 'MU'); @@ -762,7 +762,7 @@ if (empty($reshook)) { $pa_ht = null; } - $fk_unit = GETPOST('unit', 'alpha'); + $fk_unit = GETPOSTINT('unit'); // update price_ht with discount // TODO Use object->updateline instead objectline->update @@ -793,7 +793,7 @@ if (empty($reshook)) { // $objectline->rang = $objectline->rang; if ($fk_unit > 0) { - $objectline->fk_unit = GETPOST('unit'); + $objectline->fk_unit = GETPOSTINT('unit'); } else { $objectline->fk_unit = null; } @@ -1740,7 +1740,7 @@ if ($action == 'create') { // Ligne carac print ''; print ''; @@ -1784,7 +1784,7 @@ if ($action == 'create') { print ''; // Price - print ''; + print ''; // Price multicurrency /*if (isModEnabled("multicurrency")) { @@ -1792,24 +1792,24 @@ if ($action == 'create') { }*/ // Quantity - print ''; + print ''; // Unit if (getDolGlobalInt('PRODUCT_USE_UNITS')) { print ''; } // Discount - print ''; + print ''; if (!empty($usemargins)) { print ''; + print ''; } print ''; @@ -505,6 +513,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file; $module = new $className($db); + '@phan-var-force ModelePDFMyObject $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -518,7 +528,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { print(empty($module->name) ? $name : $module->name); print "'; $text .= ''; $text .= ''; @@ -92,9 +94,9 @@ class mod_myobject_advanced extends ModeleNumRefMyObject } /** - * Return an example of numbering + * Return an example of numbering * - * @return string Example + * @return string Example */ public function getExample() { @@ -122,8 +124,8 @@ class mod_myobject_advanced extends ModeleNumRefMyObject /** * Return next free value * - * @param Object $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @param MyObject $object Object we need next value for + * @return string|int<-1,0> Next free value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php index 5f7d2f6061f..3670e7f9c5e 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php @@ -1,6 +1,8 @@ - * Copyright (C) 2005-2009 Regis Houssin +/* Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 MDW + * Copyright (C) ---Put your own copyright and developer email here--- * * 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 @@ -32,7 +34,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -76,8 +78,8 @@ class mod_myobject_standard extends ModeleNumRefMyObject * Checks if the numbers already in the database do not * cause conflicts that would prevent this numbering working. * - * @param Object $object Object we need next value for - * @return boolean false if conflict, true if ok + * @param MyObject $object Object we need next value for + * @return bool false if conflict, true if ok */ public function canBeActivated($object) { @@ -116,8 +118,8 @@ class mod_myobject_standard extends ModeleNumRefMyObject /** * Return next free value * - * @param Object $object Object we need next value for - * @return string|-1 Next free value if OK, -1 if KO + * @param MyObject $object Object we need next value for + * @return string|int<-1,0> Next free value if OK, -1 if KO */ public function getNextValue($object) { diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php b/htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php index 11b103bc5de..b32b87c6ab1 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php @@ -1,11 +1,13 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2014 Marcos García +/* Copyright (C) 2003-2004 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2014 Marcos García + * Copyright (C) 2024 MDW + * Copyright (C) ---Put your own copyright and developer email here--- * * 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 @@ -25,7 +27,7 @@ /** * \file htdocs/core/modules/mymodule/modules_myobject.php * \ingroup mymodule - * \brief File that contains parent class for myobjects document models and parent class for myobjects numbering models + * \brief File with parent class for myobject document models and parent class for myobject numbering models */ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php'; @@ -33,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php'; /** - * Parent class for documents models + * Parent class for document models */ abstract class ModelePDFMyObject extends CommonDocGenerator { @@ -41,9 +43,9 @@ abstract class ModelePDFMyObject extends CommonDocGenerator /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param int<0,max> $maxfilenamelength Max length of value to show + * @return string[]|int<-1,0> List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { @@ -56,6 +58,23 @@ abstract class ModelePDFMyObject extends CommonDocGenerator return $list; } + + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Function to build and write pdf to disk + * + * @param MyObject $object Source object to generate document from + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1 if OK, <=0 if KO + */ + abstract public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0); + // phpcs:enable } @@ -64,5 +83,11 @@ abstract class ModelePDFMyObject extends CommonDocGenerator */ abstract class ModeleNumRefMyObject extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param MyObject $object Object we need next value for + * @return string|int<-1,0> Next free value if OK, -1 if KO + */ + abstract public function getNextValue($object); } diff --git a/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php b/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php index b655a692c62..01ca3c22f64 100644 --- a/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php +++ b/htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php @@ -1,5 +1,7 @@ +/* Copyright (C) 2019 Laurent Destailleur + * Copyright (C) 2024 MDW + * Copyright (C) ---Put your own copyright and developer email here--- * * 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 @@ -29,12 +31,15 @@ global $user; global $noMoreLinkedObjectBlockAfter; $langs = $GLOBALS['langs']; +'@phan-var-force Translate $langs'; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; +'@phan-var-force MyObject[] $linkedObjectBlock'; // Load translation files required by the page $langs->load("mymodule"); -$total = 0; $ilink = 0; +$total = 0; +$ilink = 0; foreach ($linkedObjectBlock as $key => $objectlink) { $ilink++; diff --git a/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php b/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php index 0cf8868d5cf..18b2f29dfdc 100644 --- a/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php +++ b/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 MDW + * Copyright (C) ---Put here your own copyright and developer email--- * * 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 diff --git a/htdocs/mrp/class/api_mos.class.php b/htdocs/mrp/class/api_mos.class.php index fe46a2eb845..d4e23183018 100644 --- a/htdocs/mrp/class/api_mos.class.php +++ b/htdocs/mrp/class/api_mos.class.php @@ -415,7 +415,7 @@ class Mos extends DolibarrApi $moline->qty = $qtytoprocess; $moline->batch = (string) $tmpproduct->status_batch; $moline->role = 'toproduce'; - $moline->fk_mrp_production = ""; + $moline->fk_mrp_production = 0; $moline->fk_stock_movement = $idstockmove; $moline->fk_user_creat = DolibarrApiAccess::$user->id; @@ -434,7 +434,7 @@ class Mos extends DolibarrApi $moline->qty = $qtytoprocess; $moline->batch = (string) $tmpproduct->status_batch; $moline->role = 'toconsume'; - $moline->fk_mrp_production = ""; + $moline->fk_mrp_production = 0; $moline->fk_stock_movement = $idstockmove; $moline->fk_user_creat = DolibarrApiAccess::$user->id; @@ -464,7 +464,7 @@ class Mos extends DolibarrApi } else { $moline->role = 'produced'; } - $moline->fk_mrp_production = ""; + $moline->fk_mrp_production = 0; $moline->fk_stock_movement = $idstockmove; $moline->fk_user_creat = DolibarrApiAccess::$user->id; diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 32af794d2cf..cf1ef56e045 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -112,22 +112,43 @@ class Mo extends CommonObject 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 1000, 'default' => '0', 'notnull' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '2' => 'InProgress', '3' => 'StatusMOProduced', '9' => 'Canceled')), 'fk_parent_line' => array('type' => 'integer:MoLine:mrp/class/mo.class.php', 'label' => 'ParentMo', 'enabled' => 1, 'visible' => 0, 'position' => 1020, 'default' => '0', 'notnull' => 0, 'index' => 1,'showoncombobox' => 0), ); + /** + * @var int + */ public $rowid; + /** + * @var int + */ public $entity; + /** + * @var string + */ public $ref; /** * @var int mrptype */ public $mrptype; + /** + * @var string + */ public $label; /** * @var float Quantity */ public $qty; + /** + * @var int + */ public $fk_warehouse; + /** + * @var int + */ public $fk_soc; + /** + * @var int + */ public $socid; /** @@ -145,9 +166,21 @@ class Mo extends CommonObject */ public $date_valid; + /** + * @var int + */ public $fk_user_creat; + /** + * @var int + */ public $fk_user_modif; + /** + * @var string + */ public $import_key; + /** + * @var int + */ public $status; /** @@ -341,7 +374,7 @@ class Mo extends CommonObject * * @param User $user User that creates * @param int $fromid Id of object to clone - * @return mixed New object created, <0 if KO + * @return self|int<-1,1> New object created, <0 if KO */ public function createFromClone(User $user, $fromid) { @@ -441,9 +474,9 @@ class Mo extends CommonObject /** * Load object in memory from the database * - * @param int $id Id object - * @param string $ref Ref - * @return int Return integer <0 if KO, 0 if not found, >0 if OK + * @param int $id Id object + * @param ?string $ref Ref + * @return int<-1,1> Return integer <0 if KO, 0 if not found, >0 if OK */ public function fetch($id, $ref = null) { @@ -460,7 +493,7 @@ class Mo extends CommonObject /** * Load object lines in memory from the database * - * @return int Return integer <0 if KO, 0 if not found, >0 if OK + * @return int<-1,1> Return integer <0 if KO, 0 if not found, >0 if OK */ public function fetchLines() { @@ -1755,15 +1788,20 @@ class Mo extends CommonObject * If lines are into a template, title must also be into a template * But for the moment we don't know if it's possible as we keep a method available on overloaded objects. * - * @param MoLine $line Line - * @param string $var Var - * @param string $restrictlist ''=All lines, 'services'=Restrict to services only (strike line if not) - * @param string $defaulttpldir Directory where to find the template - * @param array $selectedLines Array of lines id for selected lines + * @param CommonObjectLine $line Line + * @param string $var Var + * @param string $restrictlist ''=All lines, 'services'=Restrict to services only (strike line if not) + * @param string $defaulttpldir Directory where to find the template + * @param int[] $selectedLines Array of lines id for selected lines * @return void */ public function printOriginLine($line, $var, $restrictlist = '', $defaulttpldir = '/core/tpl', $selectedLines = array()) { + if (!$line instanceof MoLine) { + dol_syslog(__METHOD__.'::pringOriginLine $line is '.get_class($line).'<>MoLine', LOG_WARNING); + parent::printOriginLine($line, $var, $restrictlist, $defaulttpldir, $selectedLines); + return; + } $productstatic = new Product($this->db); $this->tpl['id'] = $line->id; @@ -2073,12 +2111,33 @@ class MoLine extends CommonObjectLine 'fk_unit' => array('type' => 'int', 'label' => 'Unit', 'enabled' => 1, 'visible' => 1, 'notnull' => 0, 'position' => 186) ); + /** + * @var int + */ public $rowid; + /** + * @var int + */ public $fk_mo; + /** + * @var int + */ public $origin_id; + /** + * @var string + */ public $origin_type; + /** + * @var int + */ public $position; + /** + * @var int + */ public $fk_product; + /** + * @var int + */ public $fk_warehouse; /** @@ -2090,18 +2149,42 @@ class MoLine extends CommonObjectLine * @var float Quantity frozen */ public $qty_frozen; + /** + * @var int<0,1> + */ public $disable_stock_change; + /** + * @var float|int + */ public $efficiency; /** * @var string batch reference */ public $batch; + /** + * @var string + */ public $role; + /** + * @var int + */ public $fk_mrp_production; + /** + * @var int + */ public $fk_stock_movement; + /** + * @var string + */ public $import_key; + /** + * @var int + */ public $fk_parent_line; + /** + * @var ?int + */ public $fk_unit; /** @@ -2152,9 +2235,9 @@ class MoLine extends CommonObjectLine /** * Create object into database * - * @param User $user User that creates - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int Return integer <0 if KO, Id of created object if OK + * @param User $user User that creates + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int<-1,1> Return integer <0 if KO, Id of created object if OK */ public function create(User $user, $notrigger = 0) { @@ -2169,9 +2252,9 @@ class MoLine extends CommonObjectLine /** * Load object in memory from the database * - * @param int $id Id object - * @param string $ref Ref - * @return int Return integer <0 if KO, 0 if not found, >0 if OK + * @param int $id Id object + * @param string $ref Ref + * @return int<-1,1> Return integer <0 if KO, 0 if not found, >0 if OK */ public function fetch($id, $ref = null) { @@ -2270,9 +2353,9 @@ class MoLine extends CommonObjectLine /** * Update object into database * - * @param User $user User that modifies - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int Return integer <0 if KO, >0 if OK + * @param User $user User that modifies + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int<-1,1> Return integer <0 if KO, >0 if OK */ public function update(User $user, $notrigger = 0) { @@ -2282,9 +2365,9 @@ class MoLine extends CommonObjectLine /** * Delete object in database * - * @param User $user User that deletes - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int Return integer <0 if KO, >0 if OK + * @param User $user User that deletes + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int<-1,1> Return integer <0 if KO, >0 if OK */ public function delete(User $user, $notrigger = 0) { diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 7ae11ba5479..134df60bd30 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -294,7 +294,7 @@ if (empty($reshook)) { $moline->fk_mo = $object->id; $moline->position = $pos; $moline->fk_product = $line->fk_product; - $moline->fk_warehouse = GETPOST('idwarehouse-'.$line->id.'-'.$i); + $moline->fk_warehouse = GETPOSTINT('idwarehouse-'.$line->id.'-'.$i); $moline->qty = $qtytoprocess; $moline->batch = GETPOST('batch-'.$line->id.'-'.$i); $moline->role = 'consumed'; @@ -366,7 +366,7 @@ if (empty($reshook)) { $moline->fk_mo = $object->id; $moline->position = $pos; $moline->fk_product = $line->fk_product; - $moline->fk_warehouse = GETPOST('idwarehousetoproduce-'.$line->id.'-'.$i); + $moline->fk_warehouse = GETPOSTINT('idwarehousetoproduce-'.$line->id.'-'.$i); $moline->qty = $qtytoprocess; $moline->batch = GETPOST('batchtoproduce-'.$line->id.'-'.$i); $moline->role = 'produced'; diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php index 8aa4417aaca..b447a44ac35 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -36,7 +37,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php index 9dd883cd2fb..4ab8eb6eace 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php @@ -33,7 +33,7 @@ class mod_partnership_standard extends ModeleNumRefPartnership { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 678cb581449..21f64159c47 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -325,6 +325,7 @@ foreach ($dirproduct as $dirroot) { } $modCodeProduct = new $file(); + '@phan-var-force ModeleProductCode $modCodeProduct'; // Show modules according to features level if ($modCodeProduct->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -359,7 +360,7 @@ foreach ($dirproduct as $dirroot) { } print ''; diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index a46b586e229..007a836e4cb 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -213,6 +213,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { require_once $dir.$file.'.php'; $module = new $file($db); + '@phan-var-force ModeleNumRefBatch $module'; // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -314,6 +315,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { require_once $dir.$file.'.php'; $module = new $file($db); + '@phan-var-force ModeleNumRefBatch $module'; // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index cd092f0be52..61c060d5661 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -326,6 +326,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.$file.'.php'; $module = new $file(); + '@phan-var-force ModeleNumRefProjects $module'; // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -424,6 +425,7 @@ if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { require_once $dir.$file.'.php'; $module = new $file(); + '@phan-var-force ModeleNumRefTask $module'; // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { diff --git a/htdocs/recruitment/admin/setup.php b/htdocs/recruitment/admin/setup.php index de20a161153..bdc7d8aa747 100644 --- a/htdocs/recruitment/admin/setup.php +++ b/htdocs/recruitment/admin/setup.php @@ -275,6 +275,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file.'.php'; $module = new $file($db); + '@phan-var-force ModeleNumRefRecruitmentJobPosition $module'; // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { diff --git a/htdocs/recruitment/admin/setup_candidatures.php b/htdocs/recruitment/admin/setup_candidatures.php index b09ba76eddb..b856d4dbb9a 100644 --- a/htdocs/recruitment/admin/setup_candidatures.php +++ b/htdocs/recruitment/admin/setup_candidatures.php @@ -266,6 +266,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file.'.php'; $module = new $file($db); + '@phan-var-force ModeleNumRefRecruitmentCandidature $module'; // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { diff --git a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php index 112ad65adb5..cf69d6305a9 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/doc_generic_recruitmentjobposition_odt.modules.php @@ -55,7 +55,7 @@ class doc_generic_recruitmentjobposition_odt extends ModelePDFRecruitmentJobPosi public $phpmin = array(7, 0); /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index 4c68bef7014..de43f0d17d7 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -77,7 +77,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php index 1b7bb041a7a..187d71dbd14 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -36,7 +37,7 @@ class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandida { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php index cb46d8323df..5b0ba51ea83 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php @@ -34,7 +34,7 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php index 2916d71957f..28b5b161c5b 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -36,7 +37,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -119,8 +120,8 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi /** * Return next free value * - * @param RecruitmentJobPosition $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @param RecruitmentJobPosition $object Object we need next value for + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php index e95cfbb2ee8..00211e221d8 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_standard.php @@ -34,7 +34,7 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -118,8 +118,8 @@ class mod_recruitmentjobposition_standard extends ModeleNumRefRecruitmentJobPosi /** * Return next free value * - * @param RecruitmentJobPosition $object Object we need next value for - * @return string|-1 Next value if OK, -1 if KO + * @param RecruitmentJobPosition $object Object we need next value for + * @return string|int<-1,0> Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php index 2f559eb7497..a9427b7e068 100644 --- a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php +++ b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * 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 @@ -81,5 +82,11 @@ abstract class ModelePDFRecruitmentJobPosition extends CommonDocGenerator */ abstract class ModeleNumRefRecruitmentJobPosition extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param RecruitmentJobPosition $object Object we need next value for + * @return string|int<-1,0> Next value if OK, 0 if KO + */ + abstract public function getNextValue($object); } diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 7dfb73ea0c6..98b8516a3fb 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -409,6 +409,7 @@ foreach ($dirsociete as $dirroot) { /** @var ModeleThirdPartyCode $modCodeTiers */ $modCodeTiers = new $file($db); + '@phan-var-force ModeleThirdPartyCode $modCodeTiers'; // Show modules according to features level if ($modCodeTiers->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -495,6 +496,7 @@ foreach ($dirsociete as $dirroot) { } $modCodeCompta = new $file(); + '@phan-var-force ModeleAccountancyCode $modCodeTiers'; $arrayofmodules[$file] = $modCodeCompta; } diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index dc46e17e717..02c2fe2ea96 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -3,6 +3,7 @@ * Copyright (C) 2011-2017 Juanjo Menent * Copyright (C) 2021 Nicolas ZABOURI * Copyright (C) 2022 Alexandre Spangaro + * 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 @@ -171,6 +172,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.$file.'.php'; $module = new $file(); + '@phan-var-force ModeleNumRefTakepos $module'; // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -181,7 +183,7 @@ foreach ($dirmodels as $reldir) { } if ($module->isEnabled()) { - print ''; @@ -312,7 +314,7 @@ $htmltext .= ''; print '\n"; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 666d1ada33d..4a91dfdcc73 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1900,7 +1900,7 @@ class Ticket extends CommonObject if (dol_mkdir($destdir) >= 0) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; dol_move($filespath, $destfile); - if (in_array($actioncomm->code, array('TICKET_MSG', 'TICKET_MSG_SENTBYMAIL'))) { + if (in_array($actioncomm->code, array('TICKET_MSG', 'TICKET_MSG_SENTBYMAIL'))) { $ecmfile = new EcmFiles($this->db); $destdir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $destdir); $destdir = preg_replace('/[\\/]$/', '', $destdir); @@ -2477,6 +2477,7 @@ class Ticket extends CommonObject if ($classname !== '') { $result = dol_include_once($reldir."core/modules/ticket/".$modele.'.php'); $modTicket = new $classname(); + '@phan-var-force ModeleNumRefTicket $modTicket'; $defaultref = $modTicket->getNextValue($thirdparty, $this); }
'.$langs->trans("Parameter").''.$langs->trans("Value").'
\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index e2fe6e501c8..787c011fcb2 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -211,6 +211,8 @@ foreach ($dirmodels as $reldir) { $module = new $file($db); + '@phan-var-force ModeleNumRefMos $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -346,6 +348,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFMo $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -359,7 +363,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 5c346d18e61..43819c9e093 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013-2016 Laurent Destailleur * Copyright (C) 2014-2018 Frederic France * Copyright (C) 2020 Nicolas ZABOURI + * 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 @@ -511,6 +512,9 @@ if ($mode == 'test' && $user->admin) { $classname = 'printing_'.$driver; $langs->load($driver); $printer = new $classname($db); + + '@phan-var-force PrintingDriver $printer'; + //print '
'.print_r($printer, true).'
'; if (count($printer->getlistAvailablePrinters())) { if ($printer->listAvailablePrinters() == 0) { diff --git a/htdocs/admin/order.php b/htdocs/admin/order.php index 2b5b97dc90d..c6ad34ebbe5 100644 --- a/htdocs/admin/order.php +++ b/htdocs/admin/order.php @@ -297,6 +297,8 @@ foreach ($dirmodels as $reldir) { $module = new $file($db); + '@phan-var-force ModeleNumRefCommandes $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -434,6 +436,8 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFCommandes $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -447,7 +451,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "
\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index f41c9e41d76..b6a833c7897 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -91,6 +91,8 @@ foreach ($modulesdir as $dir) { include_once $dir.$file; $objMod = new $modName($db); + '@phan-var-force DolibarrModules $objMod'; + // Load all lang files of module if (isset($objMod->langfiles) && is_array($objMod->langfiles)) { foreach ($objMod->langfiles as $domain) { diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index e1dd61d594c..f4103e2609e 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -274,6 +274,8 @@ foreach ($dirmodels as $reldir) { $module = new $file(); + '@phan-var-force ModeleNumRefPropales $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -283,7 +285,7 @@ foreach ($dirmodels as $reldir) { } if ($module->isEnabled()) { - print '
'.$module->nom."\n"; + print '
'.$module->getName($langs)."\n"; print $module->info($langs); print '\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 60421753b99..9b4c57e7a7d 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -210,6 +210,8 @@ foreach ($dirmodels as $reldir) { $module = new $file(); + '@phan-var-force ModelNumRefReception $module'; + if ($module->isEnabled()) { // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -219,7 +221,7 @@ foreach ($dirmodels as $reldir) { continue; } - print '
'.$module->nom."
'.$module->getName($langs)."'; print $module->info($langs); print '\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/stocktransfer.php b/htdocs/admin/stocktransfer.php index e8573c8e860..85a75023bf5 100644 --- a/htdocs/admin/stocktransfer.php +++ b/htdocs/admin/stocktransfer.php @@ -106,7 +106,7 @@ if ($action == 'updateMask') { require_once $file; $module = new $classname($db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModelePDFStockTransfer $module'; if ($module->write_file($tmpobject, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf"); @@ -269,6 +269,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $module = new $file($db); + '@phan-var-force ModeleNumRefStockTransfer $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -408,6 +410,8 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFStockTransfer $module'; + $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { $modulequalified = 0; @@ -421,7 +425,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 8d6c2485d72..9574ff99163 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -236,6 +236,8 @@ foreach ($dirmodels as $reldir) { $module = new $file(); + '@phan-var-force ModeleNumRefSuppliersInvoices $module'; + if ($module->isEnabled()) { // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -246,7 +248,7 @@ foreach ($dirmodels as $reldir) { } - print '
'.$module->nom."\n"; + print '
'.$module->getName($langs)."\n"; print $module->info($langs); print '
"; @@ -376,7 +380,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db, $specimenthirdparty); if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index f524eeebbef..238ee46d5db 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -252,6 +252,8 @@ foreach ($dirmodels as $reldir) { $module = new $file(); + '@phan-var-force ModeleNumRefSuppliersOrders $module'; + if ($module->isEnabled()) { // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -262,7 +264,7 @@ foreach ($dirmodels as $reldir) { } - print '
'.$module->nom."\n"; + print '
'.$module->getName($langs)."\n"; print $module->info($langs); print '
"; @@ -388,7 +392,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db, $specimenthirdparty); if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index c0283a59d08..c777dc31678 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -235,6 +235,8 @@ foreach ($dirmodels as $reldir) { $module = new $classname($db); + '@phan-var-force ModeleNumRefSupplierPayments $module'; + // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { continue; @@ -351,6 +353,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFSuppliersPayments $module'; print '
"; @@ -358,7 +361,7 @@ foreach ($dirmodels as $reldir) { print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 7117d8cd246..9c2cb5d9915 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -274,7 +274,7 @@ foreach ($dirmodels as $reldir) { } if ($module->isEnabled()) { - print '
'.$module->nom."\n"; + print '
'.$module->getName($langs)."\n"; print $module->info($langs); print '\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/workstation.php b/htdocs/admin/workstation.php index 831fc1c040b..1b84ee67e99 100644 --- a/htdocs/admin/workstation.php +++ b/htdocs/admin/workstation.php @@ -257,7 +257,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file.'.php'; $module = new $file($db); - '@phan-var-force CommonNumRefGenerator $module'; + '@phan-var-force ModeleNumRefWorkstation $module'; // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -300,6 +300,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $nameofclass = ucfirst($myTmpObjectKey); $mytmpinstance = new $nameofclass($db); + '@phan-var-force Workstation $mytmpinstance'; $mytmpinstance->initAsSpecimen(); // Info @@ -397,7 +398,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file; $module = new $classname($db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModelePDFWorkstation $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -412,7 +413,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index fe5ffbc9488..d99a780773a 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -65,6 +65,7 @@ class Setup extends DolibarrApi * @param string $lang Code of the language the label of the type must be translated to * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.label:like:'SO-%')" * @return array List of extra fields + * @phan-return Object[] List of extra fields * * @url GET actiontriggers * diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index e642bc66210..923bc18794c 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -1637,6 +1637,9 @@ class Asset extends CommonObject if (class_exists($classname)) { $obj = new $classname(); + + '@phan-var-force ModeleNumRefAsset $obj'; + $numref = $obj->getNextValue($this); if ($numref != '' && $numref != '-1') { diff --git a/htdocs/asset/tpl/linkedobjectblock.tpl.php b/htdocs/asset/tpl/linkedobjectblock.tpl.php index dbefa204f71..bb6034c6f70 100644 --- a/htdocs/asset/tpl/linkedobjectblock.tpl.php +++ b/htdocs/asset/tpl/linkedobjectblock.tpl.php @@ -30,7 +30,9 @@ global $user; global $noMoreLinkedObjectBlockAfter; $langs = $GLOBALS['langs']; +'@phan-var-force Translate $langs'; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; +'@phan-var-force CommonObject[] $linkedObjectBlock'; // Load translation files required by the page $langs->load("assets"); diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index de1f4f96e4d..dd11e60e242 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -87,7 +87,7 @@ if (getDolGlobalString('BARCODE_THIRDPARTY_ADDON_NUM')) { } $modBarCodeThirdparty = new $file(); - '@phan-var-force ModeleNumRefBarCode $module'; + '@phan-var-force ModeleNumRefBarCode $modBarCodeThirdparty'; break; } } @@ -192,7 +192,7 @@ if (getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) { } $modBarCodeProduct = new $file(); - '@phan-var-force ModeleNumRefBarCode $module'; + '@phan-var-force ModeleNumRefBarCode $modBarCodeProduct'; break; } } diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 23b0ab902db..fb77d5142f3 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -449,6 +449,8 @@ class BOM extends CommonObject $objectline = new $objectlineclassname($this->db); + '@phan-var-force BOMLine $objectline'; + $sql = "SELECT ".$objectline->getFieldList('l'); $sql .= " FROM ".$this->db->prefix().$objectline->table_element." as l"; $sql .= " LEFT JOIN ".$this->db->prefix()."product as p ON p.rowid = l.fk_product"; @@ -466,6 +468,7 @@ class BOM extends CommonObject $obj = $this->db->fetch_object($resql); if ($obj) { $newline = new $objectlineclassname($this->db); + '@phan-var-force BOMLine $newline'; $newline->setVarsFromFetchObj($obj); $this->lines[] = $newline; @@ -883,6 +886,7 @@ class BOM extends CommonObject } $obj = new $classname(); + '@phan-var-force ModeleNumRefBoms $obj'; $numref = $obj->getNextValue($prod, $this); if ($numref != "") { @@ -1635,9 +1639,9 @@ class BOM extends CommonObject /** * Return clickable link of object (with eventually picto) * - * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) - * @param array $arraydata Array of data - * @return string HTML Code for Kanban thumb. + * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) + * @param array{prod:?Product,selected:int<-1,1>} $arraydata Array of data + * @return string HTML Code for Kanban thumb. */ public function getKanbanView($option = '', $arraydata = null) { diff --git a/htdocs/bom/tpl/linkedobjectblock.tpl.php b/htdocs/bom/tpl/linkedobjectblock.tpl.php index 11706c64d15..aa429b2d65c 100644 --- a/htdocs/bom/tpl/linkedobjectblock.tpl.php +++ b/htdocs/bom/tpl/linkedobjectblock.tpl.php @@ -31,12 +31,15 @@ global $user, $db; global $noMoreLinkedObjectBlockAfter; $langs = $GLOBALS['langs']; +'@phan-var-force Translate $langs'; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; // Load translation files required by the page $langs->load("bom"); +'@phan-var-force array $linkedObjectBlock'; // Type before use $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); +'@phan-var-force array $linkedObjectBlock'; // Type after dol_sort_array which looses typing $total = 0; $ilink = 0; diff --git a/htdocs/bookcal/class/availabilities.class.php b/htdocs/bookcal/class/availabilities.class.php index 167e583513b..a4dca379e16 100644 --- a/htdocs/bookcal/class/availabilities.class.php +++ b/htdocs/bookcal/class/availabilities.class.php @@ -1027,6 +1027,8 @@ class Availabilities extends CommonObject if (class_exists($classname)) { $obj = new $classname(); + '@phan-var-force CommonNumRefGenerator $obj'; + $numref = $obj->getNextValue($this); if ($numref != '' && $numref != '-1') { diff --git a/htdocs/bookcal/class/calendar.class.php b/htdocs/bookcal/class/calendar.class.php index 1a7246596a0..12410003ba5 100644 --- a/htdocs/bookcal/class/calendar.class.php +++ b/htdocs/bookcal/class/calendar.class.php @@ -1,7 +1,7 @@ - * Copyright (C) 2023-2024 Frédéric France - * Copyright (C) 2023 Alice Adminson +/* Copyright (C) 2017 Laurent Destailleur + * Copyright (C) 2023-2024 Frédéric France + * Copyright (C) 2023 Alice Adminson * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -122,20 +122,65 @@ class Calendar extends CommonObject 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'position' => 1000, 'notnull' => -1, 'visible' => -2,), 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'position' => 2000, 'notnull' => 1, 'default' => '0', 'visible' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '9' => 'Closed'), 'validate' => 1,), ); + /** + * @var int + */ public $rowid; + /** + * @var int + */ public $entity; + /** + * @var string + */ public $ref; + /** + * @var string + */ public $label; + /** + * @var int + */ public $type; + /** + * @var int + */ public $visibility; + /** + * @var int + */ public $fk_soc; + /** + * @var int + */ public $fk_project; + /** + * @var string + */ public $description; + /** + * @var string + */ public $note_public; + /** + * @var string + */ public $note_private; + /** + * @var int + */ public $fk_user_creat; + /** + * @var int + */ public $fk_user_modif; + /** + * @var string + */ public $import_key; + /** + * @var int + */ public $status; // END MODULEBUILDER PROPERTIES @@ -208,7 +253,7 @@ class Calendar extends CommonObject * * @param User $user User that creates * @param int $fromid Id of object to clone - * @return mixed New object created, <0 if KO + * @return self|int<-1,-1> New object created, <0 if KO */ public function createFromClone(User $user, $fromid) { @@ -227,7 +272,7 @@ class Calendar extends CommonObject $object->fetchLines(); } - // get lines so they will be clone + // get lines so they will be cloned //foreach($this->lines as $line) // $line->fetch_optionals(); @@ -342,7 +387,7 @@ class Calendar extends CommonObject * @param string $filter Filter as an Universal Search string. * Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')' * @param string $filtermode No more used - * @return array|int int <0 if KO, array of pages if OK + * @return self[]|int int <0 if KO, array of pages if OK */ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND') { @@ -771,7 +816,7 @@ class Calendar extends CommonObject * Return a thumb for kanban views * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) - * @param array $arraydata Array of data + * @param array{string,mixed} $arraydata Array of data * @return string HTML Code for Kanban thumb. */ public function getKanbanView($option = '', $arraydata = null) @@ -913,7 +958,7 @@ class Calendar extends CommonObject /** * Create an array of lines * - * @return array|int array of lines if OK, <0 if KO + * @return CalendarLine[]|int array of lines if OK, <0 if KO */ public function getLinesArray() { @@ -967,6 +1012,8 @@ class Calendar extends CommonObject if (class_exists($classname)) { $obj = new $classname(); + '@phan-var-force CommonNumRefGenerator $obj'; + $numref = $obj->getNextValue($this); if ($numref != '' && $numref != '-1') { @@ -994,7 +1041,7 @@ class Calendar extends CommonObject * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param ?array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 21454dd18fb..b8f8cfede1c 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1456,7 +1456,7 @@ class Categorie extends CommonObject /** * Returns an array containing the list of parent categories * - * @return int|array Return integer <0 KO, array OK + * @return int|Categorie[] Return integer <0 KO, array OK */ public function get_meres() { @@ -1488,7 +1488,7 @@ class Categorie extends CommonObject * Returns in a table all possible paths to get to the category * starting with the major categories represented by Tables of categories * - * @return array + * @return Categorie[][] */ public function get_all_ways() { diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index c1ba46ea7a1..e66237e0bff 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -682,7 +682,7 @@ if (empty($reshook)) { $remise_percent = (GETPOST('remiseforalllines') ? GETPOST('remiseforalllines') : 0); $remise_percent = str_replace('*', '', $remise_percent); foreach ($object->lines as $line) { - $tvatx= $line->tva_tx; + $tvatx = $line->tva_tx; if (!empty($line->vat_src_code)) { $tvatx .= ' ('.$line->vat_src_code.')'; } @@ -1913,7 +1913,7 @@ if ($action == 'create' && $usercancreate) { print "
".$langs->trans("DefaultContact").''; print img_picto('', 'contact', 'class="pictofixedwidth"'); //print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx'); - print $form->select_contact($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx', true); + print $form->select_contact($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx', true); print '
'; - $currentLineProductId=GETPOSTISSET('idprod')?GETPOST('idprod'):(!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0); + $currentLineProductId = GETPOSTISSET('idprod') ? GETPOST('idprod') : (!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0); if ($objp->fk_product > 0) { $canchangeproduct = 1; @@ -1773,7 +1773,7 @@ if ($action == 'create') { if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) { $nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT'); } - $doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc')?GETPOST('product_desc'):$objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%'); + $doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc') ? GETPOST('product_desc') : $objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%'); $doleditor->Create(); print ''; - print $form->selectUnits((GETPOSTISSET('unit')?GETPOST('unit'):$objp->fk_unit), "unit"); + print $form->selectUnits((GETPOSTISSET('unit') ? GETPOSTINT('unit') : $objp->fk_unit), "unit"); print '%%'; if ($objp->fk_product) { print ''; } - print ''; print ''; diff --git a/htdocs/core/boxes/box_last_knowledgerecord.php b/htdocs/core/boxes/box_last_knowledgerecord.php index 354c21b00ce..499b108ed0e 100644 --- a/htdocs/core/boxes/box_last_knowledgerecord.php +++ b/htdocs/core/boxes/box_last_knowledgerecord.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2016 Jean-François FERRY * Copyright (C) 2016 Christophe Battarel * Copyright (C) 2018-2023 Frédéric France + * 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 @@ -41,12 +42,12 @@ class box_last_knowledgerecord extends ModeleBoxes public $boximg = "knowledgemanagement"; /** - * @var string boc label + * @var string box label */ public $boxlabel; /** - * @var array box dependencies + * @var string[] box dependencies */ public $depends = array("knowledgemanagement"); @@ -98,7 +99,7 @@ class box_last_knowledgerecord extends ModeleBoxes $sql .= " AND k.fk_soc= ".((int) $user->socid); } - $sql.= " AND k.status > 0"; + $sql .= " AND k.status > 0"; $sql .= " ORDER BY k.date_creation DESC, k.rowid DESC "; $sql .= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/box_last_modified_knowledgerecord.php b/htdocs/core/boxes/box_last_modified_knowledgerecord.php index baf376bcbe7..8a574e2d237 100644 --- a/htdocs/core/boxes/box_last_modified_knowledgerecord.php +++ b/htdocs/core/boxes/box_last_modified_knowledgerecord.php @@ -3,6 +3,7 @@ * Copyright (C) 2013-2016 Jean-François FERRY * Copyright (C) 2016 Christophe Battarel * Copyright (C) 2018-2023 Frédéric France + * 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 @@ -46,7 +47,7 @@ class box_last_modified_knowledgerecord extends ModeleBoxes public $boxlabel; /** - * @var array box dependencies + * @var string[] box dependencies */ public $depends = array("knowledgemanagement"); @@ -98,7 +99,7 @@ class box_last_modified_knowledgerecord extends ModeleBoxes $sql .= " AND k.fk_soc= ".((int) $user->socid); } - $sql.= " AND k.status > 0"; + $sql .= " AND k.status > 0"; $sql .= " ORDER BY k.tms DESC, k.rowid DESC "; $sql .= $this->db->plimit($max, 0); diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php index ea727fbf289..7520d84c6bc 100644 --- a/htdocs/core/boxes/modules_boxes.php +++ b/htdocs/core/boxes/modules_boxes.php @@ -1,8 +1,8 @@ - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2014 Raphaël Doursenaud - * Copyright (C) 2015 Frederic France +/* Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014 Raphaël Doursenaud + * Copyright (C) 2015 Frederic France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -39,6 +39,13 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo */ public $db; + /** + * Must be defined in the box class + * + * @var ''|'development'|'experimental'|'dolibarr' + */ + public $version; + /** * @var string param */ @@ -60,7 +67,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo public $error = ''; /** - * @var int Maximum lines + * @var int<0,max> Maximum lines */ public $max = 5; @@ -131,6 +138,24 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo public $widgettype = ''; + //! Must be provided in child classes + /** + * Note $picto is deprecated + * + * @var string Example "accountancy" + */ + public $boximg; + /** + * @var string Example "BoxLastManualEntries" + */ + public $boxlabel; + /** + * @var string[] Example array("accounting") + */ + public $depends; + + + /** * Constructor * @@ -156,9 +181,9 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo /** * Load a box line from its rowid * - * @param int $rowid Row id to load + * @param int $rowid Row id to load * - * @return int Return integer <0 if KO, >0 if OK + * @return int<-1,1> Return integer <0 if KO, >0 if OK */ public function fetch($rowid) { @@ -196,7 +221,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo * * @param array{text?:string,sublink?:string,subpicto:?string,nbcol?:int,limit?:int,subclass?:string,graph?:string} $head Array with properties of box title * @param array> $contents Array with properties of box lines - * @param int $nooutput No print, only return string + * @param int<0,1> $nooutput No print, only return string * @return string */ public function showBox($head, $contents, $nooutput = 0) @@ -417,7 +442,8 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo * List is sorted by widget filename so by priority to run. * * @param ?string[] $forcedirwidget null=All default directories. This parameter is used by modulebuilder module only. - * @return array Array list of widget + * @return array Array list of widgets + * */ public static function getWidgetsList($forcedirwidget = null) { @@ -503,6 +529,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo } $objMod = new $modName($db); + '@phan-var-force ModeleBoxes $objMod'; if (is_object($objMod)) { // Define disabledbyname and disabledbymodule $disabledbyname = 0; @@ -513,9 +540,8 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo if (preg_match('/NORUN$/i', $files[$key])) { $disabledbyname = 1; } - // We set info of modules - $widget[$j]['picto'] = (empty($objMod->picto) ? (empty($objMod->boximg) ? img_object('', 'generic') : $objMod->boximg) : img_object('', $objMod->picto)); + $widget[$j]['picto'] = ((!property_exists($objMod, 'picto') || empty($objMod->picto)) ? (empty($objMod->boximg) ? img_object('', 'generic') : $objMod->boximg) : img_object('', $objMod->picto)); $widget[$j]['file'] = $files[$key]; $widget[$j]['fullpath'] = $fullpath[$key]; $widget[$j]['relpath'] = $relpath[$key]; diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 38060f89b73..aff8e70e489 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -43,7 +43,7 @@ abstract class CommonDocGenerator public $name = ''; /** - * @var string Version + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Version */ public $version = ''; @@ -1033,6 +1033,7 @@ abstract class CommonDocGenerator dol_include_once($InfoFieldList[1]); if ($classname && class_exists($classname)) { $tmpobject = new $classname($this->db); + '@phan-var-force CommonObject $tmpobject'; $tmpobject->fetch($id); // completely replace the id with the linked object name $formatedarrayoption['options_'.$key] = $tmpobject->name; diff --git a/htdocs/core/class/commonnumrefgenerator.class.php b/htdocs/core/class/commonnumrefgenerator.class.php index bdffbf7a372..20b956034b0 100644 --- a/htdocs/core/class/commonnumrefgenerator.class.php +++ b/htdocs/core/class/commonnumrefgenerator.class.php @@ -36,7 +36,7 @@ abstract class CommonNumRefGenerator public $name = ''; /** - * @var string Version + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'experimental'|'dolibarr' Version */ public $version = ''; @@ -164,4 +164,12 @@ abstract class CommonNumRefGenerator } return $langs->trans("NotAvailable"); } + + + /** + * Return an example of numbering + * + * @return string Example + */ + abstract public function getExample(); } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index aa8089f82a7..74a7ccd6ac3 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -166,12 +166,12 @@ abstract class CommonObject public $linkedObjectsIds; /** - * @var mixed Array of linked objects. Loaded by ->fetchObjectLinked + * @var array Array of linked objects. Loaded by ->fetchObjectLinked, key = object type */ public $linkedObjects; /** - * @var boolean[] Array of boolean with object id as key and value as true if linkedObjects full loaded for object id. Loaded by ->fetchObjectLinked. Important for pdf generation time reduction. + * @var array Array of boolean with object id as key and value as true if linkedObjects full loaded for object id. Loaded by ->fetchObjectLinked. Important for pdf generation time reduction. */ private $linkedObjectsFullLoaded = array(); diff --git a/htdocs/core/class/commonsocialnetworks.class.php b/htdocs/core/class/commonsocialnetworks.class.php index e82e35ba067..0c7a61a9c5b 100644 --- a/htdocs/core/class/commonsocialnetworks.class.php +++ b/htdocs/core/class/commonsocialnetworks.class.php @@ -1,5 +1,6 @@ + * 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 @@ -28,7 +29,7 @@ trait CommonSocialNetworks { /** - * @var array array of socialnetworks + * @var array */ public $socialnetworks; @@ -36,7 +37,7 @@ trait CommonSocialNetworks /** * Show social network part if the module is enabled with hiding functionality * - * @param array $socialnetworks Array of social networks + * @param array,icon:string,label:string}> $socialnetworks Array of social networks * @param int $colspan Colspan * @return void */ diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index e43bd09705e..71f6df7c1cb 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -2093,6 +2093,7 @@ class ExtraFields dol_include_once($InfoFieldList[1]); if ($classname && class_exists($classname)) { $object = new $classname($this->db); + '@phan-var-force CommonObject $object'; $object->fetch($value); $value = $object->getNomUrl(3); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7cb4995469d..99dab2ef8ad 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5036,7 +5036,7 @@ class Form /** * Creates HTML units selector (code => label) * - * @param string $selected Preselected Unit ID + * @param int|'' $selected Preselected Unit ID * @param string $htmlname Select name * @param int<0,1> $showempty Add an empty line * @param string $unit_type Restrict to one given unit type @@ -5085,7 +5085,7 @@ class Form /** * Return a HTML select list of bank accounts * - * @param int|string $selected Id account preselected + * @param int|'' $selected Id account preselected * @param string $htmlname Name of select zone * @param int $status Status of searched accounts (0=open, 1=closed, 2=both) * @param string $filtre To filter the list. This parameter must not come from input of users @@ -9067,7 +9067,7 @@ class Form $tmpvalue = empty($value['label']) ? '' : $value['label']; $tmpcolor = empty($value['color']) ? '' : $value['color']; $tmppicto = empty($value['picto']) ? '' : $value['picto']; - $tmplabelhtml = empty($value['labelhtml']) ? (empty($value['data-html']) ? '' : $value['data-html']): $value['labelhtml']; + $tmplabelhtml = empty($value['labelhtml']) ? (empty($value['data-html']) ? '' : $value['data-html']) : $value['labelhtml']; } $newval = ($translate ? $langs->trans($tmpvalue) : $tmpvalue); $newval = ($key_in_label ? $tmpkey . ' - ' . $newval : $newval); diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 8b7c851a830..e2952c83135 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1776,14 +1776,14 @@ class FormMail extends Form } /** - * Find if template exists and are available for current user, then set them into $this->lines_model. - * Search into table c_email_templates + * Find if template exists and are available for current user, then set them into $this->lines_model. + * Search in table c_email_templates * - * @param string $type_template Get message for key module - * @param User $user Use template public or limited to this user - * @param Translate $outputlangs Output lang object - * @param int $active 1=Only active template, 0=Only disabled, -1=All - * @return int Return integer <0 if KO, nb of records found if OK + * @param string $type_template Get message for key module + * @param User $user Use template public or limited to this user + * @param ?Translate $outputlangs Output lang object + * @param int<-1,1> $active 1=Only active template, 0=Only disabled, -1=All + * @return int<-1,max> Return integer <0 if KO, nb of records found if OK */ public function fetchAllEMailTemplate($type_template, $user, $outputlangs, $active = 1) { @@ -2036,28 +2036,28 @@ class ModelMail extends CommonObject /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ - public $fields=array( - "rowid" => array("type"=>"integer", "label"=>"TechnicalID", "enabled"=>"1", 'position'=>10, 'notnull'=>1, "visible"=>"-1",), - "module" => array("type"=>"varchar(32)", "label"=>"Module", "enabled"=>"1", 'position'=>20, 'notnull'=>0, "visible"=>"-1",), - "type_template" => array("type"=>"varchar(32)", "label"=>"Typetemplate", "enabled"=>"1", 'position'=>25, 'notnull'=>0, "visible"=>"-1",), - "lang" => array("type"=>"varchar(6)", "label"=>"Lang", "enabled"=>"1", 'position'=>30, 'notnull'=>0, "visible"=>"-1",), - "private" => array("type"=>"smallint(6)", "label"=>"Private", "enabled"=>"1", 'position'=>35, 'notnull'=>1, "visible"=>"-1",), - "fk_user" => array("type"=>"integer:User:user/class/user.class.php", "label"=>"Fkuser", "enabled"=>"1", 'position'=>40, 'notnull'=>0, "visible"=>"-1", "css"=>"maxwidth500 widthcentpercentminusxx", "csslist"=>"tdoverflowmax150",), - "datec" => array("type"=>"datetime", "label"=>"DateCreation", "enabled"=>"1", 'position'=>45, 'notnull'=>0, "visible"=>"-1",), - "tms" => array("type"=>"timestamp", "label"=>"DateModification", "enabled"=>"1", 'position'=>50, 'notnull'=>1, "visible"=>"-1",), - "label" => array("type"=>"varchar(255)", "label"=>"Label", "enabled"=>"1", 'position'=>55, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1", "css"=>"minwidth300", "cssview"=>"wordbreak", "csslist"=>"tdoverflowmax150",), - "position" => array("type"=>"smallint(6)", "label"=>"Position", "enabled"=>"1", 'position'=>60, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "active" => array("type"=>"integer", "label"=>"Active", "enabled"=>"1", 'position'=>65, 'notnull'=>1, "visible"=>"-1", "alwayseditable"=>"1",), - "topic" => array("type"=>"text", "label"=>"Topic", "enabled"=>"1", 'position'=>70, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "content" => array("type"=>"mediumtext", "label"=>"Content", "enabled"=>"1", 'position'=>75, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "content_lines" => array("type"=>"text", "label"=>"Contentlines", "enabled"=>"1", 'position'=>80, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "enabled" => array("type"=>"varchar(255)", "label"=>"Enabled", "enabled"=>"1", 'position'=>85, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "joinfiles" => array("type"=>"varchar(255)", "label"=>"Joinfiles", "enabled"=>"1", 'position'=>90, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "email_from" => array("type"=>"varchar(255)", "label"=>"Emailfrom", "enabled"=>"1", 'position'=>95, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "email_to" => array("type"=>"varchar(255)", "label"=>"Emailto", "enabled"=>"1", 'position'=>100, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "email_tocc" => array("type"=>"varchar(255)", "label"=>"Emailtocc", "enabled"=>"1", 'position'=>105, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "email_tobcc" => array("type"=>"varchar(255)", "label"=>"Emailtobcc", "enabled"=>"1", 'position'=>110, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), - "defaultfortype" => array("type"=>"smallint(6)", "label"=>"Defaultfortype", "enabled"=>"1", 'position'=>115, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",), + public $fields = array( + "rowid" => array("type" => "integer", "label" => "TechnicalID", "enabled" => "1", 'position' => 10, 'notnull' => 1, "visible" => "-1",), + "module" => array("type" => "varchar(32)", "label" => "Module", "enabled" => "1", 'position' => 20, 'notnull' => 0, "visible" => "-1",), + "type_template" => array("type" => "varchar(32)", "label" => "Typetemplate", "enabled" => "1", 'position' => 25, 'notnull' => 0, "visible" => "-1",), + "lang" => array("type" => "varchar(6)", "label" => "Lang", "enabled" => "1", 'position' => 30, 'notnull' => 0, "visible" => "-1",), + "private" => array("type" => "smallint(6)", "label" => "Private", "enabled" => "1", 'position' => 35, 'notnull' => 1, "visible" => "-1",), + "fk_user" => array("type" => "integer:User:user/class/user.class.php", "label" => "Fkuser", "enabled" => "1", 'position' => 40, 'notnull' => 0, "visible" => "-1", "css" => "maxwidth500 widthcentpercentminusxx", "csslist" => "tdoverflowmax150",), + "datec" => array("type" => "datetime", "label" => "DateCreation", "enabled" => "1", 'position' => 45, 'notnull' => 0, "visible" => "-1",), + "tms" => array("type" => "timestamp", "label" => "DateModification", "enabled" => "1", 'position' => 50, 'notnull' => 1, "visible" => "-1",), + "label" => array("type" => "varchar(255)", "label" => "Label", "enabled" => "1", 'position' => 55, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1", "css" => "minwidth300", "cssview" => "wordbreak", "csslist" => "tdoverflowmax150",), + "position" => array("type" => "smallint(6)", "label" => "Position", "enabled" => "1", 'position' => 60, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "active" => array("type" => "integer", "label" => "Active", "enabled" => "1", 'position' => 65, 'notnull' => 1, "visible" => "-1", "alwayseditable" => "1",), + "topic" => array("type" => "text", "label" => "Topic", "enabled" => "1", 'position' => 70, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "content" => array("type" => "mediumtext", "label" => "Content", "enabled" => "1", 'position' => 75, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "content_lines" => array("type" => "text", "label" => "Contentlines", "enabled" => "1", 'position' => 80, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "enabled" => array("type" => "varchar(255)", "label" => "Enabled", "enabled" => "1", 'position' => 85, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "joinfiles" => array("type" => "varchar(255)", "label" => "Joinfiles", "enabled" => "1", 'position' => 90, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "email_from" => array("type" => "varchar(255)", "label" => "Emailfrom", "enabled" => "1", 'position' => 95, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "email_to" => array("type" => "varchar(255)", "label" => "Emailto", "enabled" => "1", 'position' => 100, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "email_tocc" => array("type" => "varchar(255)", "label" => "Emailtocc", "enabled" => "1", 'position' => 105, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "email_tobcc" => array("type" => "varchar(255)", "label" => "Emailtobcc", "enabled" => "1", 'position' => 110, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), + "defaultfortype" => array("type" => "smallint(6)", "label" => "Defaultfortype", "enabled" => "1", 'position' => 115, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",), ); public $rowid; public $type_template; diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index a61eff37261..1860dd3c404 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -1063,9 +1063,11 @@ class Ldap /** * Returns an array containing attributes and values for first record * + * array{count:int,0..max:string,string:array} + * * @param string $dn DN entry key * @param string $filter Filter - * @return int|array if KO: <=0 || if OK: array + * @return int|array<'count'|int|string,int|string|array> if KO: <=0 || if OK: array */ public function getAttribute($dn, $filter) { diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 16a76979147..016906d0430 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -909,8 +909,8 @@ function security_prepare_head() /** * Prepare array with list of tabs * - * @param object $object Descriptor class - * @return array Array of tabs to show + * @param DolibarrModules $object Descriptor class + * @return array> Array of tabs to show */ function modulehelp_prepare_head($object) { @@ -1172,6 +1172,7 @@ function activateModule($value, $withdeps = 1, $noconfverification = 0) } $objMod = new $modName($db); + '@phan-var-force DolibarrModules $objMod'; // Test if PHP version ok $verphp = versionphparray(); @@ -1313,6 +1314,7 @@ function unActivateModule($value, $requiredby = 1) if ($found) { $objMod = new $modName($db); + '@phan-var-force DolibarrModules $objMod'; $result = $objMod->remove(); if ($result <= 0) { $ret = $objMod->error; @@ -1385,6 +1387,7 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab if ($modName) { include_once $dir.$file; $objMod = new $modName($db); + '@phan-var-force DolibarrModules $objMod'; if ($objMod->numero > 0) { $j = $objMod->numero; @@ -1417,7 +1420,9 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab // phpcs:disable // Complete the arrays &$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond + // @phan-suppress-next-line PhanUndeclaredProperty if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) { + // @phan-suppress-next-line PhanUndeclaredProperty $objMod->dictionaries = $objMod->{"dictionnaries"}; // For backward compatibility } // phpcs:enable @@ -1549,6 +1554,7 @@ function activateModulesRequiredByCountry($country_code) if ($modName) { include_once $dir.$file; $objMod = new $modName($db); + '@phan-var-force DolibarrModules $objMod'; $modulequalified = 1; @@ -1567,7 +1573,7 @@ function activateModulesRequiredByCountry($country_code) if ($modulequalified) { // Load languages files of module - if (isset($objMod->automatic_activation) && is_array($objMod->automatic_activation) && isset($objMod->automatic_activation[$country_code])) { + if (property_exists($objMod, 'automatic_activation') && isset($objMod->automatic_activation) && is_array($objMod->automatic_activation) && isset($objMod->automatic_activation[$country_code])) { activateModule($modName); setEventMessages($objMod->automatic_activation[$country_code], null, 'warnings'); diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index 5e8a982ddbe..a3ea72226a1 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -1,6 +1,7 @@ * Copyright (C) 2006-2021 Regis Houssin + * 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 @@ -121,12 +122,12 @@ function show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass) /** * Show a LDAP array into an HTML output array. * - * @param array $result Array to show. This array is already encoded into charset_output - * @param int $level Level - * @param int $count Count - * @param string $var Var - * @param int $hide Hide - * @param int $subcount Subcount + * @param array<'count'|int|string,int|string|array> $result Array to show. This array is already encoded into charset_output + * @param int $level Level + * @param int $count Count + * @param string $var Var + * @param int<0,1> $hide Hide + * @param int $subcount Subcount * @return int */ function show_ldap_content($result, $level, $count, $var, $hide = 0, $subcount = 0) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index c16be0eb8b3..8eeea4da03a 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1551,6 +1551,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc); } + $libelleproduitservice = ''; // Default value if (!getDolGlobalString('PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES')) { // Description short of product line $libelleproduitservice = $label; diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php index b362e44a4e5..a37790cbd9e 100644 --- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php +++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php @@ -5,6 +5,7 @@ * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2021 Philippe Grand * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -41,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; class doc_generic_asset_odt extends ModelePDFAsset { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php index 4f2b3b61e64..d06bcf717a6 100644 --- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php +++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php @@ -71,7 +71,7 @@ class pdf_standard_asset extends ModelePDFAsset /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index 5495d8b886f..06e4410a5b3 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -35,7 +36,7 @@ class mod_asset_advanced extends ModeleNumRefAsset { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -116,7 +117,7 @@ class mod_asset_advanced extends ModeleNumRefAsset * Return next free value * * @param Asset $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @return string|int<-1,1> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/asset/mod_asset_standard.php b/htdocs/core/modules/asset/mod_asset_standard.php index d09748f158c..506a60388ca 100644 --- a/htdocs/core/modules/asset/mod_asset_standard.php +++ b/htdocs/core/modules/asset/mod_asset_standard.php @@ -35,7 +35,7 @@ class mod_asset_standard extends ModeleNumRefAsset { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -117,11 +117,12 @@ class mod_asset_standard extends ModeleNumRefAsset return true; } + /** * Return next free value * - * @param Asset $object Object we need next value for - * @return string|-1 Next value if OK, -1 if KO + * @param Asset $object Object we need next value for + * @return string|int<-1,1> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/asset/modules_asset.php b/htdocs/core/modules/asset/modules_asset.php index 2d196e395ba..b2b3c1e8e0a 100644 --- a/htdocs/core/modules/asset/modules_asset.php +++ b/htdocs/core/modules/asset/modules_asset.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * 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 @@ -81,5 +82,11 @@ abstract class ModelePDFAsset extends CommonDocGenerator */ abstract class ModeleNumRefAsset extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Asset $object Object we need next value for + * @return string|int<-1,1> Next value if OK, <=0 if KO + */ + abstract public function getNextValue($object); } diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index cd705085d61..babe8791bdc 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; class pdf_ban extends ModeleBankAccountDoc { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'development'; diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 9da84b80400..6b7441a25ce 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -39,7 +39,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php index 3ef61f9e1e3..b066f2a460c 100644 --- a/htdocs/core/modules/barcode/doc/phpbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/phpbarcode.modules.php @@ -1,6 +1,7 @@ * Copyright (C) 2005 Regis Houssin + * 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 @@ -34,9 +35,9 @@ class modPhpbarcode extends ModeleBarCode { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z''development'|'experimental'|'dolibarr' */ - public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + public $version = 'dolibarr'; /** * @var string Error code (or message) diff --git a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php index c114ab8d694..e93e8dfee23 100644 --- a/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php +++ b/htdocs/core/modules/barcode/doc/tcpdfbarcode.modules.php @@ -34,9 +34,9 @@ class modTcpdfbarcode extends ModeleBarCode { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z''development'|'experimental'|'dolibarr' */ - public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + public $version = 'dolibarr'; /** * @var string Error code (or message) diff --git a/htdocs/core/modules/barcode/mod_barcode_product_standard.php b/htdocs/core/modules/barcode/mod_barcode_product_standard.php index c1470f290ef..944e244fd17 100644 --- a/htdocs/core/modules/barcode/mod_barcode_product_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_product_standard.php @@ -39,7 +39,7 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -109,12 +109,16 @@ class mod_barcode_product_standard extends ModeleNumRefBarCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs - * @param ?Product $objproduct Object product - * @return string Return string example + * @param ?Translate $langs Object langs + * @param ?CommonObject $objproduct Object + * @return string Return string example */ - public function getExample($langs, $objproduct = null) + public function getExample($langs = null, $objproduct = null) { + if (!$langs instanceof Translate) { + $langs = $GLOBALS['langs']; + '@phan-var-force Translate $langs'; + } $examplebarcode = $this->getNextValue($objproduct, ''); if (!$examplebarcode) { $examplebarcode = $langs->trans('NotConfigured'); diff --git a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php index 036a5b4a4cb..9cb371267b6 100644 --- a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php +++ b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php @@ -38,25 +38,48 @@ class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode { public $name = 'Standard'; // Model Name - public $code_modifiable; // Editable code + /** + * @var int<0,1> Editable code + */ + public $code_modifiable; - public $code_modifiable_invalide; // Modified code if it is invalid + /** + * @var int<0,1> Modified code if it is invalid + */ + public $code_modifiable_invalide; - public $code_modifiable_null; // Modified code if it is null + /** + * @var int<0,1> Modified code if it is null + */ + public $code_modifiable_null; - public $code_null; // Optional code + /** + * @var int<0,1> Optional code + */ + public $code_null; /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' - public $searchcode; // Search string + /** + * @var string Search string + */ + public $searchcode; - public $numbitcounter; // Number of digits the counter + /** + * Number of digits for the counter (not bits, but digits) + * + * @var int<0,max> + */ + public $numbitcounter; - public $prefixIsRequired; // The prefix field of third party must be filled when using {pre} + /** + * @var int<0,1> If the prefix field of third party must be filled when using {pre} + */ + public $prefixIsRequired; /** @@ -122,12 +145,16 @@ class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs - * @param ?Societe $objthirdparty Object third-party - * @return string Return string example + * @param ?Translate $langs Object langs + * @param ?CommonObject $objthirdparty Object third-party / Societe + * @return string Return string example */ - public function getExample($langs, $objthirdparty = null) + public function getExample($langs = null, $objthirdparty = null) { + if (!$langs instanceof Translate) { + $langs = $GLOBALS['langs']; + '@phan-var-force Translate $langs'; + } $examplebarcode = $this->getNextValue($objthirdparty, ''); if (!$examplebarcode) { $examplebarcode = $langs->trans('NotConfigured'); diff --git a/htdocs/core/modules/barcode/modules_barcode.class.php b/htdocs/core/modules/barcode/modules_barcode.class.php index 51ba9c9a0d6..9512e3e2036 100644 --- a/htdocs/core/modules/barcode/modules_barcode.class.php +++ b/htdocs/core/modules/barcode/modules_barcode.class.php @@ -29,6 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php'; /** * Parent class for barcode document generators (image) + * + * @property 'development'|'experimental'|'dolibarr' $version Dolibarr version of loaded document */ abstract class ModeleBarCode { @@ -48,6 +50,16 @@ abstract class ModeleBarCode return true; } + + /** + * Return description + * + * @param Translate $langs Lang object to use for output + * @return string Descriptive text + */ + abstract public function info($langs); + + /** * Save an image file on disk (with no output) * @@ -67,6 +79,8 @@ abstract class ModeleBarCode /** * Parent class for barcode numbering models + * + * @property string $nom Name for the GeneratorModel */ abstract class ModeleNumRefBarCode extends CommonNumRefGenerator { @@ -87,11 +101,22 @@ abstract class ModeleNumRefBarCode extends CommonNumRefGenerator return $langs->trans("Function_getNextValue_InModuleNotWorking"); } + + /** + * Return an example of result returned by getNextValue + * + * @param ?Translate $langs Object langs + * @param ?CommonObject $object Object product + * @return string Return string example + */ + abstract public function getExample($langs = null, $object = null); + + /** * Return description of module parameters * * @param Translate $langs Output language - * @param Societe $soc Third party object + * @param ?Societe $soc Third party object * @param int $type -1=Nothing, 0=Product, 1=Service * @return string HTML translated description */ diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index a031761dafd..3f22a2b274c 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -5,6 +5,7 @@ * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2019 Philippe Grand * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -41,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; class doc_generic_bom_odt extends ModelePDFBom { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index 5e63218488b..65b3edf3b68 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -36,7 +37,7 @@ class mod_bom_advanced extends ModeleNumRefBoms { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/core/modules/bom/mod_bom_standard.php b/htdocs/core/modules/bom/mod_bom_standard.php index 69656164461..5b3d8006cfa 100644 --- a/htdocs/core/modules/bom/mod_bom_standard.php +++ b/htdocs/core/modules/bom/mod_bom_standard.php @@ -33,7 +33,7 @@ class mod_bom_standard extends ModeleNumRefBoms { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -116,7 +116,7 @@ class mod_bom_standard extends ModeleNumRefBoms * * @param Product $objprod Object product * @param Bom $object Object we need next value for - * @return string|-1 Next value if OK, -1 if KO + * @return string|int<-1,-1> Next value if OK, -1 if KO */ public function getNextValue($objprod, $object) { diff --git a/htdocs/core/modules/bom/modules_bom.php b/htdocs/core/modules/bom/modules_bom.php index 38803e96ad6..ed78515888a 100644 --- a/htdocs/core/modules/bom/modules_bom.php +++ b/htdocs/core/modules/bom/modules_bom.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * 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 @@ -83,4 +84,13 @@ abstract class ModelePDFBom extends CommonDocGenerator abstract class ModeleNumRefBoms extends CommonNumRefGenerator { // No overload code + + /** + * Return next free value + * + * @param Product $objprod Object product + * @param Bom $object Object we need next value for + * @return string|int<-1,-1> Next value if OK, -1 if KO + */ + abstract public function getNextValue($objprod, $object); } diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index 68953dc4837..d5cce12be70 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -56,23 +56,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts */ public $line_per_page; - /** - * @var Account bank account - */ - public $account; - - public $amount; - public $date; - public $nbcheque; - public $ref; public $ref_ext; - /** - * @var array lines - */ - public $lines; - /** * Constructor * diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php index 3f760794750..5213c2def53 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php @@ -33,7 +33,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 0910f6e77b6..6ae0b8ea3e9 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -1,6 +1,7 @@ * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -33,7 +34,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php index 30d36660b97..5c2f2fb9532 100644 --- a/htdocs/core/modules/cheque/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/modules_chequereceipts.php @@ -4,6 +4,7 @@ * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2016 Juanjo Menent + * 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 @@ -44,6 +45,31 @@ abstract class ModeleNumRefChequeReceipts extends CommonNumRefGenerator */ abstract class ModeleChequeReceipts extends CommonDocGenerator { + /** + * @var Account bank account + */ + public $account; + + /** + * @var string|float + */ + public $amount; + /** + * @var string + */ + public $date; + /** + * @var int + */ + public $nbcheque; + /** + * @var string + */ + public $ref; + /** + * @var stdClass[] lines + */ + public $lines; /** * @var string Error code (or message) */ @@ -66,7 +92,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $list = getListOfModels($db, $type, $maxfilenamelength); // TODO Remove this to use getListOfModels only - $list = array('blochet'=>'blochet'); + $list = array('blochet' => 'blochet'); return $list; } diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index d0cf4df150d..36d42c7742b 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -5,6 +5,7 @@ * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2021 Philippe Grand * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -42,7 +43,7 @@ class doc_generic_order_odt extends ModelePDFCommandes { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index d932881191d..6ae70f28639 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -75,7 +75,7 @@ class pdf_einstein extends ModelePDFCommandes /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 7b527980c50..efbab48188a 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -75,7 +75,7 @@ class pdf_eratosthene extends ModelePDFCommandes /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/commande/mod_commande_marbre.php b/htdocs/core/modules/commande/mod_commande_marbre.php index e5e2e525342..348f0839022 100644 --- a/htdocs/core/modules/commande/mod_commande_marbre.php +++ b/htdocs/core/modules/commande/mod_commande_marbre.php @@ -33,7 +33,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -128,7 +128,7 @@ class mod_commande_marbre extends ModeleNumRefCommandes * * @param Societe $objsoc Object thirdparty * @param Commande $object Object we need next value for - * @return string|-1 Value if OK, -1 if KO + * @return string|int<-1,0> Value if OK, -1 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/commande/mod_commande_saphir.php b/htdocs/core/modules/commande/mod_commande_saphir.php index ca1b476eb24..a3280fa1455 100644 --- a/htdocs/core/modules/commande/mod_commande_saphir.php +++ b/htdocs/core/modules/commande/mod_commande_saphir.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -36,7 +37,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -124,7 +125,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes * * @param Societe $objsoc Object thirdparty * @param Commande $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, -1 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/commande/modules_commande.php b/htdocs/core/modules/commande/modules_commande.php index 00e765832e2..7f0f1456189 100644 --- a/htdocs/core/modules/commande/modules_commande.php +++ b/htdocs/core/modules/commande/modules_commande.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * 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 @@ -102,5 +103,12 @@ abstract class ModelePDFCommandes extends CommonDocGenerator */ abstract class ModeleNumRefCommandes extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Societe $objsoc Object thirdparty + * @param Commande $object Object we need next value for + * @return string|int<-1,0> Value if OK, -1 if KO + */ + abstract public function getNextValue($objsoc, $object); } diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index ac846f7bebb..f5326c0cc54 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -39,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; class doc_generic_contract_odt extends ModelePDFContract { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 60f368ce3ec..a5a0c6710b0 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -73,7 +73,7 @@ class pdf_strato extends ModelePDFContract /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/contract/mod_contract_magre.php b/htdocs/core/modules/contract/mod_contract_magre.php index aa5c9114810..7af0d9e16bb 100644 --- a/htdocs/core/modules/contract/mod_contract_magre.php +++ b/htdocs/core/modules/contract/mod_contract_magre.php @@ -1,6 +1,7 @@ * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -30,7 +31,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php'; */ class mod_contract_magre extends ModelNumRefContracts { - // variables inherited from ModelNumRefContracts class public $name = 'Magre'; public $version = 'dolibarr'; @@ -113,7 +113,7 @@ class mod_contract_magre extends ModelNumRefContracts * * @param Societe $objsoc third party object * @param Contrat $contract contract object - * @return string|int Next value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $contract) { diff --git a/htdocs/core/modules/contract/mod_contract_olive.php b/htdocs/core/modules/contract/mod_contract_olive.php index ca517b5a8a4..3ebb48d59e8 100644 --- a/htdocs/core/modules/contract/mod_contract_olive.php +++ b/htdocs/core/modules/contract/mod_contract_olive.php @@ -77,9 +77,9 @@ class mod_contract_olive extends ModelNumRefContracts /** * Return an example of result returned by getNextValue * - * @param Societe $objsoc Object thirdparty - * @param Contrat $contract Object contract - * @return string Return next value + * @param Societe $objsoc Object thirdparty + * @param Contrat $contract Object contract + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $contract) { diff --git a/htdocs/core/modules/contract/mod_contract_serpis.php b/htdocs/core/modules/contract/mod_contract_serpis.php index e0ffb17003c..10f93b547e1 100644 --- a/htdocs/core/modules/contract/mod_contract_serpis.php +++ b/htdocs/core/modules/contract/mod_contract_serpis.php @@ -114,7 +114,7 @@ class mod_contract_serpis extends ModelNumRefContracts * * @param Societe $objsoc third party object * @param Contrat $contract contract object - * @return string|-1 Value if OK, -1 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $contract) { diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index 40a51bd4a51..5a8f0fcd64f 100644 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -7,6 +7,7 @@ * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013 Philippe Grand * Copyright (C) 2014 Marcos García + * 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 @@ -79,7 +80,14 @@ abstract class ModelePDFContract extends CommonDocGenerator /** * Parent class for all contract numbering modules */ -class ModelNumRefContracts extends CommonNumRefGenerator +abstract class ModelNumRefContracts extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc third party object + * @param Contrat $contract contract object + * @return string|int<0,-1> Next value if OK, -1 or 0 if KO + */ + abstract public function getNextValue($objsoc, $contract); } diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index 541c055d2c6..f7faae2f82a 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -68,7 +68,7 @@ class pdf_storm extends ModelePDFDeliveryOrder /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index b64b1b54428..81a6d2e574d 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -67,7 +67,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/delivery/mod_delivery_jade.php b/htdocs/core/modules/delivery/mod_delivery_jade.php index 8cc8ec7f234..37e6112b81c 100644 --- a/htdocs/core/modules/delivery/mod_delivery_jade.php +++ b/htdocs/core/modules/delivery/mod_delivery_jade.php @@ -38,7 +38,7 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -129,7 +129,7 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder * * @param Societe $objsoc Object thirdparty * @param Delivery $object Object we need next value for - * @return string|-1 Value if OK, -1 if KO + * @return string|int<-1,0> Value if OK, 0 or -1 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index e5daaffe518..60cbc9420ab 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2024 Frédéric France + * 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 @@ -34,7 +35,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -126,11 +127,11 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder /** - * Return next value + * Return next free value * - * @param Societe $objsoc Object third party - * @param Delivery $object Object delivery - * @return string|int Value if OK, 0 if KO + * @param Societe $objsoc Object thirdparty + * @param Delivery $object Object we need next value for + * @return string|int<-1,0> Value if OK, 0 or -1 if KO */ public function getNextValue($objsoc, $object) { @@ -157,7 +158,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder * * @param Societe $objsoc Object third party * @param Delivery $objforref Object for number to search - * @return string|int Next free value, 0 if KO + * @return string|int<-1,0> Next free value, 0 if KO * @deprecated see getNextValue */ public function getNumRef($objsoc, $objforref) diff --git a/htdocs/core/modules/delivery/modules_delivery.php b/htdocs/core/modules/delivery/modules_delivery.php index 00c057590bc..c1f919924f6 100644 --- a/htdocs/core/modules/delivery/modules_delivery.php +++ b/htdocs/core/modules/delivery/modules_delivery.php @@ -5,6 +5,7 @@ * Copyright (C) 2006-2011 Regis Houssin * Copyright (C) 2011-2012 Philippe Grand * Copyright (C) 2014 Marcos García + * 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 @@ -79,5 +80,12 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator */ abstract class ModeleNumRefDeliveryOrder extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Societe $objsoc Object thirdparty + * @param Delivery $object Object we need next value for + * @return string|int<-1,0> Value if OK, 0 or -1 if KO + */ + abstract public function getNextValue($objsoc, $object); } diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index bdd7995fa8d..a423a41f07c 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -5,6 +5,7 @@ * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2021 Philippe Grand * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -42,7 +43,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 51c8743a331..52b5ca67b27 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -65,7 +65,7 @@ class pdf_espadon extends ModelePdfExpedition /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index a0f4d4983a0..4dc927d275a 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -70,7 +70,7 @@ class pdf_merou extends ModelePdfExpedition /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 4c6e4896d81..593525650f7 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -65,7 +65,7 @@ class pdf_rouget extends ModelePdfExpedition /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/expedition/mod_expedition_ribera.php b/htdocs/core/modules/expedition/mod_expedition_ribera.php index 192d1a0c0c5..c87f4982c5c 100644 --- a/htdocs/core/modules/expedition/mod_expedition_ribera.php +++ b/htdocs/core/modules/expedition/mod_expedition_ribera.php @@ -1,6 +1,7 @@ * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -32,7 +33,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -122,7 +123,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition * * @param Societe $objsoc Third party object * @param Expedition $shipment Shipment object - * @return string|int Value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, 0 or -1 if KO */ public function getNextValue($objsoc, $shipment) { diff --git a/htdocs/core/modules/expedition/mod_expedition_safor.php b/htdocs/core/modules/expedition/mod_expedition_safor.php index a96b405e694..55f109e47d5 100644 --- a/htdocs/core/modules/expedition/mod_expedition_safor.php +++ b/htdocs/core/modules/expedition/mod_expedition_safor.php @@ -32,7 +32,7 @@ class mod_expedition_safor extends ModelNumRefExpedition { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -121,7 +121,7 @@ class mod_expedition_safor extends ModelNumRefExpedition * * @param Societe $objsoc Third party object * @param Expedition $shipment Shipment object - * @return string|-1 Value if OK, -1 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $shipment) { diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php index bb707135fc7..6e606571fda 100644 --- a/htdocs/core/modules/expedition/modules_expedition.php +++ b/htdocs/core/modules/expedition/modules_expedition.php @@ -7,6 +7,7 @@ * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2011-2019 Philippe Grand * Copyright (C) 2014 Marcos García + * 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 @@ -82,5 +83,12 @@ abstract class ModelePdfExpedition extends CommonDocGenerator */ abstract class ModelNumRefExpedition extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc Third party object + * @param Expedition $shipment Shipment object + * @return string|int<-1,0> Value if OK, 0 or -1 if KO + */ + abstract public function getNextValue($objsoc, $shipment); } diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php index 471886daf04..ac86ca57ff4 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php @@ -72,7 +72,7 @@ class pdf_standard_expensereport extends ModeleExpenseReport /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 575d3ab499c..60600810b1f 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -32,7 +32,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -118,10 +118,10 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport } /** - * Return next free value + * Return next free value * - * @param Object $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @param ExpenseReport $object Object we need next value for + * @return string|int<-1,0> Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/expensereport/mod_expensereport_sand.php b/htdocs/core/modules/expensereport/mod_expensereport_sand.php index dcdb17f7763..0c5962c871e 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_sand.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_sand.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * 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 @@ -33,7 +34,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -123,7 +124,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport * Return next free value * * @param ExpenseReport $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @return string|int<-1,0> Next value if OK, -1 or 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/expensereport/modules_expensereport.php b/htdocs/core/modules/expensereport/modules_expensereport.php index 0387a91de5d..64d5a4c4a27 100644 --- a/htdocs/core/modules/expensereport/modules_expensereport.php +++ b/htdocs/core/modules/expensereport/modules_expensereport.php @@ -1,5 +1,6 @@ + * 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 @@ -83,5 +84,11 @@ function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $ */ abstract class ModeleNumRefExpenseReport extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param ExpenseReport $object Object we need next value for + * @return string|int<-1,0> Next value if OK, -1 or 0 if KO + */ + abstract public function getNextValue($object); } diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index 3f166308cc7..b6a4960a4aa 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Marcos García * Copyright (C) 2024 William Mead * Copyright (C) 2024 Frédéric France + * 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 @@ -50,7 +51,7 @@ class ExportExcel2007 extends ModeleExports /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/export/export_tsv.modules.php b/htdocs/core/modules/export/export_tsv.modules.php index f247b006f89..580a7ffa46f 100644 --- a/htdocs/core/modules/export/export_tsv.modules.php +++ b/htdocs/core/modules/export/export_tsv.modules.php @@ -1,6 +1,7 @@ * Copyright (C) 2012 Marcos García + * 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 @@ -44,7 +45,7 @@ class ExportTsv extends ModeleExports /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/export/exportcsv.class.php b/htdocs/core/modules/export/exportcsv.class.php index c52779bc74e..a9212047981 100644 --- a/htdocs/core/modules/export/exportcsv.class.php +++ b/htdocs/core/modules/export/exportcsv.class.php @@ -1,5 +1,6 @@ + * 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 @@ -45,7 +46,7 @@ class ExportCsv extends ModeleExports /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 5d84866fbad..1b6e57d1a52 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -4,6 +4,7 @@ * Copyright (C) 2014 Marcos García * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -41,7 +42,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index c665d805b0a..57b2f249863 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -73,7 +73,7 @@ class pdf_crabe extends ModelePDFFactures /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php index c8ca1d4b630..82a1df10e8c 100644 --- a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php @@ -75,7 +75,7 @@ class pdf_octopus extends ModelePDFFactures /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'disabled'; // Disabled by default. Enabled in constructor if option INVOICE_USE_SITUATION is 2. diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 0f8704107c6..6d6fb8aad82 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -73,7 +73,7 @@ class pdf_sponge extends ModelePDFFactures /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/facture/mod_facture_mars.php b/htdocs/core/modules/facture/mod_facture_mars.php index 348ee5bbaac..3bf4271aa06 100644 --- a/htdocs/core/modules/facture/mod_facture_mars.php +++ b/htdocs/core/modules/facture/mod_facture_mars.php @@ -34,7 +34,7 @@ class mod_facture_mars extends ModeleNumRefFactures { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -160,9 +160,9 @@ class mod_facture_mars extends ModeleNumRefFactures * Return next value not used or last value used * * @param Societe $objsoc Object third party - * @param Facture $invoice Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|int<-1,0> Value if OK, <=0 if KO + * @param Facture $invoice Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,1> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $invoice, $mode = 'next') { diff --git a/htdocs/core/modules/facture/mod_facture_mercure.php b/htdocs/core/modules/facture/mod_facture_mercure.php index 55b74491ad4..9ff41aa2258 100644 --- a/htdocs/core/modules/facture/mod_facture_mercure.php +++ b/htdocs/core/modules/facture/mod_facture_mercure.php @@ -38,7 +38,7 @@ class mod_facture_mercure extends ModeleNumRefFactures { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -139,9 +139,9 @@ class mod_facture_mercure extends ModeleNumRefFactures * Return next value not used or last value used * * @param Societe $objsoc Object third party - * @param Facture $invoice Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|int<-1,0> Value if OK, <=0 if KO + * @param Facture $invoice Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,1> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $invoice, $mode = 'next') { diff --git a/htdocs/core/modules/facture/mod_facture_terre.php b/htdocs/core/modules/facture/mod_facture_terre.php index 66cbfc46b56..25ac8001b86 100644 --- a/htdocs/core/modules/facture/mod_facture_terre.php +++ b/htdocs/core/modules/facture/mod_facture_terre.php @@ -34,7 +34,7 @@ class mod_facture_terre extends ModeleNumRefFactures { /** * Dolibarr version of the loaded document 'development', 'experimental', 'dolibarr' - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -200,10 +200,10 @@ class mod_facture_terre extends ModeleNumRefFactures * ALTER TABLE llx_facture ADD COLUMN calculated_numrefonly INTEGER AS (CASE SUBSTRING(ref FROM 1 FOR 2) WHEN 'FA' THEN CAST(SUBSTRING(ref FROM 10) AS SIGNED) ELSE 0 END) PERSISTENT; * ALTER TABLE llx_facture ADD INDEX calculated_numrefonly_idx (calculated_numrefonly); * - * @param Societe $objsoc Object third party + * @param Societe $objsoc Object third party * @param Facture $invoice Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|int<-1,0> Next ref value or last ref if $mode is 'last', -1 or 0 if KO + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,1> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $invoice, $mode = 'next') { diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index 740caf8c174..2bf9f1fc516 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -272,9 +272,9 @@ abstract class ModeleNumRefFactures extends CommonNumRefGenerator * Return next value not used or last value used * * @param Societe $objsoc Object third party - * @param Facture $invoice Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|int<-1,0> Value if OK, <=0 if KO + * @param Facture $invoice Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,1> Value if OK, <=0 if KO */ abstract public function getNextValue($objsoc, $invoice, $mode = 'next'); } diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 67a5ac4056c..13c2691d9fa 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -68,7 +68,7 @@ class pdf_soleil extends ModelePDFFicheinter /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 285a465cc1e..0ac08eb7e06 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -5,6 +5,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2024 Frédéric France + * 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 @@ -35,7 +36,7 @@ class mod_arctic extends ModeleNumRefFicheinter { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -46,7 +47,7 @@ class mod_arctic extends ModeleNumRefFicheinter /** * @var string Nom du modele - * @deprecated + * @deprecated Use $name, getName() * @see $name */ public $nom = 'arctic'; @@ -124,7 +125,7 @@ class mod_arctic extends ModeleNumRefFicheinter * * @param Societe|string $objsoc Object thirdparty * @param Fichinter|string $object Object we need next value for - * @return string|int Value if OK, 0 if KO + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($objsoc = '', $object = '') { diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index f721029b132..15ee3e339b3 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -34,7 +34,7 @@ class mod_pacific extends ModeleNumRefFicheinter { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -47,7 +47,7 @@ class mod_pacific extends ModeleNumRefFicheinter /** * @var string Nom du modele - * @deprecated + * @deprecated Use $name, getName() * @see $name */ public $nom = 'pacific'; @@ -124,7 +124,7 @@ class mod_pacific extends ModeleNumRefFicheinter * * @param Societe|string $objsoc Object thirdparty * @param Fichinter|string $object Object we need next value for - * @return string Value if KO, <0 if KO + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($objsoc = '', $object = '') { diff --git a/htdocs/core/modules/fichinter/modules_fichinter.php b/htdocs/core/modules/fichinter/modules_fichinter.php index ff97725ace5..727e1441ab2 100644 --- a/htdocs/core/modules/fichinter/modules_fichinter.php +++ b/htdocs/core/modules/fichinter/modules_fichinter.php @@ -78,7 +78,14 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator */ abstract class ModeleNumRefFicheinter extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Societe|string $objsoc Object thirdparty + * @param Fichinter|string $object Object we need next value for + * @return string|int<-1,0> Next value if OK, <=0 if KO + */ + abstract public function getNextValue($objsoc = '', $object = ''); } diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 3f3225b3990..03029517427 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -2,6 +2,7 @@ /* Copyright (C) 2011-2019 Juanjo Menent * Copyright (C) 2018 Charlene Benke * Copyright (C) 2024 Frédéric France + * 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 @@ -111,7 +112,7 @@ class mod_holiday_immaculate extends ModelNumRefHolidays * * @param Societe $objsoc third party object * @param Holiday $holiday holiday object - * @return string|int Value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $holiday) { diff --git a/htdocs/core/modules/holiday/mod_holiday_madonna.php b/htdocs/core/modules/holiday/mod_holiday_madonna.php index c084f48e46d..9f10ed28eef 100644 --- a/htdocs/core/modules/holiday/mod_holiday_madonna.php +++ b/htdocs/core/modules/holiday/mod_holiday_madonna.php @@ -113,9 +113,9 @@ class mod_holiday_madonna extends ModelNumRefHolidays /** * Return next value * - * @param Societe $objsoc third party object - * @param Holiday $holiday Holiday object - * @return string|-1 Value if OK, -1 if KO + * @param Societe $objsoc third party object + * @param Holiday $holiday holiday object + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $holiday) { diff --git a/htdocs/core/modules/holiday/modules_holiday.php b/htdocs/core/modules/holiday/modules_holiday.php index bba1aa62d9f..3b5dae7cf95 100644 --- a/htdocs/core/modules/holiday/modules_holiday.php +++ b/htdocs/core/modules/holiday/modules_holiday.php @@ -8,6 +8,7 @@ * Copyright (C) 2013 Philippe Grand * Copyright (C) 2014 Marcos García * Copyright (C) 2018 Charlene Benke + * 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 @@ -79,7 +80,14 @@ abstract class ModelePDFHoliday extends CommonDocGenerator /** * Parent class for all holidays numbering modules */ -class ModelNumRefHolidays extends CommonNumRefGenerator +abstract class ModelNumRefHolidays extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc third party object + * @param Holiday $holiday holiday object + * @return string|int<-1,0> Value if OK, <=0 if KO + */ + abstract public function getNextValue($objsoc, $holiday); } diff --git a/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php b/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php index 16c6bbe552e..6553d152052 100644 --- a/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php +++ b/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php @@ -67,7 +67,7 @@ class pdf_standard_evaluation extends ModelePDFEvaluation /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index 79bc43b2480..9482b998962 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -26,7 +27,7 @@ * \brief File containing class for advanced numbering model of Evaluation */ - require_once DOL_DOCUMENT_ROOT . '/core/modules/hrm/modules_evaluation.php'; +require_once DOL_DOCUMENT_ROOT . '/core/modules/hrm/modules_evaluation.php'; /** @@ -36,7 +37,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -125,7 +126,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation * Return next free value * * @param Evaluation $object Object we need next value for - * @return string|int Value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/hrm/mod_evaluation_standard.php b/htdocs/core/modules/hrm/mod_evaluation_standard.php index 98fd02255c7..56555a4b8f7 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_standard.php +++ b/htdocs/core/modules/hrm/mod_evaluation_standard.php @@ -34,7 +34,7 @@ class mod_evaluation_standard extends ModeleNumRefEvaluation { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -119,8 +119,8 @@ class mod_evaluation_standard extends ModeleNumRefEvaluation /** * Return next free value * - * @param Evaluation $object Object we need next value for - * @return string|-1 Value if OK, -1 if KO + * @param Evaluation $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/hrm/modules_evaluation.php b/htdocs/core/modules/hrm/modules_evaluation.php index 587e1bc6d55..c2127651aad 100644 --- a/htdocs/core/modules/hrm/modules_evaluation.php +++ b/htdocs/core/modules/hrm/modules_evaluation.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * 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 @@ -82,5 +83,11 @@ abstract class ModelePDFEvaluation extends CommonDocGenerator */ abstract class ModeleNumRefEvaluation extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Evaluation $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 if KO + */ + abstract public function getNextValue($object); } diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index bfc094a6913..ecfb9612891 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -4,6 +4,7 @@ * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012-2016 Juanjo Menent * Copyright (C) 2024 Frédéric France + * 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 @@ -46,7 +47,7 @@ class ImportCsv extends ModeleImports /** * Dolibarr version of driver - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index eaacc8c6d82..049537a4911 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -52,7 +52,7 @@ class ImportXlsx extends ModeleImports /** * Dolibarr version of driver - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/import/modules_import.php b/htdocs/core/modules/import/modules_import.php index 5e5a45163a1..243b83ad7ad 100644 --- a/htdocs/core/modules/import/modules_import.php +++ b/htdocs/core/modules/import/modules_import.php @@ -71,7 +71,7 @@ class ModeleImports /** * Dolibarr version of driver - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php index 706bead376d..4c0f279e92f 100644 --- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php +++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php @@ -39,7 +39,7 @@ class doc_generic_member_odt extends ModelePDFMember { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/member/doc/pdf_standard_member.class.php b/htdocs/core/modules/member/doc/pdf_standard_member.class.php index 6d35d7e4bf9..7664273c542 100644 --- a/htdocs/core/modules/member/doc/pdf_standard_member.class.php +++ b/htdocs/core/modules/member/doc/pdf_standard_member.class.php @@ -6,6 +6,7 @@ * Copyright (C) 2006-2013 Laurent Destailleur * Copyright (C) 2015 Francis Appels * Copyright (C) 2024 Frédéric France + * 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 @@ -36,7 +37,7 @@ class pdf_standard_member extends CommonStickerGenerator { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/movement/modules_movement.php b/htdocs/core/modules/movement/modules_movement.php index 0f10da20445..063f8f628fb 100644 --- a/htdocs/core/modules/movement/modules_movement.php +++ b/htdocs/core/modules/movement/modules_movement.php @@ -1,5 +1,6 @@ + * 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 @@ -47,7 +48,7 @@ abstract class ModelePDFMovement extends CommonDocGenerator /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index 5808de2264a..dc48a7f5fa1 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -5,6 +5,7 @@ * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2021 Philippe Grand * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -41,7 +42,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; class doc_generic_mo_odt extends ModelePDFMo { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index c587826d7ff..61904c07c67 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -71,7 +71,7 @@ class pdf_vinci extends ModelePDFMo /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index eb147ff2f2a..3c8e8bae564 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -5,6 +5,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France * Copyright (C) 2020 Josep Lluís Amador + * 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 @@ -37,7 +38,7 @@ class mod_mo_advanced extends ModeleNumRefMos { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -126,7 +127,7 @@ class mod_mo_advanced extends ModeleNumRefMos * * @param Product $objprod Object product * @param Mo $object Object we need next value for - * @return string|int Value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objprod, $object) { diff --git a/htdocs/core/modules/mrp/mod_mo_standard.php b/htdocs/core/modules/mrp/mod_mo_standard.php index b835a07614f..599ceef2c0d 100644 --- a/htdocs/core/modules/mrp/mod_mo_standard.php +++ b/htdocs/core/modules/mrp/mod_mo_standard.php @@ -33,7 +33,7 @@ class mod_mo_standard extends ModeleNumRefMos { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -116,7 +116,7 @@ class mod_mo_standard extends ModeleNumRefMos * * @param Product $objprod Object product * @param Mo $object Object we need next value for - * @return string|-1 Value if OK, -1 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objprod, $object) { diff --git a/htdocs/core/modules/mrp/modules_mo.php b/htdocs/core/modules/mrp/modules_mo.php index 660018da03c..1e9955a27b1 100644 --- a/htdocs/core/modules/mrp/modules_mo.php +++ b/htdocs/core/modules/mrp/modules_mo.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * 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 @@ -80,5 +81,12 @@ abstract class ModelePDFMo extends CommonDocGenerator */ abstract class ModeleNumRefMos extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Product $objprod Object product + * @param Mo $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 if KO + */ + abstract public function getNextValue($objprod, $object); } diff --git a/htdocs/core/modules/oauth/generic_oauthcallback.php b/htdocs/core/modules/oauth/generic_oauthcallback.php index 95787285b1c..0c06bc54aef 100644 --- a/htdocs/core/modules/oauth/generic_oauthcallback.php +++ b/htdocs/core/modules/oauth/generic_oauthcallback.php @@ -1,6 +1,7 @@ * Copyright (C) 2015 Frederic France + * 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 @@ -206,7 +207,7 @@ if (!GETPOST('code') && !GETPOST('error')) { $url .= '&scope='.str_replace(',', '+', $statewithscopeonly); // Add more param - $url .= '&nonce='.bin2hex(random_bytes(64/8)); + $url .= '&nonce='.bin2hex(random_bytes(64 / 8)); if ($forlogin) { // TODO Add param hd. What is it for ? @@ -263,6 +264,8 @@ if (!GETPOST('code') && !GETPOST('error')) { // Result is stored into object managed by class DoliStorage into includes/OAuth/Common/Storage/DoliStorage.php and into database table llx_oauth_token $token = $apiService->requestAccessToken(GETPOST('code'), $state); + '@phan-var-force OAuth\Common\Token\AbstractToken $token'; + // The refresh token is inside the object token if the prompt was forced only. //$refreshtoken = $token->getRefreshToken(); //var_dump($refreshtoken); diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 68a544ec8f1..0de13302b82 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -1,5 +1,6 @@ + * 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 @@ -32,7 +33,7 @@ class mod_payment_ant extends ModeleNumRefPayments { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index 5991cc2be93..53913df75d8 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -32,7 +32,7 @@ class mod_payment_cicada extends ModeleNumRefPayments { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index d082604c707..d7fef7f516d 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -42,6 +42,12 @@ class PrintingDriver */ public $error = ''; + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); + + /** * @var string Name */ @@ -115,4 +121,30 @@ class PrintingDriver return $this->desc; } } + + /** + * Return list of available printers + * + * @return int 0 if OK, >0 if KO + */ + public function listAvailablePrinters() + { + $msg = get_class($this)."::".__FUNCTION__." not implemented"; + dol_syslog($msg, LOG_ERR); + $this->errors[] = $msg; + return 1; + } + + /** + * Return list of available printers + * + * @return array list of printers + */ + public function getlistAvailablePrinters() + { + $msg = get_class($this)."::".__FUNCTION__." not implemented"; + dol_syslog($msg, LOG_ERR); + $this->errors[] = $msg; + return []; + } } diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index eac957eaaa4..27788188ea1 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -1,6 +1,7 @@ + * 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 @@ -69,16 +70,6 @@ class printing_printgcp extends PrintingDriver */ public $google_secret = ''; - /** - * @var string Error code (or message) - */ - public $error = ''; - - /** - * @var string[] Error codes (or messages) - */ - public $errors = array(); - /** * @var DoliDB Database handler. */ @@ -110,9 +101,9 @@ class printing_printgcp extends PrintingDriver if (!$conf->oauth->enabled) { $this->conf[] = array( - 'varname'=>'PRINTGCP_INFO', - 'info'=>$langs->transnoentitiesnoconv("WarningModuleNotActive", "OAuth"), - 'type'=>'info', + 'varname' => 'PRINTGCP_INFO', + 'info' => $langs->transnoentitiesnoconv("WarningModuleNotActive", "OAuth"), + 'type' => 'info', ); } else { $keyforprovider = ''; // @FIXME @@ -158,13 +149,13 @@ class printing_printgcp extends PrintingDriver } } if ($this->google_id != '' && $this->google_secret != '') { - $this->conf[] = array('varname'=>'PRINTGCP_INFO', 'info'=>'GoogleAuthConfigured', 'type'=>'info'); + $this->conf[] = array('varname' => 'PRINTGCP_INFO', 'info' => 'GoogleAuthConfigured', 'type' => 'info'); $this->conf[] = array( - 'varname'=>'PRINTGCP_TOKEN_ACCESS', - 'info'=>$access, - 'type'=>'info', - 'renew'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?state=userinfo_email,userinfo_profile,cloud_print&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), - 'delete'=>($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE) ? $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp') : '') + 'varname' => 'PRINTGCP_TOKEN_ACCESS', + 'info' => $access, + 'type' => 'info', + 'renew' => $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?state=userinfo_email,userinfo_profile,cloud_print&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), + 'delete' => ($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE) ? $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp') : '') ); if ($token_ok) { $expiredat = ''; @@ -181,9 +172,9 @@ class printing_printgcp extends PrintingDriver $expiredat = dol_print_date($endoflife, "dayhour"); } - $this->conf[] = array('varname'=>'TOKEN_REFRESH', 'info'=>((!empty($refreshtoken)) ? 'Yes' : 'No'), 'type'=>'info'); - $this->conf[] = array('varname'=>'TOKEN_EXPIRED', 'info'=>($expire ? 'Yes' : 'No'), 'type'=>'info'); - $this->conf[] = array('varname'=>'TOKEN_EXPIRE_AT', 'info'=>($expiredat), 'type'=>'info'); + $this->conf[] = array('varname' => 'TOKEN_REFRESH', 'info' => ((!empty($refreshtoken)) ? 'Yes' : 'No'), 'type' => 'info'); + $this->conf[] = array('varname' => 'TOKEN_EXPIRED', 'info' => ($expire ? 'Yes' : 'No'), 'type' => 'info'); + $this->conf[] = array('varname' => 'TOKEN_EXPIRE_AT', 'info' => ($expiredat), 'type' => 'info'); } /* if ($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE)) { @@ -193,11 +184,11 @@ class printing_printgcp extends PrintingDriver $this->conf[] = array('varname'=>'PRINTGCP_AUTHLINK', 'link'=>$urlwithroot.'/core/modules/oauth/google_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/printing/admin/printing.php?mode=setup&driver=printgcp'), 'type'=>'authlink'); }*/ } else { - $this->conf[] = array('varname'=>'PRINTGCP_INFO', 'info'=>'GoogleAuthNotConfigured', 'type'=>'info'); + $this->conf[] = array('varname' => 'PRINTGCP_INFO', 'info' => 'GoogleAuthNotConfigured', 'type' => 'info'); } } // do not display submit button - $this->conf[] = array('enabled'=>0, 'type'=>'submit'); + $this->conf[] = array('enabled' => 0, 'type' => 'submit'); } /** @@ -250,7 +241,7 @@ class printing_printgcp extends PrintingDriver /** * Return list of available printers * - * @return array list of printers + * @return array{available:array} list of printers */ public function getlistAvailablePrinters() { @@ -380,12 +371,12 @@ class printing_printgcp extends PrintingDriver global $conf; // Check if printer id if (empty($printerid)) { - return array('status' =>0, 'errorcode' =>'', 'errormessage'=>'No provided printer ID'); + return array('status' => 0, 'errorcode' => '', 'errormessage' => 'No provided printer ID'); } // Open the file which needs to be print $handle = fopen($filepath, "rb"); if (!$handle) { - return array('status' =>0, 'errorcode' =>'', 'errormessage'=>'Could not read the file.'); + return array('status' => 0, 'errorcode' => '', 'errormessage' => 'Could not read the file.'); } // Read file content $contents = fread($handle, filesize($filepath)); diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index 54a844efc4d..65cafd09939 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -86,21 +86,6 @@ class printing_printipp extends PrintingDriver */ public $ssl; - /** - * @var string Error code (or message) - */ - public $error = ''; - - /** - * @var string[] Error codes (or messages) - */ - public $errors = array(); - - /** - * @var DoliDB Database handler. - */ - public $db; - /** * Constructor diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 63f966d0fb0..5fba8d46469 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -39,7 +40,7 @@ class doc_generic_product_odt extends ModelePDFProduct { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index d3104f46da1..d773d36d1f6 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -61,7 +61,7 @@ class pdf_standard extends ModelePDFProduct /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 308be664dcf..51d3943314c 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -119,13 +119,17 @@ class mod_codeproduct_elephant extends ModeleProductCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs + * @param ?Translate $langs Object langs * @param Product|string $objproduct Object product - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - public function getExample($langs, $objproduct = '', $type = -1) + public function getExample($langs = null, $objproduct = '', $type = -1) { + if (!$langs instanceof Translate) { + $langs = $GLOBALS['langs']; + '@phan-var-force Translate $langs'; + } $exampleproduct = $exampleservice = ''; if ($type == 0 || $type == -1) { diff --git a/htdocs/core/modules/product/mod_codeproduct_leopard.php b/htdocs/core/modules/product/mod_codeproduct_leopard.php index 8dfab9d177d..81eba6df26c 100644 --- a/htdocs/core/modules/product/mod_codeproduct_leopard.php +++ b/htdocs/core/modules/product/mod_codeproduct_leopard.php @@ -72,12 +72,12 @@ class mod_codeproduct_leopard extends ModeleProductCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs - * @param Product $objproduct Object product - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) - * @return string Return string example + * @param ?Translate $langs Object langs + * @param Product|string $objproduct Object product + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example */ - public function getExample($langs, $objproduct = null, $type = -1) + public function getExample($langs = null, $objproduct = '', $type = -1) { return ''; } diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 09e12460e8c..249a19b73e1 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -200,4 +200,15 @@ abstract class ModeleProductCode extends CommonNumRefGenerator // phpcs:enable return 0; } + + + /** + * Return an example of result returned by getNextValue + * + * @param ?Translate $langs Object langs + * @param Product|string $objproduct Object product + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example + */ + abstract public function getExample($langs = null, $objproduct = '', $type = -1); } diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index c910326b2da..41031d83d28 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -38,7 +38,7 @@ class mod_lot_advanced extends ModeleNumRefBatch { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -134,9 +134,9 @@ class mod_lot_advanced extends ModeleNumRefBatch /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Productlot $object Object we need next value for - * @return string|int Value if OK, 0 if KO + * @param Societe $objsoc Object thirdparty + * @param Productlot $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/mod_lot_free.php b/htdocs/core/modules/product_batch/mod_lot_free.php index 4a7de7a4499..2b238c9893f 100644 --- a/htdocs/core/modules/product_batch/mod_lot_free.php +++ b/htdocs/core/modules/product_batch/mod_lot_free.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2006-2009 Laurent Destailleur * Copyright (C) 2023-2024 Frédéric France + * 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 @@ -80,11 +81,11 @@ class mod_lot_free extends ModeleNumRefBatch } /** - * Return an example of result returned by getNextValue + * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Productlot $object Object we need next value for - * @return string Return next value + * @param Societe $objsoc Object thirdparty + * @param Productlot $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/mod_lot_standard.php b/htdocs/core/modules/product_batch/mod_lot_standard.php index c3e3aa36648..50412331855 100644 --- a/htdocs/core/modules/product_batch/mod_lot_standard.php +++ b/htdocs/core/modules/product_batch/mod_lot_standard.php @@ -34,7 +34,7 @@ class mod_lot_standard extends ModeleNumRefBatch { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -116,9 +116,9 @@ class mod_lot_standard extends ModeleNumRefBatch /** * Return next free value * - * @param Societe $objsoc Object thirdparty + * @param Societe $objsoc Object thirdparty * @param Productlot $object Object we need next value for - * @return string|-1 Value if OK, -1 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index a204337c47e..d8c53915883 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -38,7 +38,7 @@ class mod_sn_advanced extends ModeleNumRefBatch { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -133,9 +133,9 @@ class mod_sn_advanced extends ModeleNumRefBatch /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Productlot $object Object we need next value for - * @return string|int Value if OK, 0 if KO + * @param Societe $objsoc Object thirdparty + * @param Productlot $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/mod_sn_free.php b/htdocs/core/modules/product_batch/mod_sn_free.php index 87d3e5e62cd..61ce112289a 100644 --- a/htdocs/core/modules/product_batch/mod_sn_free.php +++ b/htdocs/core/modules/product_batch/mod_sn_free.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2006-2009 Laurent Destailleur * Copyright (C) 2024 Frédéric France + * 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 @@ -38,7 +39,7 @@ class mod_sn_free extends ModeleNumRefBatch * Therefore, the implementation must remain as open as possible. */ - // variables inherited from ModeleThirdPartyCode class + // variables inherited from ModeleNumRefBatch class public $name = 'sn_free'; public $version = 'dolibarr'; @@ -86,11 +87,11 @@ class mod_sn_free extends ModeleNumRefBatch } /** - * Return an example of result returned by getNextValue + * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Productlot $object Object we need next value for - * @return string Return next value + * @param Societe $objsoc Object thirdparty + * @param Productlot $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/mod_sn_standard.php b/htdocs/core/modules/product_batch/mod_sn_standard.php index 4354bb57328..5348aa206c2 100644 --- a/htdocs/core/modules/product_batch/mod_sn_standard.php +++ b/htdocs/core/modules/product_batch/mod_sn_standard.php @@ -34,7 +34,7 @@ class mod_sn_standard extends ModeleNumRefBatch { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -116,9 +116,9 @@ class mod_sn_standard extends ModeleNumRefBatch /** * Return next free value * - * @param Societe $objsoc Object thirdparty + * @param Societe $objsoc Object thirdparty * @param Productlot $object Object we need next value for - * @return string|int String if OK, <0 if KO + * @return string|int<-1,0> Value if OK, <=0 */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/product_batch/modules_product_batch.class.php b/htdocs/core/modules/product_batch/modules_product_batch.class.php index 0b9ed2b3b7c..6048716a911 100644 --- a/htdocs/core/modules/product_batch/modules_product_batch.class.php +++ b/htdocs/core/modules/product_batch/modules_product_batch.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin + * 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 @@ -21,14 +22,14 @@ /** - * \class ModeleProductCode + * \class ModelePDFProductBatch * \brief Parent class for product code generators */ /** - * \file htdocs/core/modules/contract/modules_contract.php - * \ingroup contract - * \brief File with parent class for generating contracts to PDF and File of class to manage contract numbering + * \file htdocs/core/modules/product_batch/modules_product_batch.class.php + * \ingroup product_batch + * \brief File with parent class for generating product batches to PDF and File of class to manage their numbering */ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php'; @@ -80,5 +81,12 @@ abstract class ModelePDFProductBatch extends CommonDocGenerator */ abstract class ModeleNumRefBatch extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Societe $objsoc Object thirdparty + * @param Productlot $object Object we need next value for + * @return string|int<-1,0> String if OK, <0 if KO + */ + abstract public function getNextValue($objsoc, $object); } diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 41e3a5247b3..a9fd662de5b 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -80,7 +80,7 @@ class doc_generic_project_odt extends ModelePDFProjects { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index b1c5d241488..eff1db04804 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -77,7 +77,7 @@ class pdf_baleine extends ModelePDFProjects /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 9e8b65b971c..d36cf3355ea 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -78,7 +78,7 @@ class pdf_beluga extends ModelePDFProjects /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index 2a291ef25b1..ae78a9182a5 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -71,7 +71,7 @@ class pdf_timespent extends ModelePDFProjects /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index a411154425c..1d4df75aaf2 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -35,7 +35,7 @@ class mod_project_simple extends ModeleNumRefProjects { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -123,9 +123,9 @@ class mod_project_simple extends ModeleNumRefProjects /** * Return next value * - * @param Societe $objsoc Object third party - * @param Project $project Object project - * @return string|-1 Value if OK, -1 if KO + * @param Societe $objsoc Object third party + * @param Project $project Object project + * @return string|int<-1,0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $project) { diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 9d05daa85d9..93215ba2bf0 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * 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 @@ -38,7 +39,7 @@ class mod_project_universal extends ModeleNumRefProjects /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -132,9 +133,9 @@ class mod_project_universal extends ModeleNumRefProjects /** * Return next value * - * @param Societe $objsoc Object third party - * @param Project $project Object project - * @return string|int Value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param Project $project Object project + * @return string|int<-1,0> Value if OK, 0 if KO */ public function getNextValue($objsoc, $project) { diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index 30ea90eefda..d9b1d9a1758 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -1,6 +1,7 @@ * Copyright (C) 2014 Marcos García + * 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 @@ -83,5 +84,12 @@ abstract class ModelePDFProjects extends CommonDocGenerator */ abstract class ModeleNumRefProjects extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param Project $project Object project + * @return string|int<-1,0> Value if OK, 0 if KO + */ + abstract public function getNextValue($objsoc, $project); } diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index f1e55a9de6d..2fe4d3b9305 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -79,7 +79,7 @@ class doc_generic_task_odt extends ModelePDFTask { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index b523fefad8c..a7a0f3a5a85 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -35,7 +35,7 @@ class mod_task_simple extends ModeleNumRefTask { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -124,9 +124,9 @@ class mod_task_simple extends ModeleNumRefTask /** * Return next value * - * @param Societe|string $objsoc Object third party - * @param Task|string $object Object Task - * @return string|-1 Value if OK, -1 if KO + * @param Societe|string $objsoc Object third party + * @param Project|string $object Object Project + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 33f1ee5ac7d..5aff9ed6114 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * 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 @@ -33,7 +34,7 @@ class mod_task_universal extends ModeleNumRefTask { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -121,11 +122,11 @@ class mod_task_universal extends ModeleNumRefTask /** * Return next value * - * @param Societe|string $objsoc Object third party - * @param Task|string $object Object task - * @return string|int Value if OK, 0 if KO + * @param Societe|string $objsoc Object third party + * @param Project|string $object Object Project + * @return string|int<-1,0> Value if OK, <=0 if KO */ - public function getNextValue($objsoc = '', $object = '') + public function getNextValue($objsoc, $object) { global $db, $conf; diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php index ce7fbf252dd..1fdba1e4d7b 100644 --- a/htdocs/core/modules/project/task/modules_task.php +++ b/htdocs/core/modules/project/task/modules_task.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010 Regis Houssin * Copyright (C) 2010 Florian Henry * Copyright (C) 2014 Marcos García + * 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 @@ -75,5 +76,12 @@ abstract class ModelePDFTask extends CommonDocGenerator */ abstract class ModeleNumRefTask extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe|string $objsoc Object third party + * @param Project|string $object Object Project + * @return string|int<-1,0> Value if OK, <=0 if KO + */ + abstract public function getNextValue($objsoc, $object); } diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 043b0416588..f42656414af 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -40,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; class doc_generic_proposal_odt extends ModelePDFPropales { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 43bbc94dedb..a6b9a7c37a0 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -76,7 +76,7 @@ class pdf_azur extends ModelePDFPropales /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index eb41504c812..7d376717d8d 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -69,7 +69,7 @@ class pdf_cyan extends ModelePDFPropales /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/propale/mod_propale_marbre.php b/htdocs/core/modules/propale/mod_propale_marbre.php index b601a7b1217..b6396ca96a0 100644 --- a/htdocs/core/modules/propale/mod_propale_marbre.php +++ b/htdocs/core/modules/propale/mod_propale_marbre.php @@ -35,7 +35,7 @@ class mod_propale_marbre extends ModeleNumRefPropales { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -126,7 +126,7 @@ class mod_propale_marbre extends ModeleNumRefPropales * * @param Societe $objsoc Object third party * @param Propal $propal Object commercial proposal - * @return string|-1 Next value, -1 if KO + * @return string|int<-1,0> Next value, <=0 if KO */ public function getNextValue($objsoc, $propal) { diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 56a70eacf8e..8f3e6402b63 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2024 Frédéric France + * 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 @@ -36,7 +37,7 @@ class mod_propale_saphir extends ModeleNumRefPropales { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -129,9 +130,9 @@ class mod_propale_saphir extends ModeleNumRefPropales /** * Return next value * - * @param Societe $objsoc Object third party - * @param Propal $propal Object commercial proposal - * @return string|int Value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param Propal $propal Object commercial proposal + * @return string|int<-1,0> Next value, <=0 if KO */ public function getNextValue($objsoc, $propal) { diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php index c40c664340f..e6eecffff44 100644 --- a/htdocs/core/modules/propale/modules_propale.php +++ b/htdocs/core/modules/propale/modules_propale.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * 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 @@ -97,5 +98,12 @@ abstract class ModelePDFPropales extends CommonDocGenerator */ abstract class ModeleNumRefPropales extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param Propal $propal Object commercial proposal + * @return string|int<-1,0> Next value, <=0 if KO + */ + abstract public function getNextValue($objsoc, $propal); } diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 212872111e1..d0ed471cfeb 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -1,6 +1,7 @@ * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -37,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; class doc_generic_reception_odt extends ModelePdfReception { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 6633309c3d9..66c05ed7a59 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; class pdf_squille extends ModelePdfReception { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/reception/mod_reception_beryl.php b/htdocs/core/modules/reception/mod_reception_beryl.php index 10b12439776..1b0f9510e1f 100644 --- a/htdocs/core/modules/reception/mod_reception_beryl.php +++ b/htdocs/core/modules/reception/mod_reception_beryl.php @@ -99,9 +99,9 @@ class mod_reception_beryl extends ModelNumRefReception /** * Return next value * - * @param Societe $objsoc Third party object - * @param Reception $reception Reception object - * @return string|-1 Value if OK, -1 if KO + * @param Societe $objsoc Third party object + * @param ?Reception $reception Reception object + * @return string|int<-1,0> Value if OK, -1 if KO */ public function getNextValue($objsoc, $reception) { diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index 98ff78d3bf5..de514911410 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -1,6 +1,7 @@ * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -98,9 +99,9 @@ class mod_reception_moonstone extends ModelNumRefReception /** * Return next value * - * @param Societe $objsoc Third party object - * @param Reception|null $reception Reception object - * @return string|int Value if OK, 0 if KO + * @param Societe $objsoc Third party object + * @param ?Reception $reception Reception object + * @return string|int<-1,0> Value if OK, -1 if KO */ public function getNextValue($objsoc, $reception) { diff --git a/htdocs/core/modules/reception/modules_reception.php b/htdocs/core/modules/reception/modules_reception.php index b400f4f9e03..9324e5b73fb 100644 --- a/htdocs/core/modules/reception/modules_reception.php +++ b/htdocs/core/modules/reception/modules_reception.php @@ -1,5 +1,6 @@ + * 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 @@ -74,5 +75,12 @@ abstract class ModelePdfReception extends CommonDocGenerator */ abstract class ModelNumRefReception extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc Third party object + * @param ?Reception $reception Reception object + * @return string|int<-1,0> Value if OK, -1 if KO + */ + abstract public function getNextValue($objsoc, $reception); } diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 0628ec59aa7..2e5e7ed21dd 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2011 Laurent Destailleur * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -37,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; class doc_generic_odt extends ModeleThirdPartyDoc { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index 52180617a6e..566d7bb70f0 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -160,13 +160,17 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs + * @param ?Translate $langs Object langs * @param Societe|string $objsoc Object thirdparty - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - public function getExample($langs, $objsoc = '', $type = -1) + public function getExample($langs = null, $objsoc = '', $type = -1) { + if (!$langs instanceof Translate) { + $langs = $GLOBALS['langs']; + '@phan-var-force Translate $langs'; + } $examplecust = ''; $examplesup = ''; $errmsg = array( diff --git a/htdocs/core/modules/societe/mod_codeclient_leopard.php b/htdocs/core/modules/societe/mod_codeclient_leopard.php index d684dfa2040..e7509a07e3b 100644 --- a/htdocs/core/modules/societe/mod_codeclient_leopard.php +++ b/htdocs/core/modules/societe/mod_codeclient_leopard.php @@ -77,12 +77,12 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs + * @param ?Translate $langs Object langs * @param Societe|string $objsoc Object thirdparty - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - public function getExample($langs, $objsoc = '', $type = -1) + public function getExample($langs = null, $objsoc = '', $type = -1) { return ''; } diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index a9ba86c8c7e..5eb500d61c9 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -76,12 +76,12 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs + * @param ?Translate $langs Object langs * @param Societe|string $objsoc Object thirdparty - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - public function getExample($langs, $objsoc = '', $type = -1) + public function getExample($langs = null, $objsoc = '', $type = -1) { return $this->prefixcustomer.'0901-00001
'.$this->prefixsupplier.'0901-00001'; } diff --git a/htdocs/core/modules/societe/mod_codecompta_aquarium.php b/htdocs/core/modules/societe/mod_codecompta_aquarium.php index 64b65be81e5..0161aff09d6 100644 --- a/htdocs/core/modules/societe/mod_codecompta_aquarium.php +++ b/htdocs/core/modules/societe/mod_codecompta_aquarium.php @@ -45,7 +45,7 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -130,12 +130,12 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode /** * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs + * @param ?Translate $langs Object langs * @param Societe|string $objsoc Object thirdparty - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) * @return string Return string example */ - public function getExample($langs, $objsoc = '', $type = -1) + public function getExample($langs = null, $objsoc = '', $type = -1) { $s = ''; $s .= $this->prefixcustomeraccountancycode.'CUSTCODE'; diff --git a/htdocs/core/modules/societe/mod_codecompta_digitaria.php b/htdocs/core/modules/societe/mod_codecompta_digitaria.php index 2466bed7522..28686db0ed6 100644 --- a/htdocs/core/modules/societe/mod_codecompta_digitaria.php +++ b/htdocs/core/modules/societe/mod_codecompta_digitaria.php @@ -40,7 +40,7 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -159,16 +159,20 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode } /** - * Return an example of result returned by getNextValue + * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs - * @param Societe|string $objsoc Object thirdparty - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) - * @return string Example + * @param ?Translate $langs Object langs + * @param Societe|string $objsoc Object thirdparty + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example */ - public function getExample($langs, $objsoc = '', $type = -1) + public function getExample($langs = null, $objsoc = '', $type = -1) { global $conf, $mysoc; + if (!$langs instanceof Translate) { + $langs = $GLOBALS['langs']; + '@phan-var-force Translate $langs'; + } $s = $langs->trans("ThirdPartyName").": ".$mysoc->name; $s .= "
\n"; diff --git a/htdocs/core/modules/societe/mod_codecompta_panicum.php b/htdocs/core/modules/societe/mod_codecompta_panicum.php index b3d5f6fcfd4..f16bb7b7ea4 100644 --- a/htdocs/core/modules/societe/mod_codecompta_panicum.php +++ b/htdocs/core/modules/societe/mod_codecompta_panicum.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2010 Laurent Destailleur * Copyright (C) 2024 Frédéric France + * 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 @@ -43,7 +44,7 @@ class mod_codecompta_panicum extends ModeleAccountancyCode /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -69,15 +70,16 @@ class mod_codecompta_panicum extends ModeleAccountancyCode return $langs->trans("ModuleCompanyCode".$this->name); } + /** - * Return an example of result returned by getNextValue + * Return an example of result returned by getNextValue * - * @param Translate $langs Object langs - * @param Societe|string $objsoc Object thirdparty - * @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect) - * @return string Example + * @param ?Translate $langs Object langs + * @param Societe|string $objsoc Object thirdparty + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example */ - public function getExample($langs, $objsoc = '', $type = -1) + public function getExample($langs = null, $objsoc = '', $type = -1) { return ''; } diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php index 4504e008e5f..f32e6257bb7 100644 --- a/htdocs/core/modules/societe/modules_societe.class.php +++ b/htdocs/core/modules/societe/modules_societe.class.php @@ -85,6 +85,17 @@ abstract class ModeleThirdPartyCode extends CommonNumRefGenerator abstract public function __construct($db); + /** + * Return an example of result returned by getNextValue + * + * @param ?Translate $langs Object langs + * @param Societe|string $objsoc Object thirdparty + * @param int<-1,2> $type Type of third party (1:customer, 2:supplier, -1:autodetect) + * @return string Return string example + */ + abstract public function getExample($langs = null, $objsoc = '', $type = -1); + + /** * Return next value available * diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index d4d838f3475..03eebc4b048 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -38,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/doc.lib.php'; class doc_generic_stock_odt extends ModelePDFStock { /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; @@ -321,7 +322,7 @@ class doc_generic_stock_odt extends ModelePDFStock ); complete_substitutions_array($substitutionarray, $langs, $object); // Call the ODTSubstitution hook - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$substitutionarray); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$substitutionarray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks // Line of free text @@ -379,7 +380,7 @@ class doc_generic_stock_odt extends ModelePDFStock complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray); + $parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$tmparray); $reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks foreach ($tmparray as $key => $value) { @@ -411,7 +412,7 @@ class doc_generic_stock_odt extends ModelePDFStock $array_lines = $this->get_substitutionarray_each_var_object($supplierprice, $outputlangs); complete_substitutions_array($array_lines, $outputlangs, $object, $supplierprice, "completesubstitutionarray_lines"); // Call the ODTSubstitutionLine hook - $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$array_lines, 'line'=>$supplierprice); + $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs, 'substitutionarray' => &$array_lines, 'line' => $supplierprice); $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks foreach ($array_lines as $key => $val) { try { @@ -442,7 +443,7 @@ class doc_generic_stock_odt extends ModelePDFStock } // Call the beforeODTSave hook - $parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + $parameters = array('odfHandler' => &$odfHandler, 'file' => $file, 'object' => $object, 'outputlangs' => $outputlangs); $reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks // Write new file @@ -470,7 +471,7 @@ class doc_generic_stock_odt extends ModelePDFStock $odfHandler = null; // Destroy object - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath' => $file); return 1; // Success } else { diff --git a/htdocs/core/modules/stock/modules_stock.php b/htdocs/core/modules/stock/modules_stock.php index cd5ad31db44..151ce445710 100644 --- a/htdocs/core/modules/stock/modules_stock.php +++ b/htdocs/core/modules/stock/modules_stock.php @@ -1,5 +1,6 @@ + * 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 @@ -44,7 +45,7 @@ abstract class ModelePDFStock extends CommonDocGenerator public $type; /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index fd73c16962b..c575593aaf1 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -62,7 +62,7 @@ class pdf_eagle extends ModelePDFStockTransfer /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -1116,6 +1116,7 @@ class pdf_eagle extends ModelePDFStockTransfer $classname = ucfirst($origin); $linkedobject = new $classname($this->db); + '@phan-var-force CommonObject $linkedobject'; $result = $linkedobject->fetch($origin_id); if ($result >= 0) { //$linkedobject->fetchObjectLinked() Get all linked object to the $linkedobject (commonly order) into $linkedobject->linkedObjects diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index d2340b2cf5a..f769c797973 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -71,7 +71,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -150,6 +150,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer // phpcs:enable global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; + '@phan-var-force StockTransfer $object'; + if (!is_object($outputlangs)) { $outputlangs = $langs; } @@ -158,6 +160,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer $outputlangs->charset_output = 'ISO-8859-1'; } + // Load translation files required by page $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch", "stocks", "stocktransfer@stocktransfer")); @@ -835,6 +838,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer protected function drawInfoTable(&$pdf, $object, $posy, $outputlangs) { global $conf, $mysoc; + '@phan-var-force Commande|Propal|Facture $object'; // availability_code,... does not exist on Facture. + $default_font_size = pdf_getPDFFontSize($outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -906,7 +911,15 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer $pdf->MultiCell(80, 4, $dlp, 0, 'L'); $posy = $pdf->GetY() + 1; - } elseif ($object->availability_code || $object->availability) { // Show availability conditions + } elseif (property_exists($object, 'availability_code') + && property_exists($object, 'availability') + && ( + $object->availability_code + || $object->availability + ) + ) { + // Show availability conditions + $pdf->SetFont('', 'B', $default_font_size - 2); $pdf->SetXY($this->marge_gauche, $posy); $titre = $outputlangs->transnoentities("AvailabilityPeriod").':'; @@ -1158,11 +1171,11 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer /** * Show top header of page. * - * @param TCPDF $pdf Object PDF - * @param Object $object Object to show - * @param int $showaddress 0=no, 1=yes - * @param Translate $outputlangs Object lang for output - * @param string $titlekey Translation key to show as title of document + * @param TCPDF $pdf Object PDF + * @param Object $object Object to show + * @param int<0,1> $showaddress 0=no, 1=yes + * @param Translate $outputlangs Object lang for output + * @param string $titlekey Translation key to show as title of document * @return float|int Return topshift value */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "StockTransferSheetProforma") @@ -1170,6 +1183,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer // phpcs:enable global $conf, $langs; + '@phan-var-force StockTransfer $object'; + // Load traductions files required by page $outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies")); @@ -1465,6 +1480,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { // phpcs:enable + '@phan-var-force StockTransfer $object'; + $showdetails = getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS', 0); return pdf_pagefoot($pdf, $outputlangs, 'STOCKTRANSFER_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext); } @@ -1474,7 +1491,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer /** * Define Array Column Field * - * @param object $object common object + * @param CommonObject $object common object * @param Translate $outputlangs langs * @param int $hidedetails Do not show line details * @param int $hidedesc Do not show desc diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php index cb77d500fdd..62387787668 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php @@ -5,6 +5,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France * Copyright (C) 2021 Gauthier VERDOL + * 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 @@ -37,7 +38,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -126,7 +127,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer * Return next free value * * @param StockTransfer $object Object we need next value for - * @return string|0 Value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php index 57e7f238fc2..2df9df5bbc5 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_standard.php @@ -35,7 +35,7 @@ class mod_stocktransfer_standard extends ModeleNumRefStockTransfer { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -121,7 +121,7 @@ class mod_stocktransfer_standard extends ModeleNumRefStockTransfer * Return next free value * * @param StockTransfer $object Object we need next value for - * @return string|-1 Value if OK, -1 if KO + * @return string|int<-1,0> Value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/stocktransfer/modules_stocktransfer.php b/htdocs/core/modules/stocktransfer/modules_stocktransfer.php index c68ae5d3d7a..30ef2137333 100644 --- a/htdocs/core/modules/stocktransfer/modules_stocktransfer.php +++ b/htdocs/core/modules/stocktransfer/modules_stocktransfer.php @@ -7,6 +7,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García * Copyright (C) 2021 Gauthier VERDOL + * 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 @@ -67,5 +68,11 @@ abstract class ModelePDFStockTransfer extends CommonDocGenerator */ abstract class ModeleNumRefStockTransfer extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param StockTransfer $object Object we need next value for + * @return string|int<-1,0> Value if OK, 0 if KO + */ + abstract public function getNextValue($object); } diff --git a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php index eaf1004bba4..9d602601c39 100644 --- a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php @@ -6,6 +6,7 @@ * Copyright (C) 2018-2019 Philippe Grand * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2019 Tim Otte + * 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 @@ -48,7 +49,7 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices public $issuer; /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index 9870d32be17..c769cf44519 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -66,7 +66,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index 68b728b839c..d56d50ab247 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -37,7 +37,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -175,10 +175,10 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices /** * Return next value * - * @param Societe $objsoc Object third party + * @param Societe $objsoc Object third party * @param FactureFournisseur $object Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|-1 Value if OK, -1 if KO + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,0> Value if OK, -1 if KO */ public function getNextValue($objsoc, $object, $mode = 'next') { diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 7f10f50c0f3..e8029ccd033 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -6,6 +6,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2016-2021 Alexandre Spangaro * Copyright (C) 2024 Frédéric France + * 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 @@ -39,7 +40,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -150,10 +151,10 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices /** * Return next value * - * @param Societe $objsoc Object third party + * @param Societe $objsoc Object third party * @param FactureFournisseur $object Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|int Value if OK, 0 if KO + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object, $mode = 'next') { diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php index dddd06061ff..daa9fa1c0f7 100644 --- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013-2016 Philippe Grand * Copyright (C) 2014 Marcos García + * 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 @@ -77,5 +78,13 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator */ abstract class ModeleNumRefSuppliersInvoices extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param FactureFournisseur $object Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,0> Value if OK, <=0 if KO + */ + abstract public function getNextValue($objsoc, $object, $mode = 'next'); } diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index addb723887c..847f1cd1b60 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -6,6 +6,7 @@ * Copyright (C) 2018-2019 Philippe Grand * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2019 Tim Otte + * 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 @@ -48,7 +49,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders public $issuer; /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index 65022d0f41a..a0a576bd84f 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -70,7 +70,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 3a56120e895..1d93fbccd5a 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -69,7 +69,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; 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 6eb57b73d82..2e5efa815f1 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php @@ -35,7 +35,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -132,9 +132,9 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders /** * Return next value * - * @param Societe|string $objsoc Object third party + * @param Societe|string $objsoc Object third party * @param CommandeFournisseur $object Object - * @return string Value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 2ddbb51428e..350e22302ea 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -36,7 +36,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -129,11 +129,11 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders } /** - * Return next value + * Return next value * - * @param Societe|string $objsoc Object third party + * @param Societe|string $objsoc Object third party * @param CommandeFournisseur $object Object - * @return string|int Value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index b5f78c0fce7..e58b00e36d1 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011-2016 Philippe Grand * Copyright (C) 2014 Marcos García + * 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 @@ -98,5 +99,12 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator */ abstract class ModeleNumRefSuppliersOrders extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe|string $objsoc Object third party + * @param CommandeFournisseur $object Object + * @return string|int<-1,0> Value if OK, <=0 if KO + */ + abstract public function getNextValue($objsoc, $object); } diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php index 98761da67c2..f152644901b 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php @@ -4,6 +4,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2022 Ferran Marcet * Copyright (C) 2024 Frédéric France + * 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 @@ -67,7 +68,7 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index 268a87a84bf..886b0ea5fc2 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * 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 @@ -33,7 +34,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -120,9 +121,9 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments /** * Return next free value * - * @param Societe $objsoc Object thirdparty + * @param Societe $objsoc Object thirdparty * @param PaiementFourn $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { 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 30f323ecc81..1ad94cae993 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_bronan.php @@ -33,7 +33,7 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -121,9 +121,9 @@ class mod_supplier_payment_bronan extends ModeleNumRefSupplierPayments /** * Return next free value * - * @param Societe $objsoc Object thirdparty + * @param Societe $objsoc Object thirdparty * @param PaiementFourn $object Object we need next value for - * @return string|-1 Value if OK, -1 if KO + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php index 78bc070e283..235a0091a24 100644 --- a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php +++ b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php @@ -1,5 +1,6 @@ + * 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 @@ -68,5 +69,12 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator */ abstract class ModeleNumRefSupplierPayments extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Societe $objsoc Object thirdparty + * @param PaiementFourn $object Object we need next value for + * @return string|int<-1,0> Next value if OK, <=0 if KO + */ + abstract public function getNextValue($objsoc, $object); } diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index e2a07ed691d..572d5d56515 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2016 Charlie Benke * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -40,7 +41,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 2f7372a278d..2f7661f496b 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -67,7 +67,7 @@ class pdf_aurore extends ModelePDFSupplierProposal /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -1200,11 +1200,11 @@ class pdf_aurore extends ModelePDFSupplierProposal /** * Show top header of page. * - * @param TCPDF $pdf Object PDF - * @param Object $object Object to show - * @param int $showaddress 0=no, 1=yes - * @param Translate $outputlangs Object lang for output - * @return float|int Return topshift value + * @param TCPDF $pdf Object PDF + * @param CommonObject $object Object to show + * @param int<0,1> $showaddress 0=no, 1=yes + * @param Translate $outputlangs Object lang for output + * @return float|int Return topshift value */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs) { diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php index 9dd2adb67ef..6a7031f71d6 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php @@ -69,7 +69,7 @@ class pdf_zenith extends ModelePDFSupplierProposal /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; 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 ad61e3a55b2..9eaac2c7bd5 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -35,7 +35,7 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 3c06e708c5a..178979ef1db 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) + * 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 @@ -35,7 +36,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php index 7ac31b4929e..6d57bad5c0f 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_simple.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_simple.php @@ -36,7 +36,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos { /** * Dolibarr version of the loaded document 'development', 'experimental', 'dolibarr' - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -131,10 +131,10 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos * ALTER TABLE llx_facture ADD COLUMN calculated_numrefonly INTEGER AS (CASE SUBSTRING(ref FROM 1 FOR 2) WHEN 'TC' THEN CAST(SUBSTRING(ref FROM 10) AS SIGNED) ELSE 0 END) PERSISTENT; * ALTER TABLE llx_facture ADD INDEX calculated_numrefonly_idx (calculated_numrefonly); * - * @param Societe $objsoc Object third party - * @param Facture $invoice Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|int Next ref value or last ref if $mode is 'last' + * @param ?Societe $objsoc Object third party + * @param ?Facture $invoice Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,0> Next ref value or last ref if $mode is 'last' */ public function getNextValue($objsoc = null, $invoice = null, $mode = 'next') { diff --git a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php index e9ee32958d1..6b677761158 100644 --- a/htdocs/core/modules/takepos/mod_takepos_ref_universal.php +++ b/htdocs/core/modules/takepos/mod_takepos_ref_universal.php @@ -38,7 +38,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos { /** * Dolibarr version of the loaded document 'development', 'experimental', 'dolibarr' - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -119,10 +119,10 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Facture $invoice Object invoice - * @param string $mode 'next' for next value or 'last' for last value - * @return string|int Next value if OK, 0 if KO + * @param ?Societe $objsoc Object third party + * @param ?Facture $invoice Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,0> Next ref value or last ref if $mode is 'last' */ public function getNextValue($objsoc = null, $invoice = null, $mode = 'next') { diff --git a/htdocs/core/modules/takepos/modules_takepos.php b/htdocs/core/modules/takepos/modules_takepos.php index 88894d4fa8a..6307bd42e0a 100644 --- a/htdocs/core/modules/takepos/modules_takepos.php +++ b/htdocs/core/modules/takepos/modules_takepos.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Philippe Grand * Copyright (C) 2020 Open-DSI + * 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 @@ -34,5 +35,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php'; */ abstract class ModeleNumRefTakepos extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param ?Societe $objsoc Object third party + * @param ?Facture $invoice Object invoice + * @param string $mode 'next' for next value or 'last' for last value + * @return string|int<-1,0> Next ref value or last ref if $mode is 'last' + */ + abstract public function getNextValue($objsoc = null, $invoice = null, $mode = 'next'); } diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php index 94a60f1ac06..5648398db30 100644 --- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php +++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php @@ -39,7 +39,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/ticket/mod_ticket_simple.php b/htdocs/core/modules/ticket/mod_ticket_simple.php index 8c476eb91a7..59db009125f 100644 --- a/htdocs/core/modules/ticket/mod_ticket_simple.php +++ b/htdocs/core/modules/ticket/mod_ticket_simple.php @@ -34,7 +34,7 @@ class mod_ticket_simple extends ModeleNumRefTicket { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -119,9 +119,9 @@ class mod_ticket_simple extends ModeleNumRefTicket /** * Return next value * - * @param Societe $objsoc Object third party - * @param Ticket $ticket Object ticket - * @return string|-1 Value if OK, -1 if KO + * @param Societe $objsoc Object third party + * @param Ticket $ticket Object ticket + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $ticket) { diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index 1b1c58820de..81b263a931e 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * 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 @@ -32,7 +33,7 @@ class mod_ticket_universal extends ModeleNumRefTicket { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -125,9 +126,9 @@ class mod_ticket_universal extends ModeleNumRefTicket /** * Return next value * - * @param Societe $objsoc Object third party - * @param Ticket $ticket Object ticket - * @return string|int Next value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param Ticket $ticket Object ticket + * @return string|int<-1,0> Next value if OK, <=-1 if KO */ public function getNextValue($objsoc, $ticket) { diff --git a/htdocs/core/modules/ticket/modules_ticket.php b/htdocs/core/modules/ticket/modules_ticket.php index ab311c06487..7d152e898cc 100644 --- a/htdocs/core/modules/ticket/modules_ticket.php +++ b/htdocs/core/modules/ticket/modules_ticket.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2014 Regis Houssin * Copyright (C) 2014 Marcos García * Copyright (C) 2020 Charlene Benke + * 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 @@ -78,5 +79,12 @@ abstract class ModelePDFTicket extends CommonDocGenerator */ abstract class ModeleNumRefTicket extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param Ticket $ticket Object ticket + * @return string|int<-1,0> Next value if OK, <=-1 if KO + */ + abstract public function getNextValue($objsoc, $ticket); } diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 2f4988922bc..20a002a7082 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -39,7 +39,7 @@ class doc_generic_user_odt extends ModelePDFUser { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/user/modules_user.class.php b/htdocs/core/modules/user/modules_user.class.php index a8329300ca7..953c23c6ab5 100644 --- a/htdocs/core/modules/user/modules_user.class.php +++ b/htdocs/core/modules/user/modules_user.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin + * 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 diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 019584431a6..80755e65b2c 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -40,7 +41,7 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index dad2c124224..f372547a395 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -5,6 +5,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2019-2024 Frédéric France * Copyright (C) 2020 Gauthier VERDOL + * 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 @@ -37,7 +38,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -126,7 +127,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation * Return next free value * * @param Workstation $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/workstation/mod_workstation_standard.php b/htdocs/core/modules/workstation/mod_workstation_standard.php index c68952f36a6..7beeb90cd69 100644 --- a/htdocs/core/modules/workstation/mod_workstation_standard.php +++ b/htdocs/core/modules/workstation/mod_workstation_standard.php @@ -34,7 +34,7 @@ class mod_workstation_standard extends ModeleNumRefWorkstation { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -117,8 +117,8 @@ class mod_workstation_standard extends ModeleNumRefWorkstation /** * Return next free value * - * @param Workstation $object Object we need next value for - * @return string|-1 Next value if OK, -1 if KO + * @param Workstation $object Object we need next value for + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/workstation/modules_workstation.php b/htdocs/core/modules/workstation/modules_workstation.php index 4dc2b715798..74f2f130624 100644 --- a/htdocs/core/modules/workstation/modules_workstation.php +++ b/htdocs/core/modules/workstation/modules_workstation.php @@ -7,6 +7,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García * Copyright (C) 2020 Gauthier VERDOL + * 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 @@ -81,5 +82,11 @@ abstract class ModelePDFWorkstation extends CommonDocGenerator */ abstract class ModeleNumRefWorkstation extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Workstation $object Object we need next value for + * @return string|int<-1,0> Next value if OK, <=0 if KO + */ + abstract public function getNextValue($object); } diff --git a/htdocs/core/tpl/formlayoutai.tpl.php b/htdocs/core/tpl/formlayoutai.tpl.php index 088fc6d776b..3ab9c3631a0 100644 --- a/htdocs/core/tpl/formlayoutai.tpl.php +++ b/htdocs/core/tpl/formlayoutai.tpl.php @@ -41,6 +41,11 @@ if (empty($htmlname)) { * Copyright (C) 2011-2022 Laurent Destailleur + * 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 @@ -162,10 +163,10 @@ $(document).ready(function () {
'.$module->name."\n"; + print '
'.$module->getName($langs)."\n"; print $module->info($langs); print '\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index d76e193d30e..f3427bf8a8d 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 MDW + * Copyright (C) ---Put here your own copyright and developer email--- * * 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 diff --git a/htdocs/modulebuilder/template/class/api_mymodule.class.php b/htdocs/modulebuilder/template/class/api_mymodule.class.php index 25291332ffd..d41f3e2ca66 100644 --- a/htdocs/modulebuilder/template/class/api_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/api_mymodule.class.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2024 MDW * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify @@ -65,6 +66,8 @@ class MyModuleApi extends DolibarrApi * @param int $id ID of myobject * @return Object Object with cleaned properties * + * @phan-return MyObject + * * @url GET myobjects/{id} * * @throws RestException 403 Not allowed @@ -99,7 +102,9 @@ class MyModuleApi extends DolibarrApi * @param int $page Page number * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" * @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names - * @return array Array of order objects + * @return array Array of ordered objects + * + * @phan-return MyObject[] * * @throws RestException 403 Not allowed * @throws RestException 503 System error @@ -186,7 +191,8 @@ class MyModuleApi extends DolibarrApi /** * Create myobject object * - * @param array $request_data Request datas + * @param array $request_data Request data + * @phan-param array $request_data * @return int ID of myobject * * @throws RestException 403 Not allowed @@ -223,7 +229,7 @@ class MyModuleApi extends DolibarrApi // Clean data // $this->myobject->abc = sanitizeVal($this->myobject->abc, 'alphanohtml'); - if ($this->myobject->create(DolibarrApiAccess::$user)<0) { + if ($this->myobject->create(DolibarrApiAccess::$user) < 0) { throw new RestException(500, "Error creating MyObject", array_merge(array($this->myobject->error), $this->myobject->errors)); } return $this->myobject->id; @@ -234,8 +240,11 @@ class MyModuleApi extends DolibarrApi * * @param int $id Id of myobject to update * @param array $request_data Datas + * @phan-param array $request_data * @return Object Object after update * + * @phan-return MyObject + * * @throws RestException 403 Not allowed * @throws RestException 404 Not found * @throws RestException 500 System error @@ -291,6 +300,7 @@ class MyModuleApi extends DolibarrApi * * @param int $id MyObject ID * @return array + * @phan-return array * * @throws RestException 403 Not allowed * @throws RestException 404 Not found @@ -329,10 +339,12 @@ class MyModuleApi extends DolibarrApi /** - * Validate fields before create or update object + * Validate fields before creating or updating object * * @param array $data Array of data to validate + * @phan-param array $data * @return array + * @phan-return array $data * * @throws RestException */ @@ -357,7 +369,7 @@ class MyModuleApi extends DolibarrApi // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** - * Clean sensible object datas + * Clean sensible object data fields * * @param Object $object Object to clean * @return Object Object with cleaned properties diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 3001bedbaaf..c2045903283 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -275,9 +275,9 @@ class MyObject extends CommonObject /** * Create object into database * - * @param User $user User that creates - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int Return integer <0 if KO, Id of created object if OK + * @param User $user User that creates + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int<-1,max> Return integer <0 if KO, Id of created object if OK */ public function create(User $user, $notrigger = 0) { @@ -291,9 +291,9 @@ class MyObject extends CommonObject /** * Clone an object into another one * - * @param User $user User that creates - * @param int $fromid Id of object to clone - * @return mixed New object created, <0 if KO + * @param User $user User that creates + * @param int $fromid Id of object to clone + * @return mixed New object created, <0 if KO */ public function createFromClone(User $user, $fromid) { @@ -390,11 +390,11 @@ class MyObject extends CommonObject /** * Load object in memory from the database * - * @param int $id Id object - * @param string $ref Ref - * @param int $noextrafields 0=Default to load extrafields, 1=No extrafields - * @param int $nolines 0=Default to load extrafields, 1=No extrafields - * @return int Return integer <0 if KO, 0 if not found, >0 if OK + * @param int $id Id object + * @param string $ref Ref + * @param int<0,1> $noextrafields 0=Default to load extrafields, 1=No extrafields + * @param int<0,1> $nolines 0=Default to load extrafields, 1=No extrafields + * @return int<-1,1> Return integer <0 if KO, 0 if not found, >0 if OK */ public function fetch($id, $ref = null, $noextrafields = 0, $nolines = 0) { @@ -408,8 +408,8 @@ class MyObject extends CommonObject /** * Load object lines in memory from the database * - * @param int $noextrafields 0=Default to load extrafields, 1=No extrafields - * @return int Return integer <0 if KO, 0 if not found, >0 if OK + * @param int<0,1> $noextrafields 0=Default to load extrafields, 1=No extrafields + * @return int<1,1> Return integer <0 if KO, 0 if not found, >0 if OK */ public function fetchLines($noextrafields = 0) { @@ -425,14 +425,14 @@ class MyObject extends CommonObject * Using a fetchAll() with limit = 0 is a very bad practice. Instead try to forge yourself an optimized SQL request with * your own loop with start and stop pagination. * - * @param string $sortorder Sort Order - * @param string $sortfield Sort field - * @param int $limit Limit the number of lines returned - * @param int $offset Offset - * @param string $filter Filter as an Universal Search string. - * Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')' - * @param string $filtermode No more used - * @return array|int int <0 if KO, array of pages if OK + * @param string $sortorder Sort Order + * @param string $sortfield Sort field + * @param int<0,max> $limit Limit the number of lines returned + * @param int<0,max> $offset Offset + * @param string $filter Filter as an Universal Search string. + * Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')' + * @param string $filtermode No longer used + * @return self[]|int<-1,-1> int <0 if KO, array of pages if OK */ public function fetchAll($sortorder = '', $sortfield = '', $limit = 1000, $offset = 0, string $filter = '', $filtermode = 'AND') { @@ -500,9 +500,9 @@ class MyObject extends CommonObject /** * Update object into database * - * @param User $user User that modifies - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int Return integer <0 if KO, >0 if OK + * @param User $user User that modifies + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int<-1,1> Return integer <0 if KO, >0 if OK */ public function update(User $user, $notrigger = 0) { @@ -512,9 +512,9 @@ class MyObject extends CommonObject /** * Delete object in database * - * @param User $user User that deletes - * @param int $notrigger 0=launch triggers, 1=disable triggers - * @return int Return integer <0 if KO, >0 if OK + * @param User $user User that deletes + * @param int<0,1> $notrigger 0=launch triggers, 1=disable triggers + * @return int<-1,1> Return integer <0 if KO, >0 if OK */ public function delete(User $user, $notrigger = 0) { @@ -525,10 +525,10 @@ class MyObject extends CommonObject /** * Delete a line of object in database * - * @param User $user User that delete - * @param int $idline Id of line to delete - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int >0 if OK, <0 if KO + * @param User $user User that delete + * @param int $idline Id of line to delete + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int<-2,1> >0 if OK, <0 if KO */ public function deleteLine(User $user, $idline, $notrigger = 0) { @@ -544,9 +544,9 @@ class MyObject extends CommonObject /** * Validate object * - * @param User $user User making status change - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int Return integer <=0 if OK, 0=Nothing done, >0 if KO + * @param User $user User making status change + * @param int<0,1> $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int<-1,1> Return integer <=0 if OK, 0=Nothing done, >0 if KO */ public function validate($user, $notrigger = 0) { @@ -680,9 +680,9 @@ class MyObject extends CommonObject /** * Set draft status * - * @param User $user Object user that modify - * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers - * @return int Return integer <0 if KO, >0 if OK + * @param User $user Object user that modify + * @param int<0,1> $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int<0,1> Return integer <0 if KO, >0 if OK */ public function setDraft($user, $notrigger = 0) { @@ -704,9 +704,9 @@ class MyObject extends CommonObject /** * Set cancel status * - * @param User $user Object user that modify - * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers - * @return int Return integer <0 if KO, 0=Nothing done, >0 if OK + * @param User $user Object user that modify + * @param int<0,1> $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int<-1,1> Return integer <0 if KO, 0=Nothing done, >0 if OK */ public function cancel($user, $notrigger = 0) { @@ -728,9 +728,9 @@ class MyObject extends CommonObject /** * Set back to validated status * - * @param User $user Object user that modify - * @param int $notrigger 1=Does not execute triggers, 0=Execute triggers - * @return int Return integer <0 if KO, 0=Nothing done, >0 if OK + * @param User $user Object user that modify + * @param int<0,1> $notrigger 1=Does not execute triggers, 0=Execute triggers + * @return int<-1,1> Return integer <0 if KO, 0=Nothing done, >0 if OK */ public function reopen($user, $notrigger = 0) { diff --git a/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php b/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php index 84c5f3886f6..fc3f69c412b 100644 --- a/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php +++ b/htdocs/modulebuilder/template/core/boxes/mymodulewidget1.php @@ -1,7 +1,8 @@ - * Copyright (C) 2018-2023 Frédéric France - * Copyright (C) ---Put here your own copyright and developer email--- +/* Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2018-2023 Frédéric France + * Copyright (C) 2024 MDW + * Copyright (C) ---Put your own copyright and developer email here--- * * 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 @@ -90,8 +91,8 @@ class mymodulewidget1 extends ModeleBoxes /** * Load data into info_box_contents array to show array later. Called by Dolibarr before displaying the box. * - * @param int $max Maximum number of records to load - * @return void + * @param int<0,max> $max Maximum number of records to load + * @return void */ public function loadBox($max = 5) { @@ -108,7 +109,7 @@ class mymodulewidget1 extends ModeleBoxes // Title text 'text' => $text, // Add a link - 'sublink' => 'http://example.com', + 'sublink' => 'https://example.com', // Sublink icon placed after the text 'subpicto' => 'object_mymodule@mymodule', // Sublink icon HTML alt text @@ -135,7 +136,7 @@ class mymodulewidget1 extends ModeleBoxes // Main text for content of cell 'text' => 'First cell of first line', // Link on 'text' and 'logo' elements - 'url' => 'http://example.com', + 'url' => 'https://example.com', // Link's target HTML property 'target' => '_blank', // Fist line logo (deprecated. Include instead logo html code into text or text2, and set asis property to true to avoid HTML cleaning) @@ -183,12 +184,12 @@ class mymodulewidget1 extends ModeleBoxes } /** - * Method to show box. Called by Dolibarr eatch time it wants to display the box. + * Method to show box. Called by Dolibarr each time it needs to display the box. * - * @param array $head Array with properties of box title - * @param array $contents Array with properties of box lines - * @param int $nooutput No print, only return string - * @return string + * @param ?array{text?:string,sublink?:string,subpicto:?string,nbcol?:int,limit?:int,subclass?:string,graph?:string} $head Array with properties of box title + * @param ?array> $contents Array with properties of box lines + * @param int<0,1> $nooutput When 1, do not print, return string + * @return ?string */ public function showBox($head = null, $contents = null, $nooutput = 0) { diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailing_mymodule_selector1.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailing_mymodule_selector1.modules.php index cd931514e70..c885b1355c6 100644 --- a/htdocs/modulebuilder/template/core/modules/mailings/mailing_mymodule_selector1.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mailings/mailing_mymodule_selector1.modules.php @@ -1,6 +1,7 @@ +/* Copyright (C) 2005-2012 Laurent Destailleur * Copyright (C) 2024 MDW + * Copyright (C) ---Put your own copyright and developer email here--- * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -41,9 +42,9 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets /** - * Constructor + * Constructor * - * @param DoliDB $db Database handler + * @param DoliDB $db Database handler */ public function __construct($db) { @@ -53,9 +54,9 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets /** - * Displays the filter form that appears in the mailing recipient selection page + * Display the filter form that appears in the mailing recipient selection page * - * @return string Return select zone + * @return string Return select zone */ public function formFilter() { @@ -79,10 +80,10 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets /** - * Returns url link to file of the source of the recipient of the mailing + * Return URL link to file of the source of the recipient of the mailing * - * @param int $id ID - * @return string Url link + * @param int $id ID + * @return string Url link */ public function url($id) { @@ -92,10 +93,10 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * This is the main function that returns the array of emails + * This is the main function that returns the array of emails * - * @param int $mailing_id Id of emailing - * @return int Return integer <0 if error, number of emails added if ok + * @param int $mailing_id Id of emailing + * @return int<-1,max> Return integer <0 if error, number of emails added if ok */ public function add_to_target($mailing_id) { @@ -152,7 +153,7 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets // Example: $target[0]=array('email'=>'myemail@mydomain.com','name'=>'Doe','firstname'=>'John'); - // ----- Your code end here ----- + // ----- Your code ends here ----- return parent::addTargetsToDatabase($mailing_id, $target); } @@ -164,7 +165,7 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array + * @return string[] */ public function getSqlArrayForStats() { @@ -178,12 +179,12 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets /** - * Return here number of distinct emails returned by your selector. - * For example if this selector is used to extract 500 different - * emails from a text file, this function must return 500. + * Return the number of distinct emails returned by your selector. + * For example if this selector is used to extract 500 different + * emails from a text file, this function must return 500. * - * @param string $sql Not use here - * @return int Nb of recipients or -1 if KO + * @param string $sql Not used here + * @return int<-1,max> Nb of recipients or -1 if KO */ public function getNbOfRecipients($sql = '') { diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index bc694dfe711..256fc605c2b 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -1,7 +1,8 @@ - * Copyright (C) 2018-2019 Nicolas ZABOURI - * Copyright (C) 2019-2024 Frédéric France +/* Copyright (C) 2004-2018 Laurent Destailleur + * Copyright (C) 2018-2019 Nicolas ZABOURI + * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2024 MDW * Copyright (C) ---Put here your own copyright and developer email--- * * This program is free software; you can redistribute it and/or modify @@ -316,19 +317,19 @@ class modMyModule extends DolibarrModules // Add here entries to declare new menus /* BEGIN MODULEBUILDER TOPMENU */ $this->menu[$r++] = array( - 'fk_menu'=>'', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode - 'type'=>'top', // This is a Top menu entry - 'titre'=>'ModuleMyModuleName', + 'fk_menu' => '', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode + 'type' => 'top', // This is a Top menu entry + 'titre' => 'ModuleMyModuleName', 'prefix' => img_picto('', $this->picto, 'class="pictofixedwidth valignmiddle"'), - 'mainmenu'=>'mymodule', - 'leftmenu'=>'', - 'url'=>'/mymodule/mymoduleindex.php', - 'langs'=>'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>1000 + $r, - 'enabled'=>'isModEnabled("mymodule")', // Define condition to show or hide menu entry. Use 'isModEnabled("mymodule")' if entry must be visible if module is enabled. - 'perms'=>'1', // Use 'perms'=>'$user->hasRight("mymodule", "myobject", "read")' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + 'mainmenu' => 'mymodule', + 'leftmenu' => '', + 'url' => '/mymodule/mymoduleindex.php', + 'langs' => 'mymodule@mymodule', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position' => 1000 + $r, + 'enabled' => 'isModEnabled("mymodule")', // Define condition to show or hide menu entry. Use 'isModEnabled("mymodule")' if entry must be visible if module is enabled. + 'perms' => '1', // Use 'perms'=>'$user->hasRight("mymodule", "myobject", "read")' if you want your menu with a permission rules + 'target' => '', + 'user' => 2, // 0=Menu for internal users, 1=external users, 2=both ); /* END MODULEBUILDER TOPMENU */ @@ -458,7 +459,7 @@ class modMyModule extends DolibarrModules * It also creates data directories * * @param string $options Options when enabling module ('', 'noboxes') - * @return int 1 if OK, 0 if KO + * @return int<-1,1> 1 if OK, <=0 if KO */ public function init($options = '') { @@ -489,7 +490,7 @@ class modMyModule extends DolibarrModules // Document templates $moduledir = dol_sanitizeFileName('mymodule'); $myTmpObjects = array(); - $myTmpObjects['MyObject'] = array('includerefgeneration'=>0, 'includedocgeneration'=>0); + $myTmpObjects['MyObject'] = array('includerefgeneration' => 0, 'includedocgeneration' => 0); foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if ($myTmpObjectArray['includerefgeneration']) { @@ -521,12 +522,12 @@ class modMyModule extends DolibarrModules } /** - * Function called when module is disabled. - * Remove from database constants, boxes and permissions from Dolibarr database. - * Data directories are not deleted + * Function called when module is disabled. + * Remove from database constants, boxes and permissions from Dolibarr database. + * Data directories are not deleted * - * @param string $options Options when enabling module ('', 'noboxes') - * @return int 1 if OK, 0 if KO + * @param string $options Options when enabling module ('', 'noboxes') + * @return int<-1,1> 1 if OK, <=0 if KO */ public function remove($options = '') { diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index 7b7c9b3e99c..2f9988bc741 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -1,11 +1,12 @@ - * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2014 Marcos García - * Copyright (C) 2016 Charlie Benke - * Copyright (C) 2018-2021 Philippe Grand - * Copyright (C) 2018-2024 Frédéric France +/* Copyright (C) 2010-2012 Laurent Destailleur + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2014 Marcos García + * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2018-2021 Philippe Grand + * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2024 MDW + * Copyright (C) ---Put your own copyright and developer email here--- * * 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 @@ -54,7 +55,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject public $phpmin = array(7, 0); /** - * @var string Dolibarr version of the loaded document + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' Dolibarr version of the loaded document */ public $version = 'dolibarr'; @@ -215,15 +216,15 @@ class doc_generic_myobject_odt extends ModelePDFMyObject /** * Function to build a document on disk using the generic odt module. * - * @param MyObject $object Object source to build document - * @param Translate $outputlangs Lang output object - * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return int 1 if OK, <=0 if KO + * @param MyObject $object Source object to generate document from + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1 if OK, <=0 if KO */ - public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) + public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $user, $langs, $conf, $mysoc, $hookmanager; diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index f35f94dba18..411a3658018 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -1,15 +1,16 @@ - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2008 Raphael Bertrand - * Copyright (C) 2010-2014 Juanjo Menent - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Doursenaud - * Copyright (C) 2015 Marcos García - * Copyright (C) 2017 Ferran Marcet - * Copyright (C) 2018-2024 Frédéric France +/* Copyright (C) 2004-2014 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2008 Raphael Bertrand + * Copyright (C) 2010-2014 Juanjo Menent + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2012 Cédric Salvador + * Copyright (C) 2012-2014 Raphaël Doursenaud + * Copyright (C) 2015 Marcos García + * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2024 MDW + * Copyright (C) ---Put your own copyright and developer email here--- * * 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 @@ -82,7 +83,7 @@ class pdf_standard_myobject extends ModelePDFMyObject /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z'''|'development'|'dolibarr'|'experimental' */ public $version = 'dolibarr'; @@ -151,15 +152,15 @@ class pdf_standard_myobject extends ModelePDFMyObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Function to build pdf onto disk + * Function to build and write pdf to disk * - * @param MyObject $object Object to generate - * @param Translate $outputlangs Lang output object - * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return int 1=OK, 0=KO + * @param MyObject $object Source object to generate document from + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1 if OK, <=0 if KO */ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { @@ -826,9 +827,9 @@ class pdf_standard_myobject extends ModelePDFMyObject /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param int<0,max> $maxfilenamelength Max length of value to show + * @return string[]|int<-1,0> List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { @@ -838,18 +839,18 @@ class pdf_standard_myobject extends ModelePDFMyObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** - * Show table for lines + * Show table for lines * - * @param tcpdf $pdf Object PDF - * @param string $tab_top Top position of table - * @param string $tab_height Height of table (rectangle) - * @param int $nexY Y (not used) - * @param Translate $outputlangs Langs object - * @param int $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title - * @param int $hidebottom Hide bottom bar of array - * @param string $currency Currency code - * @param Translate $outputlangsbis Langs object bis - * @return void + * @param tcpdf $pdf Object PDF + * @param string $tab_top Top position of table + * @param string $tab_height Height of table (rectangle) + * @param int $nexY Y (not used) + * @param Translate $outputlangs Langs object + * @param int<-1,1> $hidetop 1=Hide top bar of array and title, 0=Hide nothing, -1=Hide only title + * @param int<0,1> $hidebottom Hide bottom bar of array + * @param string $currency Currency code + * @param ?Translate $outputlangsbis Langs object bis + * @return void */ protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '', $outputlangsbis = null) { @@ -901,12 +902,12 @@ class pdf_standard_myobject extends ModelePDFMyObject /** * Show top header of page. * - * @param TCPDF $pdf Object PDF - * @param MyObject $object Object to show - * @param int $showaddress 0=no, 1=yes + * @param TCPDF $pdf Object PDF + * @param MyObject $object Object to show + * @param int<0,1> $showaddress 0=no, 1=yes * @param Translate $outputlangs Object lang for output - * @param Translate $outputlangsbis Object lang for output bis - * @return float|int Return topshift value + * @param ?Translate $outputlangsbis Object lang for output bis + * @return float|int Return topshift value */ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $outputlangsbis = null) { @@ -1163,13 +1164,13 @@ class pdf_standard_myobject extends ModelePDFMyObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** - * Show footer of page. Need this->emetteur object + * Show footer of page. Need this->emetteur object * - * @param TCPDF $pdf PDF - * @param Object $object Object to show - * @param Translate $outputlangs Object lang for output - * @param int $hidefreetext 1=Hide free text - * @return int Return height of bottom margin including footer text + * @param TCPDF $pdf PDF + * @param Object $object Object to show + * @param Translate $outputlangs Object lang for output + * @param int<0,1> $hidefreetext 1=Hide free text + * @return int Return height of bottom margin including footer text */ protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0) { @@ -1179,14 +1180,14 @@ class pdf_standard_myobject extends ModelePDFMyObject } /** - * Define Array Column Field + * Define Array Column Field * - * @param object $object common object - * @param Translate $outputlangs langs - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return void + * @param CommonObject $object common object + * @param Translate $outputlangs langs + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return void */ public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) { diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index f6ceb734330..d34bee94ea6 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -1,9 +1,11 @@ - * Copyright (C) 2004-2007 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2019-2024 Frédéric France +/* Copyright (C) 2003-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2008i Raphael Bertrand (Resultic) + * Copyright (C) 2019-2024 Frédéric France + * Copyright (C) 2024 MDW + * Copyright (C) ---Put your own copyright and developer email here--- * * 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,7 +38,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject { /** * Dolibarr version of the loaded document - * @var string + * @var string Version, possible values are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z''development'|'experimental'|'dolibarr' */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' @@ -52,10 +54,10 @@ class mod_myobject_advanced extends ModeleNumRefMyObject /** - * Returns the description of the numbering model + * Returns the description of the numbering model * - * @param Translate $langs Translate Object - * @return string Text with description + * @param Translate $langs Translate Object + * @return string Text with description */ public function info($langs) { @@ -79,7 +81,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject $tooltip .= $langs->trans("GenericMaskCodes5"); $tooltip .= '
'.$langs->trans("GenericMaskCodes5b"); - // Parametrage du prefix + // prefix configuration $text .= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'  '; - $s = $modCodeProduct->getToolTip($langs, null, -1); + $s = $modCodeProduct->getToolTip($langs, '', -1); print $form->textwithpicto('', $s, 1); print '
'.$module->nom."\n"; + print '
'.$module->getName($langs)."\n"; print $module->info($langs); print '
'; print $langs->trans("Paymentnumpad"); print ''; -$array = array(0=>$langs->trans("Numberspad"), 1=>$langs->trans("BillsCoinsPad")); +$array = array(0 => $langs->trans("Numberspad"), 1 => $langs->trans("BillsCoinsPad")); print $form->selectarray('TAKEPOS_NUMPAD', $array, (!getDolGlobalString('TAKEPOS_NUMPAD') ? '0' : $conf->global->TAKEPOS_NUMPAD), 0); print "