From d71cd352d544379355890461e5245a09e9c39c03 Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 19 Aug 2024 02:05:27 +0200 Subject: [PATCH] Qual: Fix PhanUndeclaredMethod (#30661) * Qual: Fix PhanUndeclaredMethod cases * Fix PhanUndeclaredMethod cases * Qual: Remove PhanUndeclaredMethod exceptions * Fix spelling "disacard" * Improve phpdoc, add abstract method to trait for typing * Improve phpdoc typing for PHanUndeclaredMethod * Suppress phan notices for guarded AliasNbPages calls * Fix return value for printFile stub * Fix getting message from Exception * Define dummy getAllByProducts(), typing for it. * Fix typo in comment * Qual: Better typing for apiService (phan) * Test that the Generic OAuth Service is provided * Qual: Fix getSqlArrayForStats typing * Force modTcpdfbarcode * Correct typing hint * Set ModelePDFAsset typehint * Fix ModelePDFUserGroup typing hint * Fix phan typing hints htdocs/core/modules/printing/printgcp.modules.php * Fix write_file in ModelePDFStock* * Update printsheet.php * Adjust typing hint for barcode generator * Update printsheet.php --------- Co-authored-by: Laurent Destailleur --- dev/tools/phan/baseline.txt | 324 +++++++----------- dev/tools/phan/config.php | 2 +- htdocs/adherents/class/adherent.class.php | 10 +- htdocs/admin/emailcollector_card.php | 3 +- htdocs/admin/modules.php | 4 +- htdocs/admin/stock.php | 4 +- htdocs/admin/ticket.php | 4 +- htdocs/admin/user.php | 4 +- htdocs/admin/usergroup.php | 4 +- htdocs/asset/admin/setup.php | 8 +- htdocs/barcode/printsheet.php | 5 +- .../comm/propal/class/propalestats.class.php | 8 +- htdocs/contrat/class/contrat.class.php | 6 +- htdocs/core/class/CMailFile.class.php | 4 +- htdocs/core/class/commonpeople.class.php | 65 +++- htdocs/core/class/dolreceiptprinter.class.php | 10 +- htdocs/core/class/stats.class.php | 19 +- htdocs/core/class/vcard.class.php | 5 +- .../action/doc/pdf_standard_actions.class.php | 2 +- .../asset/doc/pdf_standard_asset.modules.php | 2 +- .../core/modules/asset/mod_asset_advanced.php | 2 +- .../core/modules/asset/mod_asset_standard.php | 2 +- htdocs/core/modules/asset/modules_asset.php | 2 +- .../core/modules/bank/doc/pdf_ban.modules.php | 2 +- .../bank/doc/pdf_sepamandate.modules.php | 2 +- .../modules/cheque/doc/pdf_blochet.class.php | 2 +- .../modules/cheque/mod_chequereceipt_mint.php | 6 +- .../cheque/mod_chequereceipt_thyme.php | 6 +- .../modules/cheque/modules_chequereceipts.php | 14 +- .../commande/doc/pdf_einstein.modules.php | 2 +- .../commande/doc/pdf_eratosthene.modules.php | 2 +- .../contract/doc/pdf_strato.modules.php | 2 +- .../modules/contract/modules_contract.php | 2 +- .../delivery/doc/pdf_storm.modules.php | 2 +- .../delivery/doc/pdf_typhon.modules.php | 4 +- .../expedition/doc/pdf_espadon.modules.php | 4 +- .../expedition/doc/pdf_merou.modules.php | 4 +- .../expedition/doc/pdf_rouget.modules.php | 4 +- .../pdf_standard_expensereport.modules.php | 2 +- .../modules/facture/doc/pdf_crabe.modules.php | 2 +- .../facture/doc/pdf_octopus.modules.php | 2 +- .../facture/doc/pdf_sponge.modules.php | 2 +- .../fichinter/doc/pdf_soleil.modules.php | 2 +- .../doc/pdf_standard_evaluation.modules.php | 2 +- .../mailings/advthirdparties.modules.php | 5 +- .../mailings/eventorganization.modules.php | 3 +- .../modules/mailings/modules_mailings.php | 17 + .../modules/mailings/partnership.modules.php | 3 +- .../modules/mailings/thirdparties.modules.php | 3 +- .../thirdparties_services_expired.modules.php | 3 +- .../modules/mailings/xinputfile.modules.php | 2 +- .../modules/mailings/xinputuser.modules.php | 2 +- .../pdf_standard_movementstock.modules.php | 2 +- .../modules/mrp/doc/pdf_vinci.modules.php | 2 +- .../modules/oauth/generic_oauthcallback.php | 10 +- .../modules/oauth/github_oauthcallback.php | 2 + .../modules/oauth/google_oauthcallback.php | 4 +- .../oauth/microsoft2_oauthcallback.php | 2 + .../modules/oauth/microsoft_oauthcallback.php | 2 + .../core/modules/payment/mod_payment_ant.php | 2 +- .../modules/payment/mod_payment_cicada.php | 6 +- .../core/modules/payment/modules_payment.php | 10 +- .../modules/printing/modules_printing.php | 16 + .../modules/printing/printgcp.modules.php | 4 + .../product/doc/pdf_standard.modules.php | 2 +- .../project/doc/pdf_baleine.modules.php | 2 +- .../project/doc/pdf_beluga.modules.php | 2 +- .../project/doc/pdf_timespent.modules.php | 2 +- .../modules/propale/doc/pdf_azur.modules.php | 2 +- .../modules/propale/doc/pdf_cyan.modules.php | 2 +- .../modules/rapport/pdf_paiement.class.php | 2 +- .../reception/doc/pdf_squille.modules.php | 4 +- .../doc/doc_generic_stock_odt.modules.php | 10 +- .../stock/doc/pdf_standard_stock.modules.php | 12 +- htdocs/core/modules/stock/modules_stock.php | 22 +- .../stocktransfer/doc/pdf_eagle.modules.php | 12 +- .../doc/pdf_eagle_proforma.modules.php | 18 +- .../stocktransfer/modules_stocktransfer.php | 21 +- .../doc/pdf_canelle.modules.php | 2 +- .../supplier_order/doc/pdf_cornas.modules.php | 2 +- .../doc/pdf_muscadet.modules.php | 2 +- .../pdf_standard_supplierpayment.modules.php | 2 +- .../doc/pdf_aurore.modules.php | 2 +- .../doc/pdf_zenith.modules.php | 2 +- .../mod_supplier_proposal_marbre.php | 4 +- .../mod_supplier_proposal_saphir.php | 4 +- .../modules_supplier_proposal.php | 10 +- .../interface_80_modStripe_Stripe.class.php | 2 +- .../class/emailcollector.class.php | 1 + .../fichinter/class/fichinterstats.class.php | 9 +- .../mailing_mymodule_selector1.modules.php | 2 +- htdocs/public/payment/paymentko.php | 3 +- ...tandard_recruitmentjobposition.modules.php | 2 +- .../mod_recruitmentcandidature_advanced.php | 4 +- .../mod_recruitmentcandidature_standard.php | 4 +- .../modules_recruitmentcandidature.php | 15 +- 96 files changed, 480 insertions(+), 374 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 889cbf81fb3..77a3ee0d4b6 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,14 +9,14 @@ */ return [ // # Issue statistics: - // PhanPluginUnknownPropertyType : 1780+ occurrences - // PhanPossiblyUndeclaredGlobalVariable : 1340+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 1150+ occurrences - // PhanUndeclaredProperty : 920+ occurrences - // PhanPluginUnknownObjectMethodCall : 760+ occurrences - // PhanPluginUnknownArrayMethodParamType : 730+ occurrences + // PhanPluginUnknownPropertyType : 1790+ occurrences + // PhanPossiblyUndeclaredGlobalVariable : 1310+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 1090+ occurrences + // PhanUndeclaredProperty : 810+ occurrences + // PhanPluginUnknownObjectMethodCall : 750+ occurrences // PhanUndeclaredGlobalVariable : 720+ occurrences - // PhanPluginUnknownArrayMethodReturnType : 540+ occurrences + // PhanPluginUnknownArrayMethodParamType : 620+ occurrences + // PhanPluginUnknownArrayMethodReturnType : 530+ occurrences // PhanPossiblyUndeclaredVariable : 360+ occurrences // PhanTypeMismatchProperty : 240+ occurrences // PhanPluginUnknownArrayFunctionReturnType : 230+ occurrences @@ -24,11 +24,10 @@ return [ // PhanTypeExpectedObjectPropAccess : 150+ occurrences // PhanTypeMismatchArgumentNullableInternal : 150+ occurrences // PhanPluginUnknownArrayPropertyType : 110+ occurrences - // PhanUndeclaredMethod : 95+ occurrences // PhanPluginUndeclaredVariableIsset : 70+ occurrences // PhanPluginEmptyStatementIf : 65+ occurrences // PhanRedefineFunction : 55+ occurrences - // PhanTypeMismatchDimFetch : 50+ occurrences + // PhanTypeMismatchDimFetch : 45+ occurrences // PhanTypeSuspiciousNonTraversableForeach : 45+ occurrences // PhanPossiblyNullTypeMismatchProperty : 20+ occurrences // PhanEmptyForeach : 15+ occurrences @@ -40,13 +39,12 @@ return [ // PhanPluginDuplicateExpressionBinaryOp : 10+ occurrences // PhanPluginSuspiciousParamPosition : 10+ occurrences // PhanTypeMismatchDimFetchNullable : 10+ occurrences - // PhanTypeMismatchPropertyProbablyReal : 6 occurrences // PhanInvalidFQSENInClasslike : 4 occurrences // PhanPluginDuplicateArrayKey : 4 occurrences // PhanEmptyFQSENInClasslike : 3 occurrences + // PhanUndeclaredMethod : 3 occurrences // PhanParamTooMany : 2 occurrences // PhanAccessMethodProtected : 1 occurrence - // PhanAccessPropertyStaticAsNonStatic : 1 occurrence // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ @@ -70,7 +68,6 @@ return [ 'htdocs/accountancy/supplier/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/accountancy/tpl/export_journal.tpl.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/adherents/admin/member.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/adherents/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => [/* Traverses Adherent as array, ignore */ 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/adherents/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/adherents/class/adherent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], @@ -94,7 +91,7 @@ return [ 'htdocs/admin/bankline_extrafields.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/barcode.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/admin/bom.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/chequereceipts.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], + 'htdocs/admin/chequereceipts.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/company.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/contract.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/delais.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetch'], @@ -102,7 +99,6 @@ return [ 'htdocs/admin/dict.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/admin/ecm.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/emailcollector_card.php' => ['PhanUndeclaredMethod'], 'htdocs/admin/emailcollector_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/expensereport.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/expensereport_rules.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -114,7 +110,6 @@ return [ 'htdocs/admin/ihm.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/invoice.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/invoice_situation.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/admin/knowledgemanagement.php' => [/* write_file, ignored: */ 'PhanUndeclaredMethod'], 'htdocs/admin/ldap_groups.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/ldap_users.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/admin/loan.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -125,24 +120,21 @@ return [ 'htdocs/admin/menus.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/menus/edit.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/modulehelp.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/admin/modules.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], + 'htdocs/admin/modules.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/admin/mrp.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/mrp_extrafields.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/multicurrency.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/admin/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], + 'htdocs/admin/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/pdf.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/propal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/receiptprinter.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable'], - 'htdocs/admin/reception_setup.php' => [/* write_file, ignored: */ 'PhanUndeclaredMethod', /* Real bug scandir, ignored: */ 'PhanUndeclaredProperty'], 'htdocs/admin/security.php' => ['PhanUndeclaredProperty'], 'htdocs/admin/security_file.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/spip.php' => ['PhanTypeMismatchDimFetch'], - 'htdocs/admin/stock.php' => ['PhanUndeclaredMethod'], - 'htdocs/admin/stocktransfer.php' => ['PhanUndeclaredMethod'], 'htdocs/admin/supplier_invoice.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/supplier_order.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/supplier_payment.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', /* Actual issue: scandir access */ 'PhanUndeclaredProperty'], - 'htdocs/admin/supplier_proposal.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], + 'htdocs/admin/supplier_payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/admin/supplier_proposal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/syslog.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/admin/system/constall.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/system/database-tables.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -152,12 +144,10 @@ return [ 'htdocs/admin/system/phpinfo.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/admin/system/security.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/taxes.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/admin/ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], + 'htdocs/admin/ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/tools/export_files.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/admin/tools/listsessions.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/translation.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/admin/user.php' => ['PhanUndeclaredMethod'], - 'htdocs/admin/usergroup.php' => ['PhanUndeclaredMethod'], 'htdocs/admin/webhook.php' => ['PhanEmptyForeach'], 'htdocs/admin/website.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/admin/workstation.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], @@ -168,8 +158,7 @@ return [ 'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/api/class/api_setup.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/asset/admin/setup.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], - 'htdocs/asset/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/asset/admin/setup.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/class/assetaccountancycodes.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], @@ -185,13 +174,12 @@ return [ 'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/asterisk/wrapper.php' => ['PhanRedefineFunction'], 'htdocs/barcode/codeinit.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/blockedlog/admin/blockedlog_list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/blockedlog/ajax/block-info.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/blockedlog/ajax/check_signature.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/blockedlog/class/blockedlog.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/blockedlog/lib/blockedlog.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/bom/bom_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bom/bom_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/bom/bom_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/bom/bom_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -208,8 +196,8 @@ return [ 'htdocs/bookcal/calendar_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/calendar_document.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/bookcal/calendar_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/bookcal/class/availabilities.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchProperty', /* Missing getNextValue class, ignored */ 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/bookcal/class/calendar.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchProperty', /* Missing getNextValue class, ignored */ 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/bookcal/class/availabilities.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', /* Missing getNextValue class, ignored */ 'PhanUndeclaredProperty'], + 'htdocs/bookcal/class/calendar.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', /* Missing getNextValue class, ignored */ 'PhanUndeclaredProperty'], 'htdocs/bookcal/lib/bookcal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bookcal/lib/bookcal_availabilities.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -244,8 +232,7 @@ return [ 'htdocs/comm/mailing/class/advtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], - 'htdocs/comm/mailing/index.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/comm/propal/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'], 'htdocs/comm/propal/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/propal/class/propal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], @@ -253,7 +240,6 @@ return [ 'htdocs/comm/propal/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/comm/propal/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/commande/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/commande/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], @@ -275,7 +261,7 @@ return [ 'htdocs/compta/bank/graph.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/line.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/bank/releve.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/bank/transfer.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/bank/transfer.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/bank/treso.php' => ['PhanTypeMismatchProperty'], 'htdocs/compta/bank/various_payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], @@ -289,8 +275,7 @@ return [ 'htdocs/compta/deplacement/class/deplacement.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/compta/deplacement/class/deplacementstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/compta/deplacement/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/compta/facture/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], @@ -321,7 +306,6 @@ return [ 'htdocs/compta/paiement/class/cpaiement.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/compta/paiement/class/paiement.class.php' => ['PhanEmptyForeach', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/paiement/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/paiement/rapport.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/payment_vat/card.php' => ['PhanUndeclaredGlobalVariable'], @@ -371,7 +355,7 @@ return [ 'htdocs/contrat/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/contrat/class/api_contracts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/contrat/class/contrat.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], + 'htdocs/contrat/class/contrat.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/index.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/messaging.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], @@ -385,7 +369,7 @@ return [ 'htdocs/core/actions_lineupdown.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/actions_linkedfiles.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/actions_massactions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredProperty'], 'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], @@ -400,69 +384,29 @@ return [ 'htdocs/core/ajax/selectobject.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/ajax/selectsearchbox.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/core/ajax/ziptown.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_accountancy_last_manual_entries.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_accountancy_suspense_account.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_actions.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_actions_future.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/boxes/box_activity.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_birthdays.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_birthdays_members.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_boms.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_bookmarks.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_clients.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_commandes.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_comptes.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_contacts.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_contracts.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_customers_outstanding_bill_reached.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_dolibarr_state_board.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_external_rss.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_factures.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_factures_fourn.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_factures_fourn_imp.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_factures_imp.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_fediverse.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_ficheinter.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_fournisseurs.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_funnel_of_prospection.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_goodcustomers.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_graph_invoices_permonth.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_invoices_peryear.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_invoices_supplier_permonth.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_nb_tickets_type.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_graph_new_vs_close_ticket.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_graph_orders_permonth.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_orders_supplier_permonth.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_product_distribution.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_propales_permonth.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_graph_ticket_by_severity.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_last_knowledgerecord.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_last_modified_knowledgerecord.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_last_modified_ticket.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_last_ticket.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_lastlogin.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_members_by_tags.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_members_by_type.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_members_last_modified.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_members_last_subscriptions.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_members_subscriptions_by_year.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_mos.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_produits.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_produits_alerte_stock.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_project.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/boxes/box_project_opportunities.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/boxes/box_propales.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_prospect.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_scheduled_jobs.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_services_contracts.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/boxes/box_services_expired.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_shipments.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_supplier_orders.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_supplier_orders_awaiting_reception.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/boxes/box_task.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/box_validated_projects.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/boxes/modules_boxes.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/core/boxes/box_actions.php' => ['PhanPossiblyUndeclaredVariable'], + 'htdocs/core/boxes/box_actions_future.php' => ['PhanPossiblyUndeclaredVariable'], + 'htdocs/core/boxes/box_external_rss.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/boxes/box_funnel_of_prospection.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_invoices_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_invoices_peryear.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_invoices_supplier_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_nb_tickets_type.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/boxes/box_graph_new_vs_close_ticket.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/boxes/box_graph_orders_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_orders_supplier_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_product_distribution.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_propales_permonth.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_graph_ticket_by_severity.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/boxes/box_last_modified_ticket.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/boxes/box_last_ticket.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/boxes/box_project.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/boxes/box_project_opportunities.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/boxes/box_services_contracts.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/boxes/box_task.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/boxes/box_validated_projects.php' => ['PhanPluginUnknownPropertyType'], + 'htdocs/core/boxes/modules_boxes.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/CSMSFile.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/canvas.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/ccountry.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], @@ -474,7 +418,7 @@ return [ 'htdocs/core/class/commonobject.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/core/class/commonobjectline.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/commonorder.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/class/commonpeople.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/class/commonpeople.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/commonsocialnetworks.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/commonstickergenerator.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/conf.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'], @@ -483,12 +427,13 @@ return [ 'htdocs/core/class/ctyperesource.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/cunits.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/defaultvalues.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/class/diasporahandler.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/discount.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/doleditor.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/dolgeoip.class.php' => ['PhanTypeMismatchProperty'], 'htdocs/core/class/dolgeophp.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/core/class/dolgraph.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], - 'htdocs/core/class/dolreceiptprinter.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], + 'htdocs/core/class/dolreceiptprinter.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/emailsenderprofile.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/evalmath.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/events.class.php' => ['PhanPluginUnknownPropertyType'], @@ -518,11 +463,14 @@ return [ 'htdocs/core/class/interfaces.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/ldap.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/link.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/class/mastodonhandler.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/notify.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/openid.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/class/reddithandler.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/rssparser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccess'], 'htdocs/core/class/smtps.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/class/stats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredMethod'], + 'htdocs/core/class/socialnetworkmanager.class.php' => ['PhanPluginUnknownArrayMethodParamType'], + 'htdocs/core/class/stats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch'], 'htdocs/core/class/timespent.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/class/translate.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/class/utils.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], @@ -540,7 +488,7 @@ return [ 'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/get_info.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/lib/accounting.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', /* Bug : reference to id of module, not declared */ 'PhanUndeclaredProperty'], + 'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', /* Bug : reference to id of module, not declared */ 'PhanUndeclaredProperty'], 'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -573,17 +521,12 @@ return [ 'htdocs/core/lib/hrm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/images.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/import.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/intracommreport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/invoice.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/invoice2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/lib/ldap.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/memory.lib.php' => ['PhanTypeMismatchDimFetch'], - 'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/pdf.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/ldap.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/loan.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/mailmanspip.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/memory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/lib/modulebuilder.lib.php' => ['PhanTypeMismatchDimFetch'], + 'htdocs/core/lib/memory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/oauth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/openid_connect.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -601,7 +544,7 @@ return [ 'htdocs/core/lib/resource.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/salaries.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/security.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/security2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/lib/security2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/lib/sendings.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/lib/signature.lib.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/lib/socialnetwork.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -617,118 +560,106 @@ return [ 'htdocs/core/lib/website.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], 'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/action/modules_action.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/modules/bank/doc/pdf_ban.modules.php' => ['PhanUndeclaredMethod'], - 'htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/barcode/doc/phpbarcode.modules.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/barcode/mod_barcode_product_standard.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/barcode/modules_barcode.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanPluginUnknownObjectMethodCall'], + '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'], 'htdocs/core/modules/commande/modules_commande.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/dons/modules_don.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/modules/expensereport/mod_expensereport_sand.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/export/export_csviso.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchPropertyProbablyReal'], - 'htdocs/core/modules/export/export_csvutf8.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchPropertyProbablyReal'], - 'htdocs/core/modules/export/export_excel2007.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchPropertyProbablyReal'], - 'htdocs/core/modules/export/export_tsv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchPropertyProbablyReal'], + 'htdocs/core/modules/export/export_csviso.modules.php' => ['PhanPluginUnknownArrayMethodParamType'], + 'htdocs/core/modules/export/export_csvutf8.modules.php' => ['PhanPluginUnknownArrayMethodParamType'], + 'htdocs/core/modules/export/export_excel2007.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/modules/export/export_tsv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/export/exportcsv.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/export/modules_export.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/facture/doc/pdf_crabe.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/facture/doc/pdf_crabe.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/mod_facture_mercure.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/facture/modules_facture.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/fichinter/mod_pacific.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeMismatchPropertyProbablyReal'], - 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeMismatchPropertyProbablyReal'], + 'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], + 'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/core/modules/import/modules_import.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/modules/mailings/advthirdparties.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/core/modules/mailings/advthirdparties.modules.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/mailings/contacts1.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/mailings/eventorganization.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/mailings/modules_mailings.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], - 'htdocs/core/modules/mailings/partnership.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/mailings/thirdparties.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/mailings/thirdparties_services_expired.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/mailings/xinputfile.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/mailings/xinputuser.modules.php' => ['PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/core/modules/mailings/thirdparties.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/member/doc/doc_generic_member_odt.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/core/modules/member/doc/pdf_standard_member.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/member/modules_cards.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/member/modules_member.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/mrp/mod_mo_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/oauth/generic_oauthcallback.php' => ['PhanUndeclaredMethod'], - 'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/oauth/google_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/oauth/microsoft2_oauthcallback.php' => ['PhanUndeclaredMethod'], - 'htdocs/core/modules/oauth/microsoft_oauthcallback.php' => ['PhanUndeclaredMethod'], + 'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/modules/oauth/stripelive_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/modules/oauth/stripetest_oauthcallback.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/modules/payment/mod_payment_ant.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/printing/modules_printing.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/modules/printsheet/modules_labels.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/product_batch/mod_lot_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/product_batch/mod_lot_free.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/product_batch/mod_sn_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/product_batch/mod_sn_free.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/project/doc/pdf_baleine.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/project/doc/pdf_beluga.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/project/doc/pdf_timespent.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/project/doc/pdf_baleine.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/project/doc/pdf_beluga.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/modules/project/doc/pdf_timespent.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/project/mod_project_universal.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/propale/mod_propale_saphir.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/propale/modules_propale.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/rapport/pdf_paiement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/rapport/pdf_paiement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/security/generate/modGeneratePassPerso.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod'], - 'htdocs/core/modules/stock/modules_stock.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredMethod', /* Typing issues, ignored */ 'PhanUndeclaredProperty'], - 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPossiblyUndeclaredVariable', /* Typing issues, ignored */ 'PhanUndeclaredProperty'], + 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/stocktransfer/modules_stocktransfer.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/supplier_order/modules_commandefournisseur.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], + 'htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/syslog/logHandler.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], @@ -776,7 +707,7 @@ return [ 'htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php' => ['PhanPluginUnknownObjectMethodCall'], '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', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/core/triggers/interface_80_modStripe_Stripe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'], 'htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/cron/class/cronjob.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], @@ -814,7 +745,6 @@ return [ 'htdocs/don/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/don/stats/index.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/tpl/linkedobjectblock.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/ecm/ajax/ecmdatabase.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ecm/class/ecmdirectory.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/ecm/class/ecmfiles.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/ecm/class/htmlecm.form.class.php' => ['PhanPluginUnknownArrayMethodParamType'], @@ -822,7 +752,7 @@ return [ 'htdocs/ecm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ecm/index_auto.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ecm/index_medias.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanInvalidFQSENInClasslike', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanInvalidFQSENInClasslike', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/emailcollector/class/emailcollectoraction.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/emailcollector/class/emailcollectorfilter.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/emailcollector/lib/emailcollector.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -864,7 +794,6 @@ return [ 'htdocs/exports/class/export.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/exports/export.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/fichinter/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/fichinter/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], @@ -887,7 +816,7 @@ return [ 'htdocs/fourn/commande/contact.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fourn/commande/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/fourn/commande/document.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/fourn/commande/info.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + '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'], @@ -919,11 +848,10 @@ return [ 'htdocs/hrm/compare.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/hrm/core/tpl/objectline_view.tpl.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/hrm/core/tpl/skilldet.fiche.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/hrm/evaluation_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/evaluation_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/hrm/evaluation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/index.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/hrm/job_agenda.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/hrm/job_agenda.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/hrm/job_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/hrm/job_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/lib/hrm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -932,10 +860,8 @@ return [ 'htdocs/hrm/lib/hrm_skill.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/hrm/lib/hrm_skilldet.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/hrm/lib/hrm_skillrank.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/hrm/position_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/position_card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/position_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/hrm/skill_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/skill_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/hrm/skill_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/skill_tab.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -955,11 +881,10 @@ return [ 'htdocs/intracommreport/admin/intracommreport.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/intracommreport/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/intracommreport/class/intracommreport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/intracommreport/list.php' => [/* Dynamic access of IntracommReport::$type */ 'PhanAccessPropertyStaticAsNonStatic', 'PhanPluginUndeclaredVariableIsset'], + 'htdocs/intracommreport/lib/intracommreport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], + 'htdocs/intracommreport/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php' => [/* Missing KnowledgeRecord->date */ 'PhanUndeclaredProperty'], - 'htdocs/knowledgemanagement/knowledgerecord_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/knowledgemanagement/knowledgerecord_card.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/knowledgemanagement/knowledgerecord_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/knowledgemanagement/lib/knowledgemanagement.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -982,7 +907,6 @@ return [ 'htdocs/mrp/class/mo.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], 'htdocs/mrp/lib/mrp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/mrp/lib/mrp_mo.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/mrp/mo_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/mo_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/mrp/mo_movements.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/mrp/mo_production.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -1004,7 +928,6 @@ return [ 'htdocs/partnership/class/partnershiputils.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/partnership/core/modules/partnership/modules_partnership.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/partnership/lib/partnership.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/partnership/partnership_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/partnership/partnership_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/partnership/partnership_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/paypal/lib/paypal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -1015,7 +938,6 @@ return [ 'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/admin/product_lot.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/product/admin/product_tools.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/ajax/product_lot.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/ajax/products.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'], @@ -1076,7 +998,6 @@ return [ 'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/product/stock/stocktransfer/stocktransfer_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/product/stock/stocktransfer/stocktransfer_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/tpl/stockcorrection.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], @@ -1086,7 +1007,6 @@ return [ 'htdocs/projet/activity/permonth.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/activity/perweek.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/admin/project.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/ajax/projects.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/class/api_projects.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], @@ -1128,7 +1048,7 @@ return [ 'htdocs/public/opensurvey/studs.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/public/partnership/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'], 'htdocs/public/payment/newpayment.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/public/payment/paymentko.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredMethod'], + 'htdocs/public/payment/paymentko.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/project/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/project/new.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanUndeclaredProperty'], @@ -1142,7 +1062,6 @@ return [ 'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'], 'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/public/users/view.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/webportal/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/webportal/tpl/errors.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/public/webportal/tpl/footer.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], @@ -1165,14 +1084,13 @@ return [ 'htdocs/reception/note.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/reception/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/recruitment/admin/setup.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredMethod'], + 'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/recruitment/class/api_recruitments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php' => ['PhanUndeclaredProperty'], 'htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php' => ['PhanUndeclaredProperty'], - 'htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/recruitment/index.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/recruitment/lib/recruitment.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -1182,13 +1100,12 @@ return [ 'htdocs/recruitment/recruitmentcandidature_document.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/recruitment/recruitmentcandidature_list.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentcandidature_note.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/recruitment/recruitmentjobposition_agenda.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/recruitment/recruitmentjobposition_agenda.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], 'htdocs/recruitment/recruitmentjobposition_applications.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentjobposition_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentjobposition_document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/recruitment/recruitmentjobposition_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/recruitment/recruitmentjobposition_note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/resource/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/resource/class/dolresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/resource/class/html.formresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeExpectedObjectPropAccess'], 'htdocs/resource/element_resource.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -1204,11 +1121,10 @@ return [ 'htdocs/salaries/paiement_salary.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/salaries/virement_request.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/societe/admin/societe.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/societe/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/ajax/ajaxcompanies.php' => ['PhanUndeclaredProperty'], 'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/societe/canvas/actions_card_common.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], - 'htdocs/societe/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/societe/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/societe/checkvat/checkVatPopup.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/societe/class/api_contacts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], @@ -1262,7 +1178,6 @@ return [ 'htdocs/theme/md/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/progress.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/style.css.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/ticket/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ticket/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/ticket/class/actions_ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/ticket/class/api_tickets.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -1273,7 +1188,6 @@ return [ 'htdocs/ticket/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/ticket/list.php' => ['PhanTypeComparisonFromArray'], 'htdocs/ticket/tpl/linkedobjectblock.tpl.php' => ['PhanPluginUnknownObjectMethodCall'], - 'htdocs/user/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/agenda_extsites.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/bank.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/user/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], @@ -1288,7 +1202,6 @@ return [ 'htdocs/user/passwordforgotten.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/perms.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/variants/ajax/get_attribute_values.php' => ['PhanTypeComparisonFromArray'], - 'htdocs/variants/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], @@ -1311,7 +1224,7 @@ return [ 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/webportal/class/webPortalTheme.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], - 'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/webportal/class/webportalorder.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalpartnership.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/webportal/class/webportalpropal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], @@ -1340,7 +1253,6 @@ return [ 'htdocs/workstation/class/workstationusergroup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/workstation/lib/workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/workstation/lib/workstation_workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/workstation/workstation_agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/workstation/workstation_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/workstation/workstation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/zapier/class/api_zapier.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index 989b37b0f80..ea35c641c94 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -129,7 +129,7 @@ $VALID_MODULE_MAPPING = array( 'mymodule' => null, // modMyModule - Name used in module builder (avoid false positives) 'notification' => 'Notification', 'numberwords' => null, // Not provided by default, no module tests - 'oauth' => 'Oauth', + 'oauth' => 'OAuth', 'openstreetmap' => null, // External module? 'opensurvey' => 'OpenSurvey', 'order' => 'Commande', diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index c47f19f238b..844e6a0aebf 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -96,7 +96,7 @@ class Adherent extends CommonObject /** * @var string - * @deprecated + * @deprecated Use $civility_code * @see $civility_code */ public $civility_id; @@ -113,7 +113,7 @@ class Adherent extends CommonObject /** * @var string company name - * @deprecated + * @deprecated Use $company * @see $company */ public $societe; @@ -125,7 +125,7 @@ class Adherent extends CommonObject /** * @var int Thirdparty ID - * @deprecated + * @deprecated Use $socid * @see $socid */ public $fk_soc; @@ -136,7 +136,7 @@ class Adherent extends CommonObject public $socid; /** - * @var array array of socialnetworks + * @var array array of socialnetworks */ public $socialnetworks; @@ -308,7 +308,7 @@ class Adherent extends CommonObject public $partnerships = array(); /** - * @var Facture|null To store the created invoice into subscriptionComplementaryActions() + * @var ?Facture To store the created invoice into subscriptionComplementaryActions() */ public $invoice; diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 614d40d93f7..925a0eb4d75 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -446,8 +446,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // ex service is Google-Emails we need only the first part Google $apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array()); + '@phan-var-force OAuth\OAuth2\Service\AbstractService|OAuth\OAuth1\Service\AbstractService $apiService'; // createService is only ServiceInterface - // We have to save the token because Google give it only once + // We need to save the token because Google provides it only once $refreshtoken = $tokenobj->getRefreshToken(); //var_dump($tokenobj); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 94d4466fdbe..491efaf9fc4 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -888,7 +888,7 @@ if ($mode == 'common' || $mode == 'commonkanban') { if (!empty($objMod->disabled)) { $codeenabledisable .= $langs->trans("Disabled"); } elseif (!empty($objMod->always_enabled) || ((isModEnabled('multicompany') && $objMod->core_enabled) && ($user->entity || $conf->entity != 1))) { - // @phan-suppress-next-line PhanUndeclaredMethodCall + // @phan-suppress-next-line PhanUndeclaredMethod if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) { $codeenabledisable .= $langs->trans("Used"); } else { @@ -899,7 +899,7 @@ if ($mode == 'common' || $mode == 'commonkanban') { $disableSetup++; } } else { - // @phan-suppress-next-line PhanUndeclaredMethodCall + // @phan-suppress-next-line PhanUndeclaredMethod if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) { $codeenabledisable .= 'warnings_unactivation[$mysoc->country_code]).'&value='.$modName.'&mode='.$mode.$param.'">'; $codeenabledisable .= img_picto($langs->trans("Activated").($warningstring ? ' '.$warningstring : ''), 'switch_on'); diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 5005a7f5d1b..ddd9a5ad8a6 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -124,7 +124,7 @@ if ($action == 'specimen') { require_once $file; $module = new $classname($db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModelePDFStock $module'; if ($module->write_file($object, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=stock&file=SPECIMEN.pdf"); @@ -604,7 +604,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 88ec6a7f583..f05618ba592 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -447,7 +447,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModelePDFTicket $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -462,7 +462,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index c08f303ae50..8826b8d5e1f 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -249,7 +249,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModelePDFUser $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -264,7 +264,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index ce057b1bec1..7e810e69f8e 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -173,7 +173,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModelePDFUserGroup $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -188,7 +188,7 @@ foreach ($dirmodels as $reldir) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index b9e96e1a3e9..0ba6dcdda7d 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -120,7 +120,7 @@ if ($action == 'updateMask') { require_once $file; $module = new $classname($db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModelePDFAsset $module'; if ($module->write_file($tmpobject, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=".strtolower($tmpobjectkey)."&file=SPECIMEN.pdf"); @@ -230,7 +230,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file.'.php'; $module = new $file($db); - '@phan-var-force CommonNumRefGenerator $module'; + '@phan-var-force ModeleNumRefAsset $module'; // Show modules according to feature level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -372,7 +372,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { require_once $dir.'/'.$file; $module = new $classname($db); - '@phan-var-force CommonDocGenerator $module'; + '@phan-var-force ModelePDFAsset $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -387,7 +387,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index 869dc070587..82ea04051c5 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -179,12 +179,12 @@ if (empty($reshook)) { // Load barcode class for generating barcode image $classname = "mod".ucfirst($generator); + // $module can be modTcpdfbarcode or modPhpbarcode that both extends ModeleBarCode $module = new $classname($db); // Build the file on disk for generator not able to return the document on the fly. - '@phan-var-force ModeleBarCode $module'; if ($generator != 'tcpdfbarcode') { // $generator can be 'phpbarcode' (with this generator, barcode is generated on disk first) or 'tcpdfbarcode' (no need to enter this section with this generator). - // May be phpbarcode + '@phan-var-force modPhpbarcode $module'; $template = 'standardlabel'; $is2d = false; if ($module->encodingIsSupported($encoding)) { @@ -202,6 +202,7 @@ if (empty($reshook)) { setEventMessages("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, null, 'errors'); } } else { + '@phan-var-force modTcpdfbarcode $module'; $template = 'tcpdflabel'; $encoding = $module->getTcpdfEncodingType($encoding); //convert to TCPDF compatible encoding types $is2d = $module->is2d; diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index 5321886f0fb..4ef12cb8450 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (c) 2011 Juanjo Menent * Copyright (C) 2020 Maxime DEMAREST + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -231,13 +232,12 @@ class PropaleStats extends Stats } - /** * Return nb, amount of predefined product for year * - * @param int $year Year to scan - * @param int $limit Limit - * @return array Array of values + * @param int $year Year to scan + * @param int $limit Limit + * @return array,array{0:int<1,12>,1:int|float}> Array of values */ public function getAllByProduct($year, $limit = 10) { diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index b0e13265813..90c15aae923 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -326,7 +326,7 @@ class Contrat extends CommonObject } $obj = new $classname(); - '@phan-var-force CommonNumRefGenerator $obj'; + '@phan-var-force ModelNumRefContracts $obj'; $numref = $obj->getNextValue($soc, $this); if ($numref != "") { @@ -1045,7 +1045,7 @@ class Contrat extends CommonObject $result = dol_include_once('/core/modules/contract/'.$module.'.php'); if ($result > 0) { $modCodeContract = new $module(); - '@phan-var-force CommonNumRefGenerator $modCodeContrat'; + '@phan-var-force ModelNumRefContracts $modCodeContrat'; if (!empty($modCodeContract->code_auto)) { // Force the ref to a draft value if numbering module is an automatic numbering @@ -2635,7 +2635,7 @@ class Contrat extends CommonObject require_once DOL_DOCUMENT_ROOT."/core/modules/contract/" . getDolGlobalString('CONTRACT_ADDON').'.php'; $obj = getDolGlobalString('CONTRACT_ADDON'); $modContract = new $obj(); - '@phan-var-force CommonNumRefGenerator $modContrat'; + '@phan-var-force ModelNumRefContracts $modContrat'; $clonedObj->ref = $modContract->getNextValue($objsoc, $clonedObj); // get extrafields so they will be clone diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 0484e946ad7..218222753cd 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1145,7 +1145,7 @@ class CMailFile $refreshtoken = $tokenobj->getRefreshToken(); if ($apiService instanceof OAuth\OAuth2\Service\AbstractService || $apiService instanceof OAuth\OAuth1\Service\AbstractService) { - // ServiceInterface does not provide refreshAccessToekn, AbstractService does + // ServiceInterface does not provide refreshAccessToken, AbstractService does $tokenobj = $apiService->refreshAccessToken($tokenobj); $tokenobj->setRefreshToken($refreshtoken); // Restore the refresh token $storage->storeAccessToken($OAUTH_SERVICENAME, $tokenobj); @@ -1307,7 +1307,7 @@ class CMailFile $refreshtoken = $tokenobj->getRefreshToken(); if ($apiService instanceof OAuth\OAuth2\Service\AbstractService || $apiService instanceof OAuth\OAuth1\Service\AbstractService) { - // ServiceInterface does not provide refreshAccessToekn, AbstractService does + // ServiceInterface does not provide refreshAccessToken, AbstractService does // We must save the token because Google provides it only once $tokenobj = $apiService->refreshAccessToken($tokenobj); $tokenobj->setRefreshToken($refreshtoken); diff --git a/htdocs/core/class/commonpeople.class.php b/htdocs/core/class/commonpeople.class.php index 01e5b11a742..e8a48b36926 100644 --- a/htdocs/core/class/commonpeople.class.php +++ b/htdocs/core/class/commonpeople.class.php @@ -24,7 +24,35 @@ /** - * Support class for thirdparties, contacts, members, users or resources + * Support class for third parties, contacts, members, users or resources + * + * + * Properties expected in the class the trait is attached to. + * + * @property int $id + * @property int $contact_id + * @property int $fk_soc + * @property string $civility_code + * @property DoliDB $db + * @property string $element + * @property string $name + * @property string $name_alias + * @property string $nom + * @property string $company + * @property string $firstname + * @property string $lastname + * @property string $personal_email + * @property array $socialnetworks + * @property string $fax + * @property string $office_fax + * @property string $office_phone + * @property string $phone + * @property string $phone_perso + * @property string $phone_pro + * @property string $phone_mobile + * @property string $user_mobile + * @property string $country_code + * @property string $region */ trait CommonPeople { @@ -44,10 +72,16 @@ trait CommonPeople public $town; /** - * @var int $state_id + * @var int The state/department + */ + public $state_id; + /** + * @var string */ - public $state_id; // The state/department public $state_code; + /** + * @var string + */ public $state; /** @@ -306,4 +340,29 @@ trait CommonPeople $this->personal_email = dol_strtolower($this->personal_email); } } + + + // Methods used by this Trait that must be implemented in the parent class. + // Note: this helps static type checking + + /** + * Return full address of contact + * + * @param int<0,1> $withcountry 1=Add country into address string + * @param string $sep Separator to use to build string + * @param int<0,1> $withregion 1=Add region into address string + * @param string $extralangcode User extralanguages as value + * @return string Full address string + */ + abstract public function getFullAddress($withcountry = 0, $sep = "\n", $withregion = 0, $extralangcode = ''); + + + /** + * Function to get alternative languages of a data into $this->array_languages + * This method is NOT called by method fetch of objects but must be called separately. + * + * @return int<-1,1> Return integer <0 if error, 0 if no values of alternative languages to find nor found, 1 if a value was found and loaded + * @see fetch_optionnals() + */ + abstract public function fetchValuesForExtraLanguages(); } diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 50325c51218..8c69f9c018f 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -608,8 +608,9 @@ class dolReceiptPrinter extends Printer $this->printer->cut(); // If is DummyPrintConnector send to log to debugging - if ($this->printer->connector instanceof DummyPrintConnector) { - $data = $this->printer->connector->getData(); + $connector = $this->printer->connector; + if ($connector instanceof DummyPrintConnector) { + $data = $connector->getData(); dol_syslog($data); } // Close and print @@ -967,8 +968,9 @@ class dolReceiptPrinter extends Printer } } // If is DummyPrintConnector send to log to debugging - if ($this->printer->connector instanceof DummyPrintConnector || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { - $data = $this->printer->connector->getData(); + $connector = $this->printer->connector; + if ($connector instanceof DummyPrintConnector || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { + $data = $connector->getData(); if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { echo rtrim(strtr(base64_encode($data), '+/', '-_'), '='); } diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index e578722459d..431de1717c9 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -356,8 +356,6 @@ abstract class Stats $data = json_decode(file_get_contents($newpathofdestfile), true); '@phan-var-force array,array{0:int<1,12>,1:int|float}> $data'; // Phan can't decode json_decode's return value } else { - // This method is defined in parent object only, not into abstract, so we disable phpstan warning - /** @phpstan-ignore-next-line */ $data = $this->getAllByProduct($year, $limit); } @@ -708,4 +706,21 @@ abstract class Stats } return $result; } + + + /** + * Return nb, amount of predefined product for year + * + * @param int $year Year to scan + * @param int $limit Limit + * @return array,array{0:int<1,12>,1:int|float}> Array of values + */ + public function getAllByProduct($year, $limit = 0) + { + // Needs to be implemented in child class when used + $msg = get_class($this)."::".__FUNCTION__." not implemented"; + dol_syslog($msg, LOG_ERR); + $l = array(1,0); // Dummy result + return array($l,$l,$l,$l,$l,$l,$l,$l,$l,$l,$l,$l); + } } diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 4b18465ae68..188cfb99c71 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -2,6 +2,7 @@ /* Copyright (C) Kai Blankenhorn * Copyright (C) 2005-2017 Laurent Destailleur * Copyright (C) 2020 Tobias Sekan + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -210,7 +211,7 @@ class vCard $this->properties[$key] = encode($postoffice).";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country); //if ($this->properties["LABEL;".$type.";".$this->encoding] == '') { - //$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type); + //$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type); //} } @@ -423,7 +424,7 @@ class vCard if (!empty($object->socialnetworks)) { foreach ($object->socialnetworks as $key => $val) { - if (empty($val)) { // Disacard social network if empty + if (empty($val)) { // Discard social network if empty continue; } $urlsn = ''; diff --git a/htdocs/core/modules/action/doc/pdf_standard_actions.class.php b/htdocs/core/modules/action/doc/pdf_standard_actions.class.php index 7386196fca9..8bc43774263 100644 --- a/htdocs/core/modules/action/doc/pdf_standard_actions.class.php +++ b/htdocs/core/modules/action/doc/pdf_standard_actions.class.php @@ -194,7 +194,7 @@ class pdf_standard_actions $nbpage = $this->_pages($pdf, $outputlangs); // Write content if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php index d06bcf717a6..86aed0d6996 100644 --- a/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php +++ b/htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php @@ -672,7 +672,7 @@ class pdf_standard_asset extends ModelePDFAsset // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index 06e4410a5b3..129e5c55ea6 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -117,7 +117,7 @@ class mod_asset_advanced extends ModeleNumRefAsset * Return next free value * * @param Asset $object Object we need next value for - * @return string|int<-1,1> Next value if OK, <=0 if KO + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/asset/mod_asset_standard.php b/htdocs/core/modules/asset/mod_asset_standard.php index 506a60388ca..90ea78e7027 100644 --- a/htdocs/core/modules/asset/mod_asset_standard.php +++ b/htdocs/core/modules/asset/mod_asset_standard.php @@ -122,7 +122,7 @@ class mod_asset_standard extends ModeleNumRefAsset * Return next free value * * @param Asset $object Object we need next value for - * @return string|int<-1,1> Next value if OK, <=0 if KO + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/core/modules/asset/modules_asset.php b/htdocs/core/modules/asset/modules_asset.php index b2b3c1e8e0a..324ad6a32b1 100644 --- a/htdocs/core/modules/asset/modules_asset.php +++ b/htdocs/core/modules/asset/modules_asset.php @@ -86,7 +86,7 @@ abstract class ModeleNumRefAsset extends CommonNumRefGenerator * Return next free value * * @param Asset $object Object we need next value for - * @return string|int<-1,1> Next value if OK, <=0 if KO + * @return string|int<-1,0> Next value if OK, <=0 if KO */ abstract public function getNextValue($object); } diff --git a/htdocs/core/modules/bank/doc/pdf_ban.modules.php b/htdocs/core/modules/bank/doc/pdf_ban.modules.php index babe8791bdc..e39607bf5fa 100644 --- a/htdocs/core/modules/bank/doc/pdf_ban.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_ban.modules.php @@ -237,7 +237,7 @@ class pdf_ban extends ModeleBankAccountDoc */ $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 6b7441a25ce..cd1a9de66e8 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -437,7 +437,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc */ $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php index d5cce12be70..9fb45623b37 100644 --- a/htdocs/core/modules/cheque/doc/pdf_blochet.class.php +++ b/htdocs/core/modules/cheque/doc/pdf_blochet.class.php @@ -202,7 +202,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts // Pied de page $this->_pagefoot($pdf, '', $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php index 5213c2def53..6c9660efe0a 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_mint.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_mint.php @@ -111,9 +111,9 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param RemiseCheque $object Object we need next value for - * @return string|-1 Next value if OK, -1 if KO + * @param Societe $objsoc Object third party + * @param RemiseCheque $object Object we need next value for + * @return string|int<-1,0> Next value if OK, -1 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php index 6ae0b8ea3e9..edff2ae13e8 100644 --- a/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php +++ b/htdocs/core/modules/cheque/mod_chequereceipt_thyme.php @@ -117,9 +117,9 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param RemiseCheque $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @param Societe $objsoc Object third party + * @param RemiseCheque $object Object we need next value for + * @return string|int<-1,0> Next value if OK, -1 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php index 5c2f2fb9532..94ccd9dcd85 100644 --- a/htdocs/core/modules/cheque/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/modules_chequereceipts.php @@ -38,6 +38,14 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Requis abstract class ModeleNumRefChequeReceipts extends CommonNumRefGenerator { // No overload code + /** + * Return next free value + * + * @param Societe $objsoc Object thirdparty + * @param RemiseCheque $object Object we need next value for + * @return string|int<-1,0> Next value if OK, 0 if KO + */ + abstract public function getNextValue($objsoc, $object); } /** @@ -79,9 +87,9 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param int<0,max> $maxfilenamelength Max length of value to show + * @return string[]|int<-1,0> List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 6ae70f28639..78b4b884bd1 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -629,7 +629,7 @@ class pdf_einstein extends ModelePDFCommandes // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index efbab48188a..e4fadaef0ac 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -846,7 +846,7 @@ class pdf_eratosthene extends ModelePDFCommandes // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index a5a0c6710b0..194f8846b48 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -459,7 +459,7 @@ class pdf_strato extends ModelePDFContract $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index 5a8f0fcd64f..0a5f96ada52 100644 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -87,7 +87,7 @@ abstract class ModelNumRefContracts extends CommonNumRefGenerator * * @param Societe $objsoc third party object * @param Contrat $contract contract object - * @return string|int<0,-1> Next value if OK, -1 or 0 if KO + * @return string|int<-1,0> Next value if OK, -1 or 0 if KO */ abstract public function getNextValue($objsoc, $contract); } diff --git a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php index f7faae2f82a..3df593da5d7 100644 --- a/htdocs/core/modules/delivery/doc/pdf_storm.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_storm.modules.php @@ -558,7 +558,7 @@ class pdf_storm extends ModelePDFDeliveryOrder $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php index 81a6d2e574d..ef5ecdabcc9 100644 --- a/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php +++ b/htdocs/core/modules/delivery/doc/pdf_typhon.modules.php @@ -490,7 +490,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } // Check product remaining to be delivered @@ -551,7 +551,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $this->_pagefoot($pdf,$object,$outputlangs); - if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages(); + if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod }*/ $pdf->Close(); diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 52b5ca67b27..4a14a1778bc 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -264,7 +264,7 @@ class pdf_espadon extends ModelePdfExpedition $pdf->SetDrawColor(128, 128, 128); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); @@ -770,7 +770,7 @@ class pdf_espadon extends ModelePdfExpedition // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 4dc927d275a..bfc9ee0a2cb 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -219,7 +219,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetDrawColor(128, 128, 128); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); @@ -366,7 +366,7 @@ class pdf_merou extends ModelePdfExpedition // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 593525650f7..703e74ea93b 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -297,7 +297,7 @@ class pdf_rouget extends ModelePdfExpedition $pdf->SetDrawColor(128, 128, 128); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); @@ -661,7 +661,7 @@ class pdf_rouget extends ModelePdfExpedition // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php index ac86ca57ff4..2e69df6d355 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php @@ -500,7 +500,7 @@ class pdf_standard_expensereport extends ModeleExpenseReport // Page footer $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 57b2f249863..80c1043d2b2 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -873,7 +873,7 @@ class pdf_crabe extends ModelePDFFactures // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs)); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') { diff --git a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php index 82a1df10e8c..9074fde6c5c 100644 --- a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php @@ -1122,7 +1122,7 @@ class pdf_octopus extends ModelePDFFactures // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $this->resumeLastPage($pdf, $object, 0, $tab_top, $outputlangs, $outputlangsbis); diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 6d6fb8aad82..0cffc22136c 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1035,7 +1035,7 @@ class pdf_sponge extends ModelePDFFactures // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs, 0, $this->getHeightForQRInvoice($pdf->getPage(), $object, $langs)); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } if (getDolGlobalString('INVOICE_ADD_SWISS_QR_CODE') == 'bottom') { diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 13c2691d9fa..6912fccb4ad 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -409,7 +409,7 @@ class pdf_soleil extends ModelePDFFicheinter $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php b/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php index 6553d152052..f0f27172fb3 100644 --- a/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php +++ b/htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php @@ -418,7 +418,7 @@ class pdf_standard_evaluation extends ModelePDFEvaluation // Page footer $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index fe348963e14..ab337600a1a 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 MDW * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -150,7 +151,7 @@ class mailing_advthirdparties extends MailingTargets if (!array_key_exists($obj->email, $cibles)) { $cibles[$obj->email] = array( 'email' => $obj->email, - 'fk_contact' =>$obj->id, + 'fk_contact' => $obj->id, 'lastname' => $obj->lastname, 'firstname' => $obj->firstname, 'other' => '', @@ -184,7 +185,7 @@ class mailing_advthirdparties extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array Array with SQL requests + * @return string[] Array with SQL requests */ public function getSqlArrayForStats() { diff --git a/htdocs/core/modules/mailings/eventorganization.modules.php b/htdocs/core/modules/mailings/eventorganization.modules.php index d6261ae0d02..12a0562ae5d 100644 --- a/htdocs/core/modules/mailings/eventorganization.modules.php +++ b/htdocs/core/modules/mailings/eventorganization.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2018-2018 Andre Schild * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 MDW * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -137,7 +138,7 @@ class mailing_eventorganization extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array Array with SQL requests + * @return string[] Array with SQL requests */ public function getSqlArrayForStats() { diff --git a/htdocs/core/modules/mailings/modules_mailings.php b/htdocs/core/modules/mailings/modules_mailings.php index c9cac1a186f..a61ded50bcc 100644 --- a/htdocs/core/modules/mailings/modules_mailings.php +++ b/htdocs/core/modules/mailings/modules_mailings.php @@ -428,4 +428,21 @@ class MailingTargets // This can't be abstract as it is used for some method return $widget; } + + + /** + * On the main mailing area, there is a box with statistics. + * If you want to add a line in this report you must provide an + * array of SQL request that returns two field: + * One called "label", One called "nb". + * + * @return string[] Array with SQL requests + */ + public function getSqlArrayForStats() + { + // Needs to be implemented in child class + $msg = get_class($this)."::".__FUNCTION__." not implemented"; + dol_syslog($msg, LOG_ERR); + return array(); + } } diff --git a/htdocs/core/modules/mailings/partnership.modules.php b/htdocs/core/modules/mailings/partnership.modules.php index e3d64ff8083..a2874475f23 100644 --- a/htdocs/core/modules/mailings/partnership.modules.php +++ b/htdocs/core/modules/mailings/partnership.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2018-2018 Andre Schild * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 MDW * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -159,7 +160,7 @@ class mailing_partnership extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array Array with SQL requests + * @return string[] Array with SQL requests */ public function getSqlArrayForStats() { diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 0d1c0b6931e..7eda228bb24 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2018-2018 Andre Schild * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 MDW * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -226,7 +227,7 @@ class mailing_thirdparties extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array Array with SQL requests + * @return string[] Array with SQL requests */ public function getSqlArrayForStats() { diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 285b4ae3a26..35a728566dd 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 MDW * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -167,7 +168,7 @@ class mailing_thirdparties_services_expired extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array Array with SQL requests + * @return string[] Array with SQL requests */ public function getSqlArrayForStats() { diff --git a/htdocs/core/modules/mailings/xinputfile.modules.php b/htdocs/core/modules/mailings/xinputfile.modules.php index ac65afe24d9..5fad7010d05 100644 --- a/htdocs/core/modules/mailings/xinputfile.modules.php +++ b/htdocs/core/modules/mailings/xinputfile.modules.php @@ -61,7 +61,7 @@ class mailing_xinputfile extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array Array with SQL requests + * @return string[] Array with SQL requests */ public function getSqlArrayForStats() { diff --git a/htdocs/core/modules/mailings/xinputuser.modules.php b/htdocs/core/modules/mailings/xinputuser.modules.php index 7681e02cea3..3f844ec0d40 100644 --- a/htdocs/core/modules/mailings/xinputuser.modules.php +++ b/htdocs/core/modules/mailings/xinputuser.modules.php @@ -61,7 +61,7 @@ class mailing_xinputuser extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array Array with SQL requests + * @return string[] Array with SQL requests */ public function getSqlArrayForStats() { diff --git a/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php b/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php index 30f7f2ca4a0..21045e9ec21 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php @@ -743,7 +743,7 @@ class pdf_standard_movementstock extends ModelePDFMovement // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php index 61904c07c67..0e7b04d97c3 100644 --- a/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php +++ b/htdocs/core/modules/mrp/doc/pdf_vinci.modules.php @@ -582,7 +582,7 @@ class pdf_vinci extends ModelePDFMo // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/oauth/generic_oauthcallback.php b/htdocs/core/modules/oauth/generic_oauthcallback.php index 0c06bc54aef..787b730e0a5 100644 --- a/htdocs/core/modules/oauth/generic_oauthcallback.php +++ b/htdocs/core/modules/oauth/generic_oauthcallback.php @@ -129,8 +129,8 @@ var_dump($storage); var_dump($requestedpermissionsarray); */ -if (empty($apiService)) { - print 'Error, failed to create serviceFactory'; +if (empty($apiService) || !$apiService instanceof OAuth\OAuth2\Service\Generic) { + print 'Error, failed to create Generic serviceFactory'; exit; } if (!$apiService->getBaseApiUri()) { @@ -141,7 +141,7 @@ if (!$apiService->getBaseApiUri()) { // access type needed to have oauth provider refreshing token // also note that a refresh token is sent only after a prompt if (method_exists($apiService, 'setAccessType')) { - $apiService->setAccessType('offline'); // Most generic OAUTH provider does not provide AccessType online/offline. They are mostly offline. + $apiService->setAccessType('offline'); // Most generic OAUTH provider does not provide AccessType online/offline. They are mostly offline. // @phan-suppress-current-line PhanUndeclaredMethod } if (!getDolGlobalString($keyforparamid)) { @@ -186,11 +186,11 @@ if (!GETPOST('code') && !GETPOST('error')) { if ($forlogin) { $approval_prompt = getDolGlobalString('OAUTH_'.$genericstring.'_FORCE_PROMPT_ON_LOGIN', 'auto'); // Can be 'force' if (method_exists($apiService, 'setApprouvalPrompt')) { - $apiService->setApprouvalPrompt($approval_prompt); + $apiService->setApprouvalPrompt($approval_prompt); // @phan-suppress-current-line PhanUndeclaredMethod } } else { if (method_exists($apiService, 'setApprouvalPrompt')) { - $apiService->setApprouvalPrompt('force'); + $apiService->setApprouvalPrompt('force'); // @phan-suppress-current-line PhanUndeclaredMethod } } diff --git a/htdocs/core/modules/oauth/github_oauthcallback.php b/htdocs/core/modules/oauth/github_oauthcallback.php index 23f9be92724..6f5a895b6c3 100644 --- a/htdocs/core/modules/oauth/github_oauthcallback.php +++ b/htdocs/core/modules/oauth/github_oauthcallback.php @@ -1,6 +1,7 @@ * Copyright (C) 2015 Frederic France + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -87,6 +88,7 @@ if ($action != 'delete' && empty($requestedpermissionsarray)) { // Instantiate the Api service using the credentials, http client and storage mechanism for the token $apiService = $serviceFactory->createService('GitHub', $credentials, $storage, $requestedpermissionsarray); +'@phan-var-force OAuth\OAuth2\Service\AbstractService|OAuth\OAuth1\Service\AbstractService $apiService'; // createService is only ServiceInterface // access type needed to have oauth provider refreshing token //$apiService->setAccessType('offline'); diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index 2b6d484c51a..0a6ce5def56 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -1,6 +1,7 @@ * Copyright (C) 2015 Frederic France + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -124,6 +125,7 @@ $storage = new DoliStorage($db, $conf, $keyforprovider); // $requestedpermissionsarray contains list of scopes. // Conversion into URL is done by Reflection on constant with name SCOPE_scope_in_uppercase $apiService = $serviceFactory->createService('Google', $credentials, $storage, $requestedpermissionsarray); +'@phan-var-force OAuth\OAuth2\Service\Google $apiService'; // createService is only ServiceInterface // access type needed to have oauth provider refreshing token // also note that a refresh token is sent only after a prompt @@ -183,7 +185,7 @@ if (!GETPOST('code')) { // The redirect_uri is included into this $url // Add more param - $url .= '&nonce='.bin2hex(random_bytes(64/8)); + $url .= '&nonce='.bin2hex(random_bytes(64 / 8)); if ($forlogin) { // TODO Add param hd. What is it for ? diff --git a/htdocs/core/modules/oauth/microsoft2_oauthcallback.php b/htdocs/core/modules/oauth/microsoft2_oauthcallback.php index 6ee6ca64430..38405c680ec 100644 --- a/htdocs/core/modules/oauth/microsoft2_oauthcallback.php +++ b/htdocs/core/modules/oauth/microsoft2_oauthcallback.php @@ -1,6 +1,7 @@ * Copyright (C) 2015 Frederic France + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,6 +96,7 @@ if ($action != 'delete' && empty($requestedpermissionsarray)) { // Conversion into URL is done by Reflection on constant with name SCOPE_scope_in_uppercase try { $apiService = $serviceFactory->createService(ucfirst(strtolower($genericstring)), $credentials, $storage, $requestedpermissionsarray); + '@phan-var-force OAuth\OAuth2\Service\AbstractService|OAuth\OAuth1\Service\AbstractService $apiService'; // createService is only ServiceInterface } catch (Exception $e) { print $e->getMessage(); exit; diff --git a/htdocs/core/modules/oauth/microsoft_oauthcallback.php b/htdocs/core/modules/oauth/microsoft_oauthcallback.php index c8cd593bf07..d315b7903bb 100644 --- a/htdocs/core/modules/oauth/microsoft_oauthcallback.php +++ b/htdocs/core/modules/oauth/microsoft_oauthcallback.php @@ -1,6 +1,7 @@ * Copyright (C) 2015 Frederic France + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,6 +96,7 @@ if ($action != 'delete' && empty($requestedpermissionsarray)) { // Conversion into URL is done by Reflection on constant with name SCOPE_scope_in_uppercase try { $apiService = $serviceFactory->createService(ucfirst(strtolower($genericstring)), $credentials, $storage, $requestedpermissionsarray); + '@phan-var-force OAuth\OAuth2\Service\AbstractService|OAuth\OAuth1\Service\AbstractService $apiService'; // createService is only ServiceInterface } catch (Exception $e) { print $e->getMessage(); exit; diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 0de13302b82..5541cdc417d 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -122,7 +122,7 @@ class mod_payment_ant extends ModeleNumRefPayments * * @param Societe $objsoc Object thirdparty * @param Object $object Object we need next value for - * @return string|int Value if OK, 0 if KO + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/payment/mod_payment_cicada.php b/htdocs/core/modules/payment/mod_payment_cicada.php index 53913df75d8..d49230d3f3e 100644 --- a/htdocs/core/modules/payment/mod_payment_cicada.php +++ b/htdocs/core/modules/payment/mod_payment_cicada.php @@ -120,9 +120,9 @@ class mod_payment_cicada extends ModeleNumRefPayments /** * Return next free value * - * @param Societe $objsoc Object thirdparty - * @param Object $object Object we need next value for - * @return string|-1 Value if OK, -1 if KO + * @param Societe $objsoc Object thirdparty + * @param Object $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 if KO */ public function getNextValue($objsoc, $object) { diff --git a/htdocs/core/modules/payment/modules_payment.php b/htdocs/core/modules/payment/modules_payment.php index d0913c71e23..d67f0e7671f 100644 --- a/htdocs/core/modules/payment/modules_payment.php +++ b/htdocs/core/modules/payment/modules_payment.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,5 +24,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php'; */ abstract class ModeleNumRefPayments extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Societe $objsoc Object thirdparty + * @param Object $object Object we need next value for + * @return string|int<-1,0> Value if OK, <=0 if KO + */ + abstract public function getNextValue($objsoc, $object); } diff --git a/htdocs/core/modules/printing/modules_printing.php b/htdocs/core/modules/printing/modules_printing.php index d7fef7f516d..ea5bcf02397 100644 --- a/htdocs/core/modules/printing/modules_printing.php +++ b/htdocs/core/modules/printing/modules_printing.php @@ -147,4 +147,20 @@ class PrintingDriver $this->errors[] = $msg; return []; } + + /** + * Print selected file + * + * @param string $file file + * @param string $module module + * @param string $subdir subdir for file + * @return int 0 if OK, >0 if KO + */ + public function printFile($file, $module, $subdir = '') + { + $msg = get_class($this)."::".__FUNCTION__." not implemented"; + dol_syslog($msg, LOG_ERR); + $this->errors[] = $msg; + return 1; + } } diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 27788188ea1..eb234513234 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -122,6 +122,7 @@ class printing_printgcp extends PrintingDriver $access = ($storage->hasAccessToken($this->OAUTH_SERVICENAME_GOOGLE) ? 'HasAccessToken' : 'NoAccessToken'); $serviceFactory = new \OAuth\ServiceFactory(); $apiService = $serviceFactory->createService($this->OAUTH_SERVICENAME_GOOGLE, $credentials, $storage, array()); + '@phan-var-force OAuth\OAuth2\Service\Google $apiService'; // createService is only ServiceInterface $token_ok = true; try { $token = $storage->retrieveAccessToken($this->OAUTH_SERVICENAME_GOOGLE); @@ -260,6 +261,7 @@ class printing_printgcp extends PrintingDriver ); $serviceFactory = new \OAuth\ServiceFactory(); $apiService = $serviceFactory->createService($this->OAUTH_SERVICENAME_GOOGLE, $credentials, $storage, array()); + '@phan-var-force OAuth\OAuth2\Service\Google $apiService'; // createService is only ServiceInterface // Check if we have auth token $token_ok = true; try { @@ -402,6 +404,7 @@ class printing_printgcp extends PrintingDriver ); $serviceFactory = new \OAuth\ServiceFactory(); $apiService = $serviceFactory->createService($this->OAUTH_SERVICENAME_GOOGLE, $credentials, $storage, array()); + '@phan-var-force OAuth\OAuth2\Service\Google $apiService'; // createService is only ServiceInterface // Check if we have auth token and refresh it $token_ok = true; @@ -454,6 +457,7 @@ class printing_printgcp extends PrintingDriver ); $serviceFactory = new \OAuth\ServiceFactory(); $apiService = $serviceFactory->createService($this->OAUTH_SERVICENAME_GOOGLE, $credentials, $storage, array()); + '@phan-var-force OAuth\OAuth2\Service\Google $apiService'; // createService is only ServiceInterface // Check if we have auth token $token_ok = true; try { diff --git a/htdocs/core/modules/product/doc/pdf_standard.modules.php b/htdocs/core/modules/product/doc/pdf_standard.modules.php index d773d36d1f6..9f72337a0aa 100644 --- a/htdocs/core/modules/product/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/product/doc/pdf_standard.modules.php @@ -566,7 +566,7 @@ class pdf_standard extends ModelePDFProduct // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/project/doc/pdf_baleine.modules.php b/htdocs/core/modules/project/doc/pdf_baleine.modules.php index eff1db04804..7ded9a04132 100644 --- a/htdocs/core/modules/project/doc/pdf_baleine.modules.php +++ b/htdocs/core/modules/project/doc/pdf_baleine.modules.php @@ -471,7 +471,7 @@ class pdf_baleine extends ModelePDFProjects // Footer of the page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index d36cf3355ea..0fd734b845c 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -703,7 +703,7 @@ class pdf_beluga extends ModelePDFProjects // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/project/doc/pdf_timespent.modules.php b/htdocs/core/modules/project/doc/pdf_timespent.modules.php index ae78a9182a5..420c33cc81b 100644 --- a/htdocs/core/modules/project/doc/pdf_timespent.modules.php +++ b/htdocs/core/modules/project/doc/pdf_timespent.modules.php @@ -469,7 +469,7 @@ class pdf_timespent extends ModelePDFProjects // Footer of the page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index a6b9a7c37a0..6e44e5fcd38 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -753,7 +753,7 @@ class pdf_azur extends ModelePDFPropales // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } //If propal merge product PDF is active diff --git a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php index 7d376717d8d..34026f6c4de 100644 --- a/htdocs/core/modules/propale/doc/pdf_cyan.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_cyan.modules.php @@ -871,7 +871,7 @@ class pdf_cyan extends ModelePDFPropales // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } //If propal merge product PDF is active diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index a7fca59d6a0..8112697b973 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -355,7 +355,7 @@ class pdf_paiement extends CommonDocGenerator $this->Body($pdf, 1, $lines, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 66c05ed7a59..1004d3d83c9 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -265,7 +265,7 @@ class pdf_squille extends ModelePdfReception $pdf->SetDrawColor(128, 128, 128); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); @@ -642,7 +642,7 @@ class pdf_squille extends ModelePdfReception // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 03eebc4b048..fce466a4412 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -197,12 +197,12 @@ class doc_generic_stock_odt extends ModelePDFStock * @param Entrepot $object Object source to build document * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return int 1 if OK, <=0 if KO + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1 if OK, <=0 if KO */ - public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) + public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { // phpcs:enable global $stock, $langs, $conf, $mysoc, $hookmanager, $user; diff --git a/htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php b/htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php index 7ba20b6b1c9..9224e7d503c 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php @@ -121,15 +121,15 @@ class pdf_standard_stock extends ModelePDFStock // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Function to build a document on disk using the generic odt module. + * Function to build a document on disk * * @param Entrepot $object Object source to build document * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return int 1 if OK, <=0 if KO + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1 if OK, <=0 if KO */ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { @@ -540,7 +540,7 @@ class pdf_standard_stock extends ModelePDFStock // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/stock/modules_stock.php b/htdocs/core/modules/stock/modules_stock.php index 151ce445710..c354d0ed43c 100644 --- a/htdocs/core/modules/stock/modules_stock.php +++ b/htdocs/core/modules/stock/modules_stock.php @@ -54,9 +54,9 @@ abstract class ModelePDFStock extends CommonDocGenerator /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param int<0,max> $maxfilenamelength Max length of value to show + * @return string[]|int<-1,0> List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { @@ -69,4 +69,20 @@ abstract class ModelePDFStock extends CommonDocGenerator return $list; } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Function to build a document on disk + * + * @param Entrepot $object Object source to build document + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1 if OK, <=0 if KO + */ + abstract public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0); + // phpcs:enable } diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php index c575593aaf1..9cdea4485c8 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php @@ -170,10 +170,10 @@ class pdf_eagle extends ModelePDFStockTransfer * @param StockTransfer $object Object StockTransfer to generate (or id if old method) * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return int 1=OK, 0=KO + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1=OK, 0=KO */ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { @@ -321,7 +321,7 @@ class pdf_eagle extends ModelePDFStockTransfer $pdf->SetDrawColor(128, 128, 128); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); @@ -728,7 +728,7 @@ class pdf_eagle extends ModelePDFStockTransfer // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php index f769c797973..b6fd341fc6d 100644 --- a/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php +++ b/htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php @@ -135,15 +135,15 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Function to build pdf onto disk + * Function to build pdf onto disk * - * @param Object $object Object to generate - * @param Translate $outputlangs Lang output object - * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return int 1=OK, 0=KO + * @param StockTransfer $object Object StockTransfer to generate (or id if old method) + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1=OK, 0=KO */ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { @@ -794,7 +794,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/stocktransfer/modules_stocktransfer.php b/htdocs/core/modules/stocktransfer/modules_stocktransfer.php index 30ef2137333..beeecc06509 100644 --- a/htdocs/core/modules/stocktransfer/modules_stocktransfer.php +++ b/htdocs/core/modules/stocktransfer/modules_stocktransfer.php @@ -44,9 +44,9 @@ abstract class ModelePDFStockTransfer extends CommonDocGenerator /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param int<0,max> $maxfilenamelength Max length of value to show + * @return string[]|int<-1,0> List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { @@ -59,6 +59,21 @@ abstract class ModelePDFStockTransfer extends CommonDocGenerator return $list; } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Function to build document onto disk + * + * @param StockTransfer $object Object StockTransfer to generate (or id if old method) + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int<0,1> $hidedetails Do not show line details + * @param int<0,1> $hidedesc Do not show desc + * @param int<0,1> $hideref Do not show ref + * @return int<-1,1> 1=OK, 0=KO + */ + abstract public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0); + // phpcs:enable } diff --git a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php index c769cf44519..1ed55a909bc 100644 --- a/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php @@ -571,7 +571,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php index a0a576bd84f..b9429ebe685 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php @@ -791,7 +791,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php index 1d93fbccd5a..657b9d05a59 100644 --- a/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php @@ -668,7 +668,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php b/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php index f152644901b..426c4336fc4 100644 --- a/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php +++ b/htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php @@ -450,7 +450,7 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments // Footer page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 2f7661f496b..5c4c64f7967 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -658,7 +658,7 @@ class pdf_aurore extends ModelePDFSupplierProposal // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php index 6a7031f71d6..a1e702ce891 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php @@ -788,7 +788,7 @@ class pdf_zenith extends ModelePDFSupplierProposal // Pied de page $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php index 9eaac2c7bd5..b9cdf6a3b78 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_marbre.php @@ -124,9 +124,9 @@ class mod_supplier_proposal_marbre extends ModeleNumRefSupplierProposal /** * Return next value * - * @param Societe $objsoc Object third party + * @param Societe $objsoc Object third party * @param SupplierProposal $supplier_proposal Object commercial proposal - * @return string|-1 Next value if OK, -1 if KO + * @return string|int<-1,0> Next value if OK, -1 if KO */ public function getNextValue($objsoc, $supplier_proposal) { diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index 178979ef1db..dd730510e54 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -125,9 +125,9 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal /** * Return next value * - * @param Societe $objsoc Object third party + * @param Societe $objsoc Object third party * @param SupplierProposal $supplier_proposal Object commercial proposal - * @return string|int Value if OK, 0 if KO + * @return string|int<-1,0> Next value if OK, -1 if KO */ public function getNextValue($objsoc, $supplier_proposal) { diff --git a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php index 739ae622172..8186048e263 100644 --- a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php +++ b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -80,5 +81,12 @@ abstract class ModelePDFSupplierProposal extends CommonDocGenerator */ abstract class ModeleNumRefSupplierProposal extends CommonNumRefGenerator { - // No overload code + /** + * Return next value + * + * @param Societe $objsoc Object third party + * @param SupplierProposal $supplier_proposal Object commercial proposal + * @return string|int<-1,0> Next value if OK, -1 if KO + */ + abstract public function getNextValue($objsoc, $supplier_proposal); } diff --git a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php index 3b764b3b178..4099ae40390 100644 --- a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php +++ b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php @@ -235,7 +235,7 @@ class InterfaceStripe extends DolibarrTriggers $card->save(); } catch (Exception $e) { $ok = -1; - $this->errors[] = $e->getMessages(); + $this->errors[] = $e->getMessage(); } } } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index c15bb8c72e5..b82171cf99f 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1183,6 +1183,7 @@ class EmailCollector extends CommonObject $oauthname = explode('-', $OAUTH_SERVICENAME); // ex service is Google-Emails we need only the first part Google $apiService = $serviceFactory->createService($oauthname[0], $credentials, $storage, array()); + '@phan-var-force OAuth\OAuth2\Service\AbstractService|OAuth\OAuth1\Service\AbstractService $apiService'; // createService is only ServiceInterface // We have to save the token because Google give it only once $refreshtoken = $tokenobj->getRefreshToken(); $tokenobj = $apiService->refreshAccessToken($tokenobj); diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index 15d19eaba73..d5d58ec8bfd 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -3,6 +3,7 @@ * Copyright (c) 2005-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos García + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -202,11 +203,11 @@ class FichinterStats extends Stats } /** - * Return nb, amount of predefined product for year + * Return nb, amount of predefined product for year * - * @param int $year Year to scan - * @param int $limit Limit - * @return array Array of values + * @param int $year Year to scan + * @param int $limit Limit + * @return array,array{0:int<1,12>,1:int|float}> Array of values */ public function getAllByProduct($year, $limit = 0) { diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailing_mymodule_selector1.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailing_mymodule_selector1.modules.php index 8375a01d867..a3c3e32e2f2 100644 --- a/htdocs/modulebuilder/template/core/modules/mailings/mailing_mymodule_selector1.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mailings/mailing_mymodule_selector1.modules.php @@ -171,7 +171,7 @@ class mailing_mailing_mymodule_selector1 extends MailingTargets * array of SQL request that returns two field: * One called "label", One called "nb". * - * @return array{}|array{label:string,nb:string} + * @return string[] Array with SQL requests */ public function getSqlArrayForStats() { diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 8c08c1659eb..81532ea95d3 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -3,6 +3,7 @@ * Copyright (C) 2006-2013 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -162,7 +163,7 @@ if (!empty($_SESSION['ipaddress'])) { // To avoid to make action twice $errormessage = $_SESSION['errormessage']; if (is_object($object) && method_exists($object, 'call_trigger')) { - // Call trigger + // Call trigger @phan-suppress-next-line PhanUndeclaredMethod $result = $object->call_trigger('PAYMENTONLINE_PAYMENT_KO', $user); if ($result < 0) { $error++; diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index de43f0d17d7..91bfa92d8dd 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -609,7 +609,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio // Pagefoot $this->_pagefoot($pdf, $object, $outputlangs); if (method_exists($pdf, 'AliasNbPages')) { - $pdf->AliasNbPages(); + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod } $pdf->Close(); diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php index 187d71dbd14..95503767c91 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php @@ -120,8 +120,8 @@ class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandida /** * Return next free value * - * @param RecruitmentCandidature $object Object we need next value for - * @return string|int Next value if OK, 0 if KO + * @param RecruitmentCandidature $object Object we need next value for + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php index 5b0ba51ea83..ee6557c1451 100644 --- a/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php +++ b/htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_standard.php @@ -118,8 +118,8 @@ class mod_recruitmentcandidature_standard extends ModeleNumRefRecruitmentCandida /** * Return next free value * - * @param RecruitmentCandidature $object Object we need next value for - * @return string|-1 Next value if OK, -1 if KO + * @param RecruitmentCandidature $object Object we need next value for + * @return string|int<-1,0> Next value if OK, <=0 if KO */ public function getNextValue($object) { diff --git a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php index ceb1ead8f59..5ad0338ad72 100644 --- a/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php +++ b/htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,9 +43,9 @@ abstract class ModelePDFRecruitmentCandidature extends CommonDocGenerator /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param int<0,max> $maxfilenamelength Max length of value to show + * @return string[]|int<-1,0> List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { @@ -66,5 +67,11 @@ abstract class ModelePDFRecruitmentCandidature extends CommonDocGenerator */ abstract class ModeleNumRefRecruitmentCandidature extends CommonNumRefGenerator { - // No overloaded code + /** + * Return next free value + * + * @param RecruitmentCandidature $object Object we need next value for + * @return string|int<-1,0> Next value if OK, <=0 if KO + */ + abstract public function getNextValue($object); }