Qual: Fix PhanPluginUnknownObjectMethodCall where is the only phan notice (#30957)

* Qual: PhanPluginUnknownObjectMethodCall where it is the only phan notice

# Qual: PhanPluginUnknownObjectMethodCall where it is the only phan notice

Fix PhanPluginUnknownObjectMethodCall in files where it is the only phan notice

* Update phan baseline

* Fix $website global type in some contexts
This commit is contained in:
MDW 2024-09-16 01:49:38 +02:00 committed by GitHub
parent fa8078c03d
commit 115627a054
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
52 changed files with 276 additions and 165 deletions

View File

@ -12,21 +12,21 @@ return [
// PhanPluginUnknownPropertyType : 1550+ occurrences
// PhanPossiblyUndeclaredGlobalVariable : 1070+ occurrences
// PhanTypeMismatchArgumentProbablyReal : 1000+ occurrences
// PhanUndeclaredProperty : 750+ occurrences
// PhanUndeclaredProperty : 840+ occurrences
// PhanUndeclaredGlobalVariable : 690+ occurrences
// PhanPluginUnknownObjectMethodCall : 520+ occurrences
// PhanPluginUnknownArrayMethodReturnType : 480+ occurrences
// PhanPluginUnknownArrayMethodParamType : 420+ occurrences
// PhanPluginUnknownObjectMethodCall : 350+ occurrences
// PhanPossiblyUndeclaredVariable : 350+ occurrences
// PhanPluginUnknownArrayFunctionReturnType : 230+ occurrences
// PhanTypeMismatchProperty : 210+ occurrences
// PhanPluginUnknownArrayFunctionParamType : 170+ occurrences
// PhanTypeMismatchArgumentNullableInternal : 120+ occurrences
// PhanTypeExpectedObjectPropAccess : 85+ occurrences
// PhanPluginUnknownArrayPropertyType : 80+ occurrences
// PhanPluginUndeclaredVariableIsset : 70+ occurrences
// PhanPluginEmptyStatementIf : 65+ occurrences
// PhanRedefineFunction : 55+ occurrences
// PhanTypeExpectedObjectPropAccess : 50+ occurrences
// PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences
// PhanTypeMismatchDimFetch : 45+ occurrences
// PhanPossiblyNullTypeMismatchProperty : 20+ occurrences
@ -40,7 +40,7 @@ return [
// PhanPluginSuspiciousParamPosition : 10+ occurrences
// PhanTypeMismatchDimFetchNullable : 10+ occurrences
// PhanPluginDuplicateArrayKey : 8 occurrences
// PhanUndeclaredMethod : 5 occurrences
// PhanUndeclaredMethod : 8 occurrences
// PhanInvalidFQSENInClasslike : 4 occurrences
// PhanEmptyFQSENInClasslike : 3 occurrences
// PhanParamTooMany : 2 occurrences
@ -57,7 +57,6 @@ return [
'htdocs/admin/bank.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/admin/bank_extrafields.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/admin/bankline_extrafields.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/admin/barcode.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/admin/bom.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
'htdocs/admin/chequereceipts.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/admin/company.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
@ -138,7 +137,7 @@ return [
'htdocs/asset/model/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/asset/tpl/accountancy_codes_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/asterisk/wrapper.php' => ['PhanRedefineFunction'],
'htdocs/barcode/codeinit.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
@ -206,7 +205,7 @@ return [
'htdocs/comm/propal/class/propalestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
'htdocs/comm/propal/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
'htdocs/comm/propal/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'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', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
@ -215,7 +214,7 @@ return [
'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/commande/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/compta/bank/annuel.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
@ -255,8 +254,8 @@ return [
'htdocs/compta/facture/note.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/compta/facture/prelevement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/compta/facture/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/compta/facture/tpl/linkedobjectblock.tpl.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'],
'htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/compta/facture/tpl/linkedobjectblock.tpl.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'],
'htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/compta/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
'htdocs/compta/journal/sellsjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
'htdocs/compta/localtax/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
@ -323,11 +322,10 @@ return [
'htdocs/contrat/class/api_contracts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
'htdocs/contrat/messaging.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/contrat/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/contrat/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
'htdocs/core/actions_builddoc.inc.php' => ['PhanUndeclaredProperty'],
'htdocs/core/actions_comments.inc.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/core/actions_dellink.inc.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/core/actions_extrafields.inc.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/core/actions_lineupdown.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
'htdocs/core/actions_linkedfiles.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
@ -337,11 +335,7 @@ return [
'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'],
'htdocs/core/ajax/ajaxtooltip.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/core/ajax/extraparams.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/core/ajax/fileupload.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/core/ajax/loadinplace.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/core/ajax/objectonoff.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/core/ajax/onlineSign.php' => ['PhanPluginUnknownArrayFunctionParamType'],
'htdocs/core/ajax/saveinplace.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
'htdocs/core/ajax/selectobject.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
@ -515,7 +509,7 @@ return [
'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/website.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentNullableInternal'],
'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'],
@ -528,7 +522,7 @@ return [
'htdocs/core/modules/barcode/modules_barcode.class.php' => ['PhanPluginUnknownPropertyType'],
'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanUndeclaredProperty'],
'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanUndeclaredMethod'],
'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
'htdocs/core/modules/commande/mod_commande_saphir.php' => ['PhanTypeMismatchArgumentProbablyReal'],
@ -645,12 +639,12 @@ return [
'htdocs/core/tpl/resource_view.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'],
'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_modMailmanspip_Mailmanspipsynchro.class.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php' => ['PhanTypeComparisonFromArray', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
'htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php' => ['PhanUndeclaredProperty'],
'htdocs/core/triggers/interface_50_modNotification_Notification.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
'htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess'],
'htdocs/core/triggers/interface_80_modStripe_Stripe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'],
'htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php' => ['PhanUndeclaredProperty'],
'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/cron/class/cronjob.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
'htdocs/cron/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
@ -669,7 +663,7 @@ return [
'htdocs/debugbar/class/TraceableDB.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
'htdocs/delivery/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'],
'htdocs/delivery/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/delivery/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/document.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/don/admin/donation.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/don/card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
@ -707,7 +701,6 @@ return [
'htdocs/eventorganization/conferenceorboothattendee_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/eventorganization/core/actions_massactions_mail.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', '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'],
'htdocs/expedition/class/expedition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
@ -719,7 +712,7 @@ return [
'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'],
'htdocs/expedition/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/expensereport/class/api_expensereports.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
'htdocs/expensereport/class/expensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeExpectedObjectPropAccessButGotNull'],
@ -732,7 +725,7 @@ return [
'htdocs/expensereport/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
'htdocs/expensereport/tpl/expensereport_addfile.tpl.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/expensereport/tpl/expensereport_linktofile.tpl.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/fichinter/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
@ -741,7 +734,7 @@ return [
'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/fichinter/class/fichinterstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/filefunc.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
'htdocs/fourn/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
@ -758,7 +751,7 @@ return [
'htdocs/fourn/commande/info.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/fourn/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/fourn/commande/note.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/fourn/contact.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/fourn/facture/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/fourn/facture/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
@ -870,10 +863,9 @@ return [
'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/index.php' => ['PhanUndeclaredProperty'],
'htdocs/printing/lib/printing.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
'htdocs/product/admin/dynamic_prices.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/product/admin/product_lot.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/product/admin/product_tools.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/product/ajax/product_lot.php' => ['PhanTypeMismatchArgumentProbablyReal'],
@ -892,7 +884,7 @@ return [
'htdocs/product/document.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable'],
'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/dynamic_price/class/price_parser.class.php' => ['PhanPluginUnknownArrayMethodParamType', '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'],
@ -968,7 +960,7 @@ return [
'htdocs/projet/tasks/note.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/projet/tasks/task.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/public/agenda/agendaexport.php' => ['PhanRedefineFunction'],
'htdocs/public/bookcal/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'],
'htdocs/public/company/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
@ -1000,12 +992,8 @@ return [
'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/public/webportal/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/webportal/tpl/errors.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/public/webportal/tpl/footer.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/public/webportal/tpl/hero-header-banner.tpl.php' => ['PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable'],
'htdocs/public/webportal/tpl/home.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/public/webportal/tpl/login.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/public/webportal/webportal.main.inc.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction'],
'htdocs/public/website/index.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/public/website/javascript.js.php' => ['PhanRedefineFunction'],
@ -1019,7 +1007,7 @@ return [
'htdocs/reception/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/reception/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
'htdocs/reception/note.php' => ['PhanUndeclaredGlobalVariable'],
'htdocs/reception/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/reception/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/recruitment/admin/setup.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall'],
'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall'],
'htdocs/recruitment/class/api_recruitments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
@ -1057,7 +1045,7 @@ return [
'htdocs/salaries/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
'htdocs/salaries/paiement_salary.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/salaries/virement_request.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
'htdocs/societe/admin/societe.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/societe/admin/societe.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'],
'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'],
@ -1088,7 +1076,7 @@ return [
'htdocs/supplier_proposal/class/api_supplier_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
'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/supplier_proposal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/support/inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanRedefineFunction'],
'htdocs/takepos/admin/orderprinters.php' => ['PhanTypeMismatchDimFetch'],
'htdocs/takepos/admin/terminal.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
@ -1124,7 +1112,7 @@ return [
'htdocs/ticket/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/ticket/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
'htdocs/ticket/list.php' => ['PhanTypeComparisonFromArray'],
'htdocs/ticket/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/ticket/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
'htdocs/user/agenda_extsites.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/user/bank.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
'htdocs/user/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
@ -1132,10 +1120,8 @@ return [
'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/group/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/user/group/perms.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/user/param_ihm.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/user/passwordforgotten.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'htdocs/user/perms.php' => ['PhanPluginUnknownObjectMethodCall'],
'htdocs/variants/ajax/get_attribute_values.php' => ['PhanTypeComparisonFromArray'],
'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'],
@ -1145,7 +1131,6 @@ return [
'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'],
'htdocs/webhook/lib/webhook.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
@ -1176,7 +1161,7 @@ return [
'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/website.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/website/class/websitepage.class.php' => ['PhanPluginUnknownPropertyType'],
'htdocs/website/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
'htdocs/website/lib/websiteaccount.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],

View File

@ -391,6 +391,7 @@ if ($resql) {
$classname = "mod".ucfirst($obj->coder);
if (class_exists($classname)) {
$module = new $classname($db);
'@phan-var-force ModeleBarCode $module';
if ($module->encodingIsSupported($obj->encoding)) {
// Build barcode on disk (not used, this is done to make debug easier)
$result = $module->writeBarCode($obj->example, $obj->encoding, 'Y');

View File

@ -38,6 +38,7 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$langs->load("assets");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
$total = 0;
$ilink = 0;

View File

@ -70,7 +70,7 @@ class Categorie extends CommonObject
/**
* @var array Table of mapping between type string and ID used for field 'type' in table llx_categories
* @var array<string,int> Table of mapping between type string and ID used for field 'type' in table llx_categories
*/
protected $MAP_ID = array(
'product' => 0,
@ -90,7 +90,7 @@ class Categorie extends CommonObject
);
/**
* @var array Code mapping from ID
* @var array<int,string> Code mapping from ID
*
* @note This array should be removed in future, once previous constants are moved to the string value. Deprecated
*/
@ -112,7 +112,7 @@ class Categorie extends CommonObject
);
/**
* @var array Foreign keys mapping from type string when value does not match
* @var array<string,string> Foreign keys mapping from type string when value does not match
*
* @todo Move to const array when PHP 5.6 will be our minimum target
*/
@ -124,7 +124,7 @@ class Categorie extends CommonObject
);
/**
* @var array Category tables mapping from type string (llx_categorie_...) when value does not match
* @var array<string,string> Category tables mapping from type string (llx_categorie_...) when value does not match
*
* @note Move to const array when PHP 5.6 will be our minimum target
*/
@ -135,7 +135,7 @@ class Categorie extends CommonObject
);
/**
* @var array Object class mapping from type string
* @var array<string,string> Object class mapping from type string
*
* @note Move to const array when PHP 5.6 will be our minimum target
*/
@ -157,7 +157,7 @@ class Categorie extends CommonObject
);
/**
* @var array Title Area mapping from type string
* @var array<string,string> Title Area mapping from type string
*
* @note Move to const array when PHP 5.6 will be our minimum target
*/
@ -179,7 +179,7 @@ class Categorie extends CommonObject
);
/**
* @var array Object table mapping from type string (table llx_...) when value of key does not match table name.
* @var array<string,string> Object table mapping from type string (table llx_...) when value of key does not match table name.
* This array may be completed by external modules with hook "constructCategory"
*/
public $MAP_OBJ_TABLE = array(
@ -287,22 +287,22 @@ class Categorie extends CommonObject
*/
public $imgHeight;
public $fields=array(
"rowid" => array("type"=>"integer", "label"=>"TechnicalID", "enabled"=>"1", 'position'=>10, 'notnull'=>1, "visible"=>"-1",),
"fk_parent" => array("type"=>"integer", "label"=>"Fkparent", "enabled"=>"1", 'position'=>20, 'notnull'=>1, "visible"=>"-1", "css"=>"maxwidth500 widthcentpercentminusxx",),
"label" => array("type"=>"varchar(180)", "label"=>"Label", "enabled"=>"1", 'position'=>25, 'notnull'=>1, "visible"=>"-1", "alwayseditable"=>"1", "css"=>"minwidth300", "cssview"=>"wordbreak", "csslist"=>"tdoverflowmax150",),
"ref_ext" => array("type"=>"varchar(255)", "label"=>"Refext", "enabled"=>"1", 'position'=>30, 'notnull'=>0, "visible"=>"0", "alwayseditable"=>"1",),
"type" => array("type"=>"integer", "label"=>"Type", "enabled"=>"1", 'position'=>35, 'notnull'=>1, "visible"=>"-1", "alwayseditable"=>"1",),
"description" => array("type"=>"text", "label"=>"Description", "enabled"=>"1", 'position'=>40, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
"color" => array("type"=>"varchar(8)", "label"=>"Color", "enabled"=>"1", 'position'=>45, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
"position" => array("type"=>"integer", "label"=>"Position", "enabled"=>"1", 'position'=>50, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
"fk_soc" => array("type"=>"integer:Societe:societe/class/societe.class.php", "label"=>"ThirdParty", "picto"=>"company", "enabled"=>"1", 'position'=>55, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1", "css"=>"maxwidth500 widthcentpercentminusxx", "csslist"=>"tdoverflowmax150",),
"visible" => array("type"=>"integer", "label"=>"Visible", "enabled"=>"1", 'position'=>60, 'notnull'=>1, "visible"=>"-1", "alwayseditable"=>"1",),
"import_key" => array("type"=>"varchar(14)", "label"=>"ImportId", "enabled"=>"1", 'position'=>900, 'notnull'=>0, "visible"=>"-2", "alwayseditable"=>"1",),
"date_creation" => array("type"=>"datetime", "label"=>"Datecreation", "enabled"=>"1", 'position'=>70, 'notnull'=>0, "visible"=>"-1", "alwayseditable"=>"1",),
"tms" => array("type"=>"timestamp", "label"=>"DateModification", "enabled"=>"1", 'position'=>75, 'notnull'=>1, "visible"=>"-1", "alwayseditable"=>"1",),
"fk_user_creat" => array("type"=>"integer:User:user/class/user.class.php", "label"=>"UserAuthor", "enabled"=>"1", 'position'=>80, 'notnull'=>0, "visible"=>"-2", "alwayseditable"=>"1", "css"=>"maxwidth500 widthcentpercentminusxx", "csslist"=>"tdoverflowmax150",),
"fk_user_modif" => array("type"=>"integer:User:user/class/user.class.php", "label"=>"UserModif", "enabled"=>"1", 'position'=>85, 'notnull'=>-1, "visible"=>"-2", "alwayseditable"=>"1", "css"=>"maxwidth500 widthcentpercentminusxx", "csslist"=>"tdoverflowmax150",),
public $fields = array(
"rowid" => array("type" => "integer", "label" => "TechnicalID", "enabled" => "1", 'position' => 10, 'notnull' => 1, "visible" => "-1",),
"fk_parent" => array("type" => "integer", "label" => "Fkparent", "enabled" => "1", 'position' => 20, 'notnull' => 1, "visible" => "-1", "css" => "maxwidth500 widthcentpercentminusxx",),
"label" => array("type" => "varchar(180)", "label" => "Label", "enabled" => "1", 'position' => 25, 'notnull' => 1, "visible" => "-1", "alwayseditable" => "1", "css" => "minwidth300", "cssview" => "wordbreak", "csslist" => "tdoverflowmax150",),
"ref_ext" => array("type" => "varchar(255)", "label" => "Refext", "enabled" => "1", 'position' => 30, 'notnull' => 0, "visible" => "0", "alwayseditable" => "1",),
"type" => array("type" => "integer", "label" => "Type", "enabled" => "1", 'position' => 35, 'notnull' => 1, "visible" => "-1", "alwayseditable" => "1",),
"description" => array("type" => "text", "label" => "Description", "enabled" => "1", 'position' => 40, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
"color" => array("type" => "varchar(8)", "label" => "Color", "enabled" => "1", 'position' => 45, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
"position" => array("type" => "integer", "label" => "Position", "enabled" => "1", 'position' => 50, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
"fk_soc" => array("type" => "integer:Societe:societe/class/societe.class.php", "label" => "ThirdParty", "picto" => "company", "enabled" => "1", 'position' => 55, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1", "css" => "maxwidth500 widthcentpercentminusxx", "csslist" => "tdoverflowmax150",),
"visible" => array("type" => "integer", "label" => "Visible", "enabled" => "1", 'position' => 60, 'notnull' => 1, "visible" => "-1", "alwayseditable" => "1",),
"import_key" => array("type" => "varchar(14)", "label" => "ImportId", "enabled" => "1", 'position' => 900, 'notnull' => 0, "visible" => "-2", "alwayseditable" => "1",),
"date_creation" => array("type" => "datetime", "label" => "Datecreation", "enabled" => "1", 'position' => 70, 'notnull' => 0, "visible" => "-1", "alwayseditable" => "1",),
"tms" => array("type" => "timestamp", "label" => "DateModification", "enabled" => "1", 'position' => 75, 'notnull' => 1, "visible" => "-1", "alwayseditable" => "1",),
"fk_user_creat" => array("type" => "integer:User:user/class/user.class.php", "label" => "UserAuthor", "enabled" => "1", 'position' => 80, 'notnull' => 0, "visible" => "-2", "alwayseditable" => "1", "css" => "maxwidth500 widthcentpercentminusxx", "csslist" => "tdoverflowmax150",),
"fk_user_modif" => array("type" => "integer:User:user/class/user.class.php", "label" => "UserModif", "enabled" => "1", 'position' => 85, 'notnull' => -1, "visible" => "-2", "alwayseditable" => "1", "css" => "maxwidth500 widthcentpercentminusxx", "csslist" => "tdoverflowmax150",),
);
/**

View File

@ -36,12 +36,14 @@ print "<!-- BEGIN PHP TEMPLATE comm/propal/tpl/linkedobjectblock.tpl.php -->\n";
global $user;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
// Load translation files required by the page
$langs->load("propal");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
$total = 0;
$ilink = 0;

View File

@ -30,12 +30,14 @@ global $user;
global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
// Load translation files required by the page
$langs->load("orders");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
$total = 0;
$ilink = 0;

View File

@ -30,6 +30,7 @@ global $user;
global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$langs->load("bills");

View File

@ -32,7 +32,9 @@ global $user;
global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
'@phan-var-force CommonObject[] $linkedObjectBlock';
$langs->load("bills");

View File

@ -31,7 +31,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("contracts");

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2015-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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,6 +47,7 @@ if ($action == 'addlinkbyref' && !empty($permissiondellink) && !$cancellink && $
dol_include_once('/' . $element_prop['classpath'] . '/' . $element_prop['classfile'] . '.class.php');
$objecttmp = new $element_prop['classname']($db);
'@phan-var-force CommonObject $objecttmp';
$ret = $objecttmp->fetch(0, $addlinkref);
if ($ret > 0) {
$object->fetch($id);

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2007-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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,6 +83,7 @@ top_httphead();
$html = '';
if (is_object($object)) {
'@phan-var-force CommonObject $object';
if ($object->id > 0 || !empty($object->ref)) {
/** @var CommonObject $object */
$html = $object->getTooltipContent($params);

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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,6 +79,7 @@ if (!empty($id) && !empty($element) && !empty($htmlelement) && !empty($type)) {
dol_syslog("AjaxSetExtraParameters id=".$id." element=".$element." htmlelement=".$htmlelement." type=".$type." value=".$value, LOG_DEBUG);
if (is_object($object)) {
'@phan-var-force CommonObject $object';
$params[$htmlelement] = array($type => $value);
$object->extraparams = array_merge($object->extraparams, $params);

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2011-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -127,6 +128,7 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e
dol_include_once('/'.$module.'/class/actions_'.$subelement.'.class.php');
$classname = 'Actions'.ucfirst($subelement);
$object = new $classname($db);
'@phan-var-force ActionsMulticompany|ActionsAdherentCardCommon|ActionsContactCardCommon|CommonHookActions|ActionsCardProduct|ActionsCardService|ActionsCardCommon $object';
$ret = $object->$methodname($fk_element);
if ($ret > 0) {
echo json_encode($object->$cachename);

View File

@ -56,6 +56,7 @@ $object = fetchObjectByElement($id, $element);
if (!is_object($object)) {
httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit.
}
'@phan-var-force CommonObject $object';
$object->fields[$field] = array('type' => $format, 'enabled' => 1);

View File

@ -287,6 +287,7 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = 0)
global $dolibarr_main_url_root, $dolibarr_main_data_root;
global $website;
global $includehtmlcontentopened;
'@phan-var-force WebSite $website';
$nbrep = 0;
@ -518,6 +519,7 @@ function dolWebsiteSaveContent($content)
function redirectToContainer($containerref, $containeraliasalt = '', $containerid = 0, $permanent = 0, $parameters = array())
{
global $db, $website;
'@phan-var-force WebSite $website';
$newurl = '';
$result = 0;
@ -602,6 +604,7 @@ function includeContainer($containerref)
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running included containers.
global $includehtmlcontentopened;
global $websitekey, $websitepagefile;
'@phan-var-force WebSite $website';
$MAXLEVEL = 20;
@ -657,6 +660,7 @@ function includeContainer($containerref)
function getStructuredData($type, $data = array())
{
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs; // Very important. Required to have var available when running included containers.
'@phan-var-force WebSite $website';
$type = strtolower($type);
@ -864,6 +868,7 @@ function getStructuredData($type, $data = array())
function getSocialNetworkHeaderCards($params = null)
{
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running included containers.
'@phan-var-force WebSite $website';
$out = '';
@ -939,6 +944,7 @@ function getSocialNetworkHeaderCards($params = null)
function getSocialNetworkSharingLinks($socialnetworks = '')
{
global $website, $websitepage; // Very important. Required to have var available when running included containers.
'@phan-var-force WebSite $website';
$out = '<!-- section for social network sharing of page -->'."\n";
@ -1166,6 +1172,7 @@ function getPublicFilesOfObject($object)
function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '', $otherfilters = [], $status = 1)
{
global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running included containers.
'@phan-var-force WebSite $website';
$error = 0;
$arrayresult = array('code' => '', 'list' => array());

View File

@ -74,6 +74,14 @@ abstract class ModeleBarCode
{
return -1; // Error by default, this method must be implemented by the driver
}
/**
* Return true if encoding is supported
*
* @param string $encoding Encoding norm
* @return int >0 if supported, 0 if not
*/
abstract public function encodingIsSupported($encoding);
}

View File

@ -150,6 +150,7 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
require_once $dir.$file;
$obj = new $classname($db);
'@phan-var-force ModeleChequeReceipts $obj';
// We save charset_output to restore it because write_file can change it if needed for
// output format that does not support UTF8.

View File

@ -137,6 +137,7 @@ if (GETPOST('code')) { // We are coming from oauth provider page
if ($apiService === null) {
dol_syslog("No API Service", LOG_ERR);
} else {
'@phan-var-force OAuth\OAuth2\Service\AbstractService|OAuth\OAuth1\Service\AbstractService $apiService';
try {
//var_dump($state);
//var_dump($apiService); // OAuth\OAuth2\Service\Stripe

View File

@ -163,4 +163,19 @@ class PrintingDriver
$this->errors[] = $msg;
return 1;
}
/**
* List jobs print
*
* @param ?string $module module
*
* @return int 0 if OK, >0 if KO
*/
public function listJobs($module = null)
{
$msg = get_class($this)."::".__FUNCTION__." not implemented";
dol_syslog($msg, LOG_ERR);
$this->errors[] = $msg;
return 1;
}
}

View File

@ -436,9 +436,11 @@ class printing_printgcp extends PrintingDriver
/**
* List jobs print
*
* @param ?string $module module
*
* @return int 0 if OK, >0 if KO
*/
public function listJobs()
public function listJobs($module = null)
{
global $conf, $langs;

View File

@ -285,11 +285,11 @@ class printing_printipp extends PrintingDriver
/**
* List jobs print
*
* @param string $module module
* @param ?string $module module
*
* @return int 0 if OK, >0 if KO
*/
public function listJobs($module)
public function listJobs($module = null)
{
global $conf;
$error = 0;
@ -304,7 +304,7 @@ class printing_printipp extends PrintingDriver
$ipp->setAuthentication($this->user, $this->password);
}
// select printer uri for module order, propal,...
$sql = "SELECT rowid,printer_uri,printer_name FROM ".MAIN_DB_PREFIX."printer_ipp WHERE module = '".$this->db->escape($module)."'";
$sql = "SELECT rowid,printer_uri,printer_name FROM ".MAIN_DB_PREFIX."printer_ipp WHERE module = '".$this->db->escape((string) $module)."'";
$result = $this->db->query($sql);
if ($result) {
$obj = $this->db->fetch_object($result);

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -22,6 +23,8 @@
* $form
*/
'@phan-var-force FormAdmin $formAdmin';
// Protection to avoid direct call of template
if (empty($conf) || !is_object($conf)) {
print "Error, template page can't be called as URL";

View File

@ -41,6 +41,8 @@ if (empty($module)) {
$module = 'ecm';
}
'@phan-var-force WebSite $website';
$permtoadd = 0;
$permtoupload = 0;
$showroot = 0;

View File

@ -71,10 +71,10 @@ class InterfaceActionsAuto extends DolibarrTriggers
* $object->module (if defined, elementtype in llx_actioncomm will be elementtype@module)
*
* @param string $action Event action code ('CONTRACT_MODIFY', 'RECRUITMENTCANDIDATURE_MODIFIY', or example by external module: 'SENTBYSMS'...)
* @param Object $object Object
* @param CommonObject $object Object
* @param User $user Object user
* @param Translate $langs Object langs
* @param conf $conf Object conf
* @param Conf $conf Object conf
* @return int Return integer <0 if KO, 0 if no triggered ran, >0 if OK
*/
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
@ -119,7 +119,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("NewCompanyToDolibarr", $object->name);
}
$object->sendtoid = 0;
$object->sendtoid = array();
$object->socid = $object->id;
} elseif ($action == 'COMPANY_MODIFY') {
// Load translation files required by the page
@ -141,7 +141,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = dol_concatdesc($object->actionmsg, $langs->trans("DataFromWasMerged", $object->context['mergefromname'].' (id='.$object->context['mergefromname'].')'));
}
$object->sendtoid = 0;
$object->sendtoid = array();
$object->socid = $object->id;
} elseif ($action == 'COMPANY_SENTBYMAIL') {
// Load translation files required by the page
@ -156,7 +156,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'CONTACT_CREATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "companies"));
@ -206,7 +206,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("ContractValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'CONTRACT_SENTBYMAIL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "contracts"));
@ -223,7 +223,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'PROPAL_VALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -239,7 +239,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("PropalValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROPAL_MODIFY') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -255,7 +255,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("PropalBackToDraftInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROPAL_SENTBYMAIL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -272,7 +272,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'PROPAL_CLOSE_SIGNED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -288,7 +288,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROPAL_CLASSIFY_BILLED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -304,7 +304,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("PropalClassifiedBilledInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROPAL_CLOSE_REFUSED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -320,7 +320,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_VALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "orders"));
@ -336,7 +336,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("OrderValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_CLOSE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -352,7 +352,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("OrderDeliveredInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_CLASSIFY_BILLED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -368,7 +368,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("OrderBilledInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_CANCEL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -384,7 +384,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("OrderCanceledInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SENTBYMAIL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -401,7 +401,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'BILL_VALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -417,7 +417,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'BILL_UNVALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -433,7 +433,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'BILL_SENTBYMAIL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -450,7 +450,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'BILL_PAYED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -467,7 +467,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InvoicePaidInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'BILL_CANCEL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -483,7 +483,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'FICHINTER_CREATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "interventions"));
@ -499,7 +499,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InterventionCreatedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
$object->fk_element = 0;
$object->elementtype = '';
} elseif ($action == 'FICHINTER_VALIDATE') {
@ -517,7 +517,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InterventionValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
$object->fk_element = 0;
$object->elementtype = '';
} elseif ($action == 'FICHINTER_MODIFY') {
@ -535,7 +535,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InterventionModifiedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
$object->fk_element = 0;
$object->elementtype = '';
} elseif ($action == 'FICHINTER_SENTBYMAIL') {
@ -554,7 +554,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'FICHINTER_CLASSIFY_BILLED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "interventions"));
@ -570,7 +570,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InterventionClassifiedBilledInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'FICHINTER_CLASSIFY_UNBILLED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "interventions"));
@ -586,7 +586,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InterventionClassifiedUnbilledInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'FICHINTER_CLOSE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "interventions"));
@ -602,7 +602,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InterventionClosedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
$object->fk_element = 0;
$object->elementtype = '';
} elseif ($action == 'FICHINTER_DELETE') {
@ -620,7 +620,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InterventionDeletedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
$object->fk_element = 0;
$object->elementtype = '';
} elseif ($action == 'SHIPPING_VALIDATE') {
@ -639,7 +639,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'SHIPPING_SENTBYMAIL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "sendings"));
@ -656,7 +656,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'RECEPTION_VALIDATE') {
$langs->load("agenda");
$langs->load("other");
@ -674,7 +674,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'RECEPTION_SENTBYMAIL') {
$langs->load("agenda");
$langs->load("other");
@ -692,7 +692,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'PROPOSAL_SUPPLIER_VALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -708,7 +708,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("PropalValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROPOSAL_SUPPLIER_SENTBYMAIL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -725,7 +725,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'PROPOSAL_SUPPLIER_CLOSE_SIGNED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -741,7 +741,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("PropalClosedSignedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROPOSAL_SUPPLIER_CLOSE_REFUSED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "propal"));
@ -757,8 +757,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("PropalClosedRefusedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_CREATE') {
'@phan-var-force CommandeFournisseur $object';
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -773,7 +774,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("OrderCreatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_VALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -789,8 +790,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("OrderValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_APPROVE') {
'@phan-var-force CommandeFournisseur $object';
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -805,8 +807,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("OrderApprovedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_REFUSE') {
'@phan-var-force CommandeFournisseur $object';
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders", "main"));
@ -826,8 +829,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= $langs->trans("Reason") . ': '.$object->refuse_note;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_CANCEL') {
'@phan-var-force CommandeFournisseur $object';
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders", "main"));
@ -847,7 +851,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= $langs->trans("Reason") . ': '.$object->cancel_note;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_SUBMIT') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -868,8 +872,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= $langs->trans("Comment") . ': '.$object->context['comments'];
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_RECEIVE') {
'@phan-var-force CommandeFournisseur $object';
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "orders"));
@ -884,8 +889,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("SupplierOrderReceivedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_SENTBYMAIL') {
'@phan-var-force CommandeFournisseur $object';
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills", "orders"));
@ -901,8 +907,9 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'ORDER_SUPPLIER_CLASSIFY_BILLED') {
'@phan-var-force CommandeFournisseur $object';
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills", "orders"));
@ -917,7 +924,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("SupplierOrderClassifiedBilled", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'BILL_SUPPLIER_VALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -933,7 +940,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InvoiceValidatedInDolibarr", ($object->newref ? $object->newref : $object->ref));
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'BILL_SUPPLIER_UNVALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -949,7 +956,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'BILL_SUPPLIER_SENTBYMAIL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills", "orders"));
@ -966,7 +973,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'BILL_SUPPLIER_PAYED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -982,7 +989,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InvoicePaidInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'BILL_SUPPLIER_CANCELED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "bills"));
@ -998,7 +1005,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("InvoiceCanceledInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'MEMBER_VALIDATE') {
// Members
// Load translation files required by the page
@ -1017,7 +1024,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'MEMBER_MODIFY') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "members"));
@ -1035,7 +1042,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'MEMBER_SUBSCRIPTION_CREATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "members"));
@ -1063,7 +1070,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day');
}
$object->sendtoid = 0;
$object->sendtoid = array();
if (isset($object->fk_soc) && $object->fk_soc > 0) {
$object->socid = $object->fk_soc;
}
@ -1093,7 +1100,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day');
}
$object->sendtoid = 0;
$object->sendtoid = array();
if (isset($object->fk_soc) && $object->fk_soc > 0) {
$object->socid = $object->fk_soc;
}
@ -1124,7 +1131,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Period").': '.dol_print_date($object->dateh, 'day').' - '.dol_print_date($object->datef, 'day');
}
$object->sendtoid = 0;
$object->sendtoid = array();
if (isset($object->fk_soc) && $object->fk_soc > 0) {
$object->socid = $object->fk_soc;
}
@ -1145,7 +1152,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'MEMBER_DELETE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "members"));
@ -1163,7 +1170,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'MEMBER_EXCLUDE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "members"));
@ -1181,7 +1188,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Type").': '.$object->type;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROJECT_CREATE') {
// Projects
// Load translation files required by the page
@ -1199,7 +1206,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Project").': '.$object->ref;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROJECT_VALIDATE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "projects"));
@ -1216,7 +1223,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Project").': '.$object->ref;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROJECT_MODIFY') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "projects"));
@ -1237,7 +1244,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentitiesnoconv("OpportunityStatus").': '.$object->oldcopy->opp_status.' -> '.$object->opp_status;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROJECT_SENTBYMAIL') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "projects"));
@ -1254,7 +1261,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
// Parameters $object->sendtoid defined by caller
//$object->sendtoid=0;
//$object->sendtoid = array();
} elseif ($action == 'PROJECT_DELETE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "projects"));
@ -1264,7 +1271,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
$object->actionmsg = $langs->transnoentities("ProjectDeletedInDolibarr", $object->ref);
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'PROJECT_CLOSE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "projects"));
@ -1280,7 +1287,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg = $langs->transnoentities("ProjectClosedInDolibarr", $object->ref);
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'TASK_CREATE') {
// Project tasks
// Load translation files required by the page
@ -1298,7 +1305,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'TASK_MODIFY') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "projects"));
@ -1315,7 +1322,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'TASK_DELETE') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "projects"));
@ -1332,7 +1339,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("Task").': '.$object->ref;
}
$object->sendtoid = 0;
$object->sendtoid = array();
} elseif ($action == 'TICKET_ASSIGNED') {
// Load translation files required by the page
$langs->loadLangs(array("agenda", "other", "projects"));
@ -1363,7 +1370,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
$object->actionmsg .= "\n".$langs->transnoentities("NewUser").': '.$langs->trans("None");
}
$object->sendtoid = 0;
$object->sendtoid = array();
} else {
// TODO Merge all previous cases into this generic one
// $action = PASSWORD, BILL_DELETE, TICKET_CREATE, TICKET_MODIFY, TICKET_DELETE, CONTACT_SENTBYMAIL, RECRUITMENTCANDIDATURE_MODIFY, ...
@ -1413,7 +1420,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
}
if (!isset($object->sendtoid) || !is_array($object->sendtoid)) {
$object->sendtoid = 0;
$object->sendtoid = array();
}
}

View File

@ -52,10 +52,10 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
* All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared)
*
* @param string $action Event action code
* @param Object $object Object
* @param CommonObject $object Object
* @param User $user Object user
* @param Translate $langs Object langs
* @param conf $conf Object conf
* @param Conf $conf Object conf
* @return int Return integer <0 if KO, 0 if no triggered ran, >0 if OK
*/
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)

View File

@ -58,12 +58,12 @@ class InterfaceContactRoles extends DolibarrTriggers
* $object->socid or $object->fk_soc(id of thirdparty)
* $object->element (element type of object)
*
* @param string $action Event action code
* @param Object $object Object
* @param User $user Object user
* @param Translate $langs Object langs
* @param conf $conf Object conf
* @return int Return integer <0 if KO, 0 if no triggered ran, >0 if OK
* @param string $action Event action code
* @param CommonObject $object Object
* @param User $user Object user
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @return int Return integer <0 if KO, 0 if no triggered ran, >0 if OK
*/
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
{

View File

@ -30,12 +30,15 @@ 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('sendings');
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
$total = 0;
$ilink = 0;

View File

@ -2,6 +2,7 @@
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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,9 @@ echo "<!-- BEGIN PHP TEMPLATE eventorganization/tpl/linkedobjectblock.tpl.php --
global $user;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
'@phan-var-force CommonObject[] $linkedObjectBlock';
$langs->load("eventorganization");
$total = 0;
@ -37,19 +40,19 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
echo '<td>' . $langs->trans(get_class($objectlink)) . '</td>';
echo '<td>'.$objectlink->getNomUrl(1).'</td>';
echo '<td class="center">';
if (get_class($objectlink)=='ConferenceOrBooth') {
if (get_class($objectlink) == 'ConferenceOrBooth') {
print dol_trunc($objectlink->label, 20);
}
print '</td>';
echo '<td class="center">';
if (get_class($objectlink)=='ConferenceOrBoothAttendee') {
if (get_class($objectlink) == 'ConferenceOrBoothAttendee') {
print dol_print_date($objectlink->date_subscription);
} else {
print dol_print_date($objectlink->datep);
}
print '</td>';
echo '<td class="right">';
if (get_class($objectlink)=='ConferenceOrBoothAttendee') {
if (get_class($objectlink) == 'ConferenceOrBoothAttendee') {
print price($objectlink->amount);
}
print '</td>';

View File

@ -30,7 +30,9 @@ print "<!-- BEGIN PHP TEMPLATE expedition/tpl/linkedobjectblock.tpl.php -->\n";
global $user;
$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("sendings");

View File

@ -31,7 +31,9 @@ print "<!-- BEGIN PHP TEMPLATE expensereport/tpl/linkedobjectblock.tpl.php -->\n
global $user;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
'@phan-var-force CommonObject[] $linkedObjectBlock';
$var = true;
$total = 0;

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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,11 +29,14 @@ print "<!-- BEGIN PHP TEMPLATE fichinter/tpl/linkedobjectblock.tpl.php -->\n";
global $user;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
'@phan-var-force CommonObject[] $linkedObjectBlock';
$langs->load("interventions");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
$ilink = 0;
foreach ($linkedObjectBlock as $key => $objectlink) {

View File

@ -31,7 +31,9 @@ global $user;
global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
'@phan-var-force CommonObject[] $linkedObjectBlock';
$langs->load("orders");

View File

@ -33,6 +33,7 @@ global $user;
global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$langs->load("bills");

View File

@ -3,6 +3,7 @@
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2013-2020 Charlene BENKE <charlie@patas-monkey.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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,6 +31,7 @@ global $user, $db, $hookmanager;
global $noMoreLinkedObjectBlockAfter;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
$object = $GLOBALS['object'];

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -59,6 +60,7 @@ foreach ($result as $driver) {
$classname = 'printing_'.$driver;
$langs->load($driver);
$printer = new $classname($db);
'@phan-var-force PrintingDriver $printer';
$keyforprinteractive = $printer->active;
if ($keyforprinteractive && getDolGlobalString($keyforprinteractive)) {
//$printer->listJobs('commande');

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2015 Ion Agorria <ion@agorria.com>
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -251,7 +252,7 @@ if ($action != 'create_variable' && $action != 'edit_variable') {
print '</tr>';
$arraypriceupdaters = $price_updaters->listUpdaters();
if (!empty($arraypriceupdaters)) {
if (!empty($arraypriceupdaters) && is_array($arraypriceupdaters)) {
foreach ($arraypriceupdaters as $i => $entry) {
$code = "";
if ($entry->fk_variable > 0) {

View File

@ -432,6 +432,7 @@ foreach ($dirmodels as $reldir) {
require_once $dir.'/'.$file;
$module = new $classname($db);
'@phan-var-force ModelePDFProduct $module';
$modulequalified = 1;
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
@ -446,7 +447,7 @@ foreach ($dirmodels as $reldir) {
print(empty($module->name) ? $name : $module->name);
print "</td><td>\n";
if (method_exists($module, 'info')) {
print $module->info($langs);
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
} else {
print $module->description;
}

View File

@ -374,7 +374,7 @@ class PriceGlobalVariableUpdater
/**
* List all price global variables
*
* @return array|int Array of price global variable updaters
* @return PriceGlobalVariableUpdater[]|int<-1,-1> Array of price global variable updaters
*/
public function listUpdaters()
{
@ -411,7 +411,7 @@ class PriceGlobalVariableUpdater
/**
* List all updaters which need to be processed
*
* @return array|int Array of price global variable updaters
* @return PriceGlobalVariableUpdater[]|int<-1,-1> Array of price global variable updaters
*/
public function listPendingUpdaters()
{

View File

@ -3,6 +3,7 @@
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 Charlene Benke <charlene@patas-monkey.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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,14 +34,18 @@ 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("tasks");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
$total = 0; $ilink = 0;
$total = 0;
$ilink = 0;
foreach ($linkedObjectBlock as $key => $objectlink) {
$ilink++;

View File

@ -1,10 +1,13 @@
<!-- file errors.tpl.php -->
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*/
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit(1);
}
'@phan-var-force Context $context';
print '
<div class="modal fade" id="webportal_errors" tabindex="-1" role="dialog" aria-labelledby="webportal_errors_title" aria-hidden="true">

View File

@ -1,10 +1,13 @@
<!-- file footer.tpl.php -->
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*/
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit(1);
}
'@phan-var-force Context $context';
global $langs;

View File

@ -1,10 +1,13 @@
<!-- file home.tpl.php -->
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*/
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit(1);
}
'@phan-var-force Context $context';
global $conf, $langs;

View File

@ -1,10 +1,13 @@
<!-- file login.tpl.php -->
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*/
// Protection to avoid direct call of template
if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit(1);
}
'@phan-var-force Context $context';
?>
<div class="login-page__container">

View File

@ -1,6 +1,7 @@
<!-- file menu.tpl.php -->
<?php
/* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -22,6 +23,7 @@ if (empty($context) || !is_object($context)) {
print "Error, template page can't be called as URL";
exit(1);
}
'@phan-var-force Context $context';
global $conf, $hookmanager, $langs;
@ -209,7 +211,7 @@ if (empty($reshook)) {
</ul>
<ul class="menu-entries-alt">
<?php
// show menu
// show menu
print '<li data-deep="0" class="--item-propal-list nav-item "><a href="'.$context->getControllerUrl().'">'.$langs->trans("Menu").'...</a></li>';
?>
</ul>

View File

@ -34,12 +34,15 @@ 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("receptions");
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
$total = 0;
$ilink = 0;

View File

@ -427,6 +427,7 @@ foreach ($dirsociete as $dirroot) {
}
$arrayofmodules = dol_sort_array($arrayofmodules, 'position');
'@phan-var-force array<string,ModeleThirdPartyCode> $arrayofmodules'; // Repeat type because of dol_sort_array
foreach ($arrayofmodules as $file => $modCodeTiers) {
print '<tr class="oddeven">'."\n";
@ -506,6 +507,7 @@ foreach ($dirsociete as $dirroot) {
}
$arrayofmodules = dol_sort_array($arrayofmodules, 'position');
'@phan-var-force array<string,ModeleAccountancyCode> $arrayofmodules';
foreach ($arrayofmodules as $file => $modCodeCompta) {
@ -588,6 +590,7 @@ foreach ($dirsociete as $dirroot) {
}
$module = new $classname($db);
'@phan-var-force ModeleThirdPartyDoc $module';
$modulequalified = 1;
if (!empty($module->version)) {
@ -603,7 +606,7 @@ foreach ($dirsociete as $dirroot) {
print dol_escape_htmltag($module->name);
print "</td><td>\n";
if (method_exists($module, 'info')) {
print $module->info($langs);
print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
} else {
print $module->description;
}

View File

@ -31,7 +31,9 @@ print "<!-- BEGIN PHP TEMPLATE LINKEDOBJECTBOCK-->\n";
global $user;
$langs = $GLOBALS['langs'];
'@phan-var-force Translate $langs';
$linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
'@phan-var-force CommonObject[] $linkedObjectBlock';
$total = 0;
$ilink = 0;

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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,12 +29,15 @@ 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('ticket');
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'datec', 'desc', 0, 0, 1);
'@phan-var-force CommonObject[] $linkedObjectBlock'; // Repeat because type lost after dol_sort_array)
$total = 0;
$ilink = 0;

View File

@ -5,6 +5,7 @@
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2017 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -158,6 +159,7 @@ if ($object->id > 0) {
if ($modName) {
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) {

View File

@ -174,6 +174,7 @@ foreach ($modulesdir as $dir) {
if ($modName) {
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)) {

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* 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
@ -106,10 +107,10 @@ if ($action == "getjsonformtrigger") {
$json->object = $obj;
} else {
$objnotfound ++;
$objnotfound++;
}
} else {
$objnotfound ++;
$objnotfound++;
}
if ($objnotfound) {
@ -129,13 +130,14 @@ if ($action == "getjsonformtrigger") {
* Find and init a specimen for the given object type
*
* @param string $objecttype Object type to init as a specimen
* @return object|false
* @return CommonObject|false
*/
function findobjecttosend($objecttype)
{
dol_syslog("Ajax webhook: We fetch object of type = ".$objecttype." and we init it as specimen");
$obj = fetchObjectByElement(0, dol_strtolower($objecttype));
if (is_object($obj)) {
'@phan-var-force CommonObject $obj';
$obj->initAsSpecimen();
} else {
return false;

View File

@ -1522,6 +1522,7 @@ class Website extends CommonObject
public function componentSelectLang($languagecodes, $weblangs, $morecss = '', $htmlname = '')
{
global $websitepagefile, $website;
'@phan-var-force WebSite $website';
if (!is_object($weblangs)) {
return 'ERROR componentSelectLang called with parameter $weblangs not defined';