QUAL Use phan to help detect new issues (#27706)

* Qual: Add phan flow

- Add phan configuration (config, baseline, stubs);
- Add github action;
- Update apstats.php.

* Add directives to ignore false phan notices

* Qual: Add typing hints for extrafields TPL files

# Qual: Add typing hints for extrafields TPL files

Add typing hints for phan on view files

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
MDW
2024-02-21 18:14:29 +01:00
committed by GitHub
parent 5460b97e8b
commit 8655d5a86b
96 changed files with 29903 additions and 2 deletions

55
.github/workflows/phan.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
---
on:
pull_request:
push:
schedule:
# execute once a day, the 1st
- cron: 10 9 * * *
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Do pull analysis on schedule or manual dispatch
PHAN_CONFIG: >
${{
( github.event.schedule || github.event_name == 'workflow_dispatch' )
&& 'dev/tools/phan/config_extended.php'
|| 'dev/tools/phan/config.php'
}}
PHAN_BASELINE: dev/tools/phan/baseline.txt
PHAN_MIN_PHP: 7.0
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
name: phan
jobs:
phan:
name: Run phan
runs-on: ubuntu-latest
# Do not run schedule on forks
if: |
github.repository == 'Dolibarr/dolibarr'
|| github.event.schedule == false
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none # disable xdebug, pcov
tools: cs2pr,phan
- name: Run Phan analysis
run: |
phan $PHAN_QUICK -k $PHAN_CONFIG -B $PHAN_BASELINE --analyze-twice --minimum-target-php-version $PHAN_MIN_PHP --output-mode=checkstyle -o _phan.xml
- name: Add results to PR
if: ${{ always() }}
run: |
cs2pr --prepend-filename --prepend-source --notices-as-warnings _phan.xml
- name: Provide phan log as artifact
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: phan-srcrt
# path: ${{ github.workspace }}/phan.log
path: ${{ github.workspace }}/_phan.xml
retention-days: 2

4
.phan/config.php Normal file
View File

@@ -0,0 +1,4 @@
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*/
return include __DIR__ . "/../dev/tools/phan/config.php";

3
dev/tools/phan/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
*.sw?
composer.*
vendor

46
dev/tools/phan/README.md Normal file
View File

@@ -0,0 +1,46 @@
### Static Code Checks using [phan]
#### Installation, running
`run-phan.sh` can install and run `phan`.
See instructions in `run-phan.sh` for installing (or just run it).
The configuration file in `PROJECT_DIR/.phan/config.php` also allows you to run
`phan` independently from the script.
#### Run options:
No option : Runs the minimum checks
Option 'full' : Runs all an extensive set of checks
Option '1' : Writes the baseline
Examples:
- `run-phan.sh` runs the default checks
- `run-phan.sh 1` updates the baseline for the default checks
- `run-phan.sh full` runs the extended checks
- `run-phan.sh full 1` updates the baseline for the extended checks
#### Baseline
The `baseline.txt` file in this directory defines the issues that are currently
excluded from the final report. In principle you should not add any more
exceptions to that file, but rather fix the issues or add [phan annotations]
that provide more information or to exclude specific cases.
#### Configuration
`config.php` : Default configuration file
`config_extended.php` : Configuration that enables more checks.
`baseline.txt` : Ignored issues (with `config.php`)
`baseline_extended.txt` : Ignored issues (with `config_extended.php`), not
currently in git
[phan]: https://github.com/phan/phan/wiki/Getting-Started
[phan annotations]: https://github.com/phan/phan/wiki/Annotating-Your-Source-Code

328
dev/tools/phan/baseline.txt Normal file
View File

@@ -0,0 +1,328 @@
<?php
/**
* This is an automatically generated baseline for Phan issues.
* When Phan is invoked with --load-baseline=path/to/baseline.php,
* The pre-existing issues listed in this file won't be emitted.
*
* This file can be updated by invoking Phan with --save-baseline=path/to/baseline.php
* (can be combined with --load-baseline)
*/
return [
// # Issue statistics:
// PhanPluginSuspiciousParamPosition : 160+ occurrences
// PhanPluginSuspiciousParamOrder : 130+ occurrences
// PhanParamSignatureMismatch : 45+ occurrences
// PhanPluginDuplicateIfStatements : 40+ occurrences
// PhanPluginDuplicateExpressionBinaryOp : 15+ occurrences
// PhanUndeclaredConstant : 15+ occurrences
// PhanUnreferencedUseNormal : 15+ occurrences
// PhanParamSuspiciousOrder : 10+ occurrences
// PhanPluginSuspiciousParamOrderInternal : 10+ occurrences
// PhanTypeArraySuspiciousNull : 10+ occurrences
// PhanTypeInvalidUnaryOperandNumeric : 10+ occurrences
// PhanRedefineFunctionInternal : 9 occurrences
// PhanPluginUnsafeEval : 7 occurrences
// PhanPluginDuplicateIfCondition : 6 occurrences
// PhanUndeclaredTypeParameter : 6 occurrences
// PhanParamTooMany : 4 occurrences
// PhanPluginDuplicateArrayKey : 4 occurrences
// PhanPluginInvalidPregRegexReplacement : 4 occurrences
// PhanUndeclaredFunctionInCallable : 4 occurrences
// PhanNoopArrayAccess : 2 occurrences
// PhanTypeMismatchForeach : 2 occurrences
// PhanAccessMethodProtected : 1 occurrence
// PhanAccessPropertyStaticAsNonStatic : 1 occurrence
// PhanNoopArray : 1 occurrence
// PhanNoopStringLiteral : 1 occurrence
// PhanParamTooFew : 1 occurrence
// PhanPowerOfZero : 1 occurrence
// PhanUnextractableAnnotationSuffix : 1 occurrence
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
'htdocs/accountancy/admin/account.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/accountancy/class/bookkeeping.class.php' => ['PhanUndeclaredTypeParameter'],
'htdocs/accountancy/class/lettering.class.php' => ['PhanParamSuspiciousOrder'],
'htdocs/accountancy/customer/lines.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/accountancy/customer/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/accountancy/expensereport/lines.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/accountancy/expensereport/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/accountancy/journal/sellsjournal.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/accountancy/supplier/lines.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/accountancy/supplier/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/adherents/card.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder'],
'htdocs/adherents/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/adherents/stats/geo.php' => ['PhanTypeArraySuspiciousNull'],
'htdocs/adherents/subscription.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/adherents/type.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/admin/agenda_extsites.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/admin/dict.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/admin/emailcollector_card.php' => ['PhanUnreferencedUseNormal'],
'htdocs/admin/mails_templates.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/admin/receiptprinter.php' => ['PhanRedefineFunctionInternal'],
'htdocs/admin/system/database.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/admin/system/modules.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/admin/tools/listevents.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/admin/translation.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/admin/triggers.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/api/class/api.class.php' => ['PhanUnreferencedUseNormal'],
'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanUnreferencedUseNormal'],
'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/bom/bom_list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected'],
'htdocs/categories/viewcat.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginSuspiciousParamOrder'],
'htdocs/collab/index.php' => ['PhanParamTooMany'],
'htdocs/comm/action/card.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder'],
'htdocs/comm/action/index.php' => ['PhanPluginSuspiciousParamPosition', 'PhanTypeArraySuspiciousNull', 'PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/comm/action/pertype.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/comm/action/peruser.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/comm/action/rapport/index.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/comm/mailing/advtargetemailing.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/comm/mailing/card.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamPosition'],
'htdocs/comm/mailing/cibles.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/comm/mailing/info.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/comm/propal/list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/commande/list.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder'],
'htdocs/commande/list_det.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/accounting-files.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/compta/bank/bankentries_list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/bank/various_payment/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/bank/various_payment/info.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanUndeclaredTypeParameter'],
'htdocs/compta/deplacement/class/deplacementstats.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/facture/card-rec.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/facture/card.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/compta/facture/class/facture.class.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/compta/facture/invoicetemplate_list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/facture/list.php' => ['PhanPluginDuplicateIfCondition', 'PhanPluginSuspiciousParamOrder'],
'htdocs/compta/facture/prelevement.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/paiement/cheque/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/paiement/class/paiement.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/compta/paiement/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/prelevement/card.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/prelevement/class/bonprelevement.class.php' => ['PhanParamTooMany'],
'htdocs/compta/prelevement/create.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/prelevement/fiche-rejet.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/sociales/class/paymentsocialcontribution.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/compta/sociales/document.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/sociales/info.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/sociales/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/sociales/note.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/compta/tva/document.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/tva/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/tva/payments.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/actions_massactions.inc.php' => ['PhanParamTooFew', 'PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/core/class/commondocgenerator.class.php' => ['PhanTypeArraySuspiciousNull'],
'htdocs/core/class/commonobject.class.php' => ['PhanPluginDuplicateIfCondition', 'PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamPosition'],
'htdocs/core/class/commonstickergenerator.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/class/dolreceiptprinter.class.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/class/evalmath.class.php' => ['PhanPluginUnsafeEval'],
'htdocs/core/class/html.form.class.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamPosition'],
'htdocs/core/class/html.formmail.class.php' => ['PhanNoopArray'],
'htdocs/core/class/rssparser.class.php' => ['PhanPluginDuplicateIfStatements', 'PhanUndeclaredFunctionInCallable'],
'htdocs/core/class/translate.class.php' => ['PhanTypeMismatchForeach'],
'htdocs/core/class/utils.class.php' => ['PhanPluginSuspiciousParamPosition', 'PhanUnextractableAnnotationSuffix'],
'htdocs/core/db/mysqli.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginDuplicateIfStatements'],
'htdocs/core/db/pgsql.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/db/sqlite3.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/get_info.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/lib/company.lib.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginDuplicateIfCondition','PhanDeprecatedFunctionInternal'],
'htdocs/core/lib/ftp.lib.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/core/lib/functions.lib.php' => ['PhanParamTooMany', 'PhanPluginDuplicateIfCondition', 'PhanPluginInvalidPregRegexReplacement', 'PhanPluginUnsafeEval', 'PhanRedefineFunctionInternal'],
'htdocs/core/lib/functions2.lib.php' => ['PhanParamSuspiciousOrder', 'PhanPluginUnsafeEval'],
'htdocs/core/lib/json.lib.php' => ['PhanPluginUnsafeEval', 'PhanRedefineFunctionInternal'],
'htdocs/core/lib/modulebuilder.lib.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/lib/usergroups.lib.php' => ['PhanNoopArrayAccess'],
'htdocs/core/lib/website.lib.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/login/functions_ldap.php' => ['PhanPluginSuspiciousParamOrderInternal'],
'htdocs/core/menus/standard/auguria_menu.php' => ['PhanParamSuspiciousOrder', 'PhanPluginDuplicateIfStatements'],
'htdocs/core/menus/standard/eldy_menu.php' => ['PhanParamSuspiciousOrder', 'PhanPluginDuplicateIfStatements'],
'htdocs/core/menus/standard/empty.php' => ['PhanParamSuspiciousOrder', 'PhanPluginDuplicateIfStatements'],
'htdocs/core/modules/bank/doc/pdf_ban.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredTypeParameter'],
'htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanUndeclaredTypeParameter'],
'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/expensereport/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/facture/doc/pdf_crabe.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal', 'PhanPluginSuspiciousParamPosition'],
'htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/hrm/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/modules/member/doc/pdf_standard.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/modules/movement/doc/pdf_standard.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal', 'PhanTypeArraySuspiciousNull'],
'htdocs/core/modules/oauth/generic_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/modules/oauth/google_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/modules/oauth/microsoft_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/modules/oauth/stripelive_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/modules/oauth/stripetest_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/project/doc/pdf_baleine.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/project/doc/pdf_beluga.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/project/doc/pdf_timespent.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
'htdocs/core/modules/rapport/pdf_paiement.class.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/core/modules/societe/modules_societe.class.php' => ['PhanPluginDuplicateIfCondition'],
'htdocs/core/modules/stock/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredTypeParameter'],
'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanParamSignatureMismatch', 'PhanParamSuspiciousOrder', 'PhanPluginDuplicateArrayKey'],
'htdocs/core/modules/syslog/mod_syslog_syslog.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/tpl/objectline_create.tpl.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/debugbar/class/DataCollector/DolPhpCollector.php' => ['PhanPowerOfZero'],
'htdocs/debugbar/class/DataCollector/DolQueryCollector.php' => ['PhanUnreferencedUseNormal'],
'htdocs/debugbar/class/DataCollector/DolibarrCollector.php' => ['PhanUnreferencedUseNormal'],
'htdocs/don/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/don/class/api_donations.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/don/class/don.class.php' => ['PhanParamTooMany', 'PhanPluginSuspiciousParamPosition'],
'htdocs/don/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/don/paiement/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/ecm/index_auto.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUnreferencedUseNormal'],
'htdocs/eventorganization/class/conferenceorbooth.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/expedition/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/expensereport/card.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/expensereport/class/expensereportstats.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/expensereport/payment/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/exports/export.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/exports/index.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/fichinter/card-rec.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/fichinter/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/fourn/commande/card.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/fourn/facture/card-rec.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/fourn/facture/card.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/fourn/facture/list-rec.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/fourn/facture/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/fourn/paiement/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/holiday/view_log.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/imports/import.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamPosition'],
'htdocs/imports/index.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/install/doctemplates/websites/website_template-corporate/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/install/doctemplates/websites/website_template-noimg/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/install/doctemplates/websites/website_template-restaurant/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/install/doctemplates/websites/website_template-stellar/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/install/fileconf.php' => ['PhanParamSuspiciousOrder'],
'htdocs/intracommreport/list.php' => ['PhanAccessPropertyStaticAsNonStatic'],
'htdocs/loan/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/loan/class/paymentloan.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/loan/document.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/loan/info.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/loan/note.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/loan/payment/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/loan/schedule.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/main.inc.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/margin/agentMargins.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/margin/checkMargins.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/margin/customerMargins.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/margin/productMargins.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/margin/tabs/thirdpartyMargins.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/master.inc.php' => ['PhanRedefineFunctionInternal'],
'htdocs/modulebuilder/index.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/mrp/class/mo.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/product/admin/product_tools.php' => ['PhanNoopStringLiteral'],
'htdocs/product/agenda.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/product/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/product/class/product.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/product/inventory/inventory.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/product/popuprop.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/product/price.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/product/stats/card.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/product/stats/commande.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stats/commande_fournisseur.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stats/contrat.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stats/facture.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stats/facture_fournisseur.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stats/facturerec.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stats/mo.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stats/propal.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stats/supplier_proposal.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stock/class/mouvementstock.class.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/product/stock/movement_list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/product/stock/product.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/product/stock/stats/commande_fournisseur.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stock/stats/expedition.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stock/stats/mo.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/product/stock/stats/reception.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/projet/list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/projet/tasks/list.php' => ['PhanTypeArraySuspiciousNull'],
'htdocs/projet/tasks/time.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/public/bookcal/index.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/public/opensurvey/index.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/public/payment/newpayment.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/public/recruitment/index.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanPluginSuspiciousParamOrderInternal'],
'htdocs/public/webportal/webportal.main.inc.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/public/website/index.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/reception/list.php' => ['PhanNoopArrayAccess', 'PhanPluginSuspiciousParamOrder'],
'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
'htdocs/salaries/class/salary.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/salaries/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/societe/class/companybankaccount.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/societe/class/societe.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/societe/list.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/societe/notify/card.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/societe/paymentmodes.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/societe/price.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/takepos/invoice.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/ticket/class/ticketstats.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/ticket/list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/user/agenda_extsites.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/user/bank.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/user/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/user/class/user.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/user/list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/user/notify/card.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/variants/class/ProductAttribute.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/webportal/controllers/default.controller.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/webportal/controllers/document.controller.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/webportal/controllers/invoicelist.controller.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/webportal/controllers/login.controller.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/webportal/controllers/membercard.controller.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/webportal/controllers/orderlist.controller.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/webportal/controllers/partnershipcard.controller.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/webportal/controllers/propallist.controller.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/website/class/website.class.php' => ['PhanPluginSuspiciousParamOrder', 'PhanTypeArraySuspiciousNull'],
'htdocs/website/index.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/website/samples/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/lib/json.lib.php' => ['PhanCompatibleNegativeStringOffset'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
];

387
dev/tools/phan/config.php Normal file
View File

@@ -0,0 +1,387 @@
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*/
define('DOL_PROJECT_ROOT', __DIR__.'/../../..');
define('DOL_DOCUMENT_ROOT', DOL_PROJECT_ROOT.'/htdocs');
define('PHAN_DIR', __DIR__);
/**
* This configuration will be read and overlaid on top of the
* default configuration. Command line arguments will be applied
* after this file is read.
*/
return [
// 'processes' => 6,
'backward_compatibility_checks' => false,
'simplify_ast' => true,
'analyzed_file_extensions' => ['php','inc'],
'globals_type_map' => [
'conf' => '\Conf',
'db' => '\DoliDB',
'extrafields' => '\ExtraFields',
'hookmanager' => '\HookManager',
'langs' => '\Translate',
'mysoc' => '\Societe',
'nblines' => '\int',
'user' => '\User',
],
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`, `'7.4'`, `null`.
// If this is set to `null`,
// then Phan assumes the PHP version which is closest to the minor version
// of the php executable used to execute Phan.
//"target_php_version" => null,
"target_php_version" => '8.2',
//"target_php_version" => '7.3',
//"target_php_version" => '5.6',
// A list of directories that should be parsed for class and
// method information. After excluding the directories
// defined in exclude_analysis_directory_list, the remaining
// files will be statically analyzed for errors.
//
// Thus, both first-party and third-party code being used by
// your application should be included in this list.
'directory_list' => [
'htdocs',
PHAN_DIR . '/stubs/',
],
// A directory list that defines files that will be excluded
// from static analysis, but whose class and method
// information should be included.
//
// Generally, you'll want to include the directories for
// third-party code (such as "vendor/") in this list.
//
// n.b.: If you'd like to parse but not analyze 3rd
// party code, directories containing that code
// should be added to the `directory_list` as
// to `exclude_analysis_directory_list`.
"exclude_analysis_directory_list" => [
'htdocs/includes/',
'htdocs/core/class/lessc.class.php', // External library
PHAN_DIR . '/stubs/',
],
//'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@',
'exclude_file_regex' => '@^(' // @phpstan-ignore-line
.'dummy' // @phpstan-ignore-line
.'|htdocs/.*/canvas/.*/tpl/.*.tpl.php' // @phpstan-ignore-line
.'|htdocs/modulebuilder/template/.*' // @phpstan-ignore-line
// Included as stub (old version + incompatible typing hints)
.'|htdocs/includes/restler/.*' // @phpstan-ignore-line
// Included as stub (did not seem properly analysed by phan without it)
.'|htdocs/includes/stripe/.*' // @phpstan-ignore-line
.')@', // @phpstan-ignore-line
// A list of plugin files to execute.
// Plugins which are bundled with Phan can be added here by providing their name
// (e.g. 'AlwaysReturnPlugin')
//
// Documentation about available bundled plugins can be found
// at https://github.com/phan/phan/tree/master/.phan/plugins
//
// Alternately, you can pass in the full path to a PHP file
// with the plugin's implementation (e.g. 'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php')
'plugins' => [
// checks if a function, closure or method unconditionally returns.
// can also be written as 'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php'
//'DeprecateAliasPlugin',
//'EmptyMethodAndFunctionPlugin',
'InvalidVariableIssetPlugin',
//'MoreSpecificElementTypePlugin',
'NoAssertPlugin',
'NotFullyQualifiedUsagePlugin',
//'PHPDocRedundantPlugin',
'PHPUnitNotDeadCodePlugin',
//'PossiblyStaticMethodPlugin',
'PreferNamespaceUsePlugin',
'PrintfCheckerPlugin',
'RedundantAssignmentPlugin',
'ConstantVariablePlugin', // Warns about values that are actually constant
//'HasPHPDocPlugin', // Requires PHPDoc
'InlineHTMLPlugin', // html in PHP file, or at end of file
//'NonBoolBranchPlugin', // Requires test on bool, nont on ints
//'NonBoolInLogicalArithPlugin',
'NumericalComparisonPlugin',
//'PHPDocToRealTypesPlugin',
'PHPDocInWrongCommentPlugin', // Missing /** (/* was used)
//'ShortArrayPlugin', // Checks that [] is used
//'StrictLiteralComparisonPlugin',
'UnknownClassElementAccessPlugin',
'UnknownElementTypePlugin',
'WhitespacePlugin',
//'RemoveDebugStatementPlugin', // Reports echo, print, ...
//'SimplifyExpressionPlugin',
//'StrictComparisonPlugin', // Expects ===
'SuspiciousParamOrderPlugin',
'UnsafeCodePlugin',
//'UnusedSuppressionPlugin',
'AlwaysReturnPlugin',
//'DollarDollarPlugin',
'DuplicateArrayKeyPlugin',
'DuplicateExpressionPlugin',
'PregRegexCheckerPlugin',
'PrintfCheckerPlugin',
'SleepCheckerPlugin',
// Checks for syntactically unreachable statements in
// the global scope or function bodies.
'UnreachableCodePlugin',
'UseReturnValuePlugin',
'EmptyStatementListPlugin',
'LoopVariableReusePlugin',
],
// Add any issue types (such as 'PhanUndeclaredMethod')
// here to inhibit them from being reported
'suppress_issue_types' => [
// Dolibarr uses a lot of internal deprecated stuff, not reporting
'PhanDeprecatedProperty',
'PhanDeprecatedFunction',
// Dolibarr has quite a few strange noop assignments like $abc=$abc;
'PhanPluginDuplicateExpressionAssignment',
// Nulls are likely mostly false positives
'PhanPluginConstantVariableNull',
'PhanTypeObjectUnsetDeclaredProperty',
// 'PhanPluginComparisonNotStrictForScalar',
'PhanPluginNonBoolBranch',
'PhanPluginShortArray',
'PhanPluginNumericalComparison',
'PhanPluginUnknownObjectMethodCall',
'PhanPluginCanUseParamType',
'PhanPluginNonBoolInLogicalArith',
'PhanPluginCanUseReturnType',
// 'PhanPluginNotFullyQualifiedFunctionCall',
'PhanPluginConstantVariableScalar',
// 'PhanPluginNoCommentOnPublicProperty',
'PhanPluginUnknownPropertyType',
// 'PhanPluginUnknownMethodParamType',
// 'PhanPluginNotFullyQualifiedOptimizableFunctionCall',
// 'PhanPluginUnknownMethodReturnType',
'PhanPluginUnknownArrayMethodParamType',
'PhanPluginWhitespaceTab', // Dolibarr uses tabs
'PhanPluginWhitespaceTrailing', // Should be handled by other tools
// 'PhanPluginCanUsePHP71Void',
'PhanPluginUnknownArrayMethodReturnType',
'PhanTypeMismatchArgumentInternal',
'PhanPluginDuplicateAdjacentStatement',
'PhanPluginCanUseNullableParamType',
'PhanTypeInvalidLeftOperandOfNumericOp',
'PhanTypeMismatchProperty',
// 'PhanPluginNoCommentOnPublicMethod',
'PhanRedefinedClassReference',
// 'PhanPluginNoCommentOnClass',
// 'PhanPluginNotFullyQualifiedGlobalConstant',
'PhanTypeMismatchDefault',
// 'PhanPluginPHPDocHashComment',
'PhanPluginShortArrayList',
'PhanPluginUnknownArrayPropertyType',
'PhanTypeInvalidDimOffset',
// 'PhanPluginNoCommentOnProtectedProperty',
// 'PhanPluginDescriptionlessCommentOnPublicMethod',
'PhanPluginUnknownClosureParamType',
'PhanPluginUnknownClosureReturnType',
// 'PhanPluginNoCommentOnProtectedMethod',
'PhanTypeArraySuspicious',
'PhanTypeMismatchPropertyProbablyReal',
// 'PhanPluginNoCommentOnPrivateMethod',
'PhanPluginUnknownArrayFunctionReturnType',
'PhanTypeInvalidLeftOperandOfAdd',
// 'PhanPluginNoCommentOnPrivateProperty',
// 'PhanPluginNoCommentOnFunction',
'PhanPluginCanUseNullableReturnType',
'PhanPluginUnknownArrayFunctionParamType',
// 'PhanPluginDescriptionlessCommentOnPublicProperty',
'PhanPluginUnknownFunctionParamType',
'PhanTypeSuspiciousStringExpression',
'PhanPluginRedundantAssignment',
'PhanTypeExpectedObjectPropAccess',
'PhanTypeInvalidRightOperandOfNumericOp',
'PhanPluginInlineHTML',
// 'PhanPluginUnknownFunctionReturnType',
// 'PhanPluginDescriptionlessCommentOnProtectedProperty',
'PhanPluginRedundantAssignmentInGlobalScope',
'PhanTypeMismatchDeclaredParamNullable',
'PhanTypeInvalidRightOperandOfAdd',
// 'PhanPluginDescriptionlessCommentOnPrivateProperty',
'PhanUndeclaredVariableDim', // Array initialisation on undeclared var: $abc['x']='ab'
'PhanTypeInvalidPropertyName',
'PhanPluginDuplicateCatchStatementBody',
'PhanPluginUndeclaredVariableIsset',
'PhanTypeInvalidUnaryOperandIncOrDec',
// 'PhanPluginDescriptionlessCommentOnClass',
'PhanPluginEmptyStatementIf',
'PhanPluginInlineHTMLTrailing',
// 'PhanUndeclaredStaticMethod',
// 'PhanPluginDescriptionlessCommentOnPrivateMethod',
'PhanPluginPrintfIncompatibleArgumentType',
'PhanPossiblyNullTypeMismatchProperty',
'PhanRedefineClass',
'PhanRedefineFunction',
'PhanTypeInvalidLeftOperandOfBitwiseOp',
'PhanTypeMismatchDimAssignment',
// 'PhanPluginDescriptionlessCommentOnProtectedMethod',
'PhanPluginPrintfIncompatibleArgumentTypeWeak',
'PhanUndeclaredVariableAssignOp',
'PhanTypeExpectedObjectOrClassName',
'PhanEmptyFQSENInClasslike',
'PhanTypeMismatchArgumentInternalReal',
// 'PhanUnextractableAnnotationElementName',
// 'PhanCommentParamWithoutRealParam',
// 'PhanRedefinedExtendedClass',
'PhanTypeComparisonFromArray',
'PhanPluginConstantVariableBool',
'PhanPluginPrintfVariableFormatString',
'PhanTypeMismatchDimFetch',
'PhanTypeMismatchDimFetchNullable',
'PhanTypeSuspiciousNonTraversableForeach',
'PhanEmptyForeach',
'PhanTypeInvalidRightOperandOfBitwiseOp',
'PhanPluginDuplicateConditionalUnnecessary',
// 'PhanTraitParentReference',
'PhanPluginBothLiteralsBinaryOp',
// 'PhanTypeMismatchDeclaredParam',
// 'PhanCommentDuplicateMagicMethod',
'PhanParamSpecial1',
'PhanPluginInlineHTMLLeading',
'PhanPluginUseReturnValueInternalKnown',
'PhanRedefinedInheritedInterface',
'PhanTypeComparisonToArray',
'PhanTypeConversionFromArray',
// 'PhanTypeInvalidLeftOperandOfIntegerOp',
'PhanTypeMismatchArgumentInternalProbablyReal',
'PhanTypeMismatchBitwiseBinaryOperands',
'PhanTypeMismatchDimEmpty',
'PhanTypeSuspiciousEcho',
'PhanNoopBinaryOperator',
// 'PhanTypeInvalidBitwiseBinaryOperator',
// 'PhanPluginDescriptionlessCommentOnFunction',
'PhanPluginPHPDocInWrongComment',
'PhanRedefineClassInternal',
// 'PhanTypeInvalidThrowsIsInterface',
'PhanPluginRedundantAssignmentInLoop',
// 'PhanInvalidCommentForDeclarationType',
'PhanParamSignatureMismatchInternal',
// 'PhanPluginEmptyStatementForeachLoop',
// 'PhanCompatibleDimAlternativeSyntax',
'PhanInvalidFQSENInClasslike',
// 'PhanMismatchVariadicComment',
// 'PhanNoopConstant',
// 'PhanPluginUnknownArrayClosureParamType',
// 'PhanTypeInstantiateAbstractStatic',
'PhanEmptyForeachBody',
// 'PhanPluginEmptyStatementWhileLoop',
// 'PhanSyntaxReturnValueInVoid',
// 'PhanTypeInstantiateTraitStaticOrSelf',
// 'PhanUndeclaredInvokeInCallable',
'PhanNoopProperty',
'PhanNoopVariable',
// 'PhanPluginPrintfUnusedArgument',
// 'PhanSyntaxReturnExpectedValue',
// 'PhanAccessClassInternal',
// 'PhanCompatibleAccessMethodOnTraitDefinition',
// 'PhanNoopSwitchCases',
// 'PhanNoopTernary',
'PhanNoopUnaryOperator',
// 'PhanParamNameIndicatingUnusedInClosure',
// 'PhanParamSignatureRealMismatchTooFewParametersInternal',
// 'PhanPluginEmptyStatementSwitch',
'PhanPossiblyUnsetPropertyOfThis',
// 'PhanTypeInvalidLeftOperand',
// 'PhanTypeInvalidRightOperand',
// 'PhanTypeInvalidRightOperandOfIntegerOp',
'PhanTypeMismatchArgumentReal',
// 'PhanTypeMismatchDeclaredReturnNullable',
// 'PhanUndeclaredThis',
'PhanPluginMixedKeyNoKey',
'PhanPluginDuplicateConditionalNullCoalescing', // Suggests to optimize to ??
//'PhanUnreferencedClosure', // False positives seen with closures in arrays, TODO: move closure checks closer to what is done by unused variable plugin
//'PhanPluginNoCommentOnProtectedMethod',
//'PhanPluginDescriptionlessCommentOnProtectedMethod',
//'PhanPluginNoCommentOnPrivateMethod',
//'PhanPluginDescriptionlessCommentOnPrivateMethod',
//'PhanPluginDescriptionlessCommentOnPrivateProperty',
// TODO: Fix edge cases in --automatic-fix for PhanPluginRedundantClosureComment
//'PhanPluginRedundantClosureComment',
// 'PhanPluginPossiblyStaticPublicMethod',
//'PhanPluginPossiblyStaticProtectedMethod',
// The types of ast\Node->children are all possibly unset.
'PhanTypePossiblyInvalidDimOffset', // Also checks optional array keys and requires that they are checked for existence.
'PhanUndeclaredGlobalVariable',
'PhanUndeclaredProperty',
'PhanPluginPrintfNotPercent',
'PhanPossiblyUndeclaredGlobalVariable',
// 'PhanPluginPossiblyStaticProtectedMethod',
'PhanTypeMismatchReturn',
// 'PhanPluginMoreSpecificActualReturnType',
'PhanTypeMismatchReturnProbablyReal',
'PhanPossiblyUndeclaredVariable',
'PhanTypeMismatchArgument',
//'PhanPluginUnreachableCode',
//'PhanTypeMismatchArgumentInternal',
//'PhanPluginAlwaysReturnMethod',
'PhanUndeclaredClassMethod',
'PhanUndeclaredMethod',
'PhanTypeMismatchArgumentProbablyReal',
'PhanPluginDuplicateExpressionAssignmentOperation',
'PhanTypeMismatchPropertyDefault',
// 'PhanPluginAlwaysReturnMethod',
// 'PhanPluginMissingReturnMethod',
'PhanUndeclaredTypeReturnType',
'PhanUndeclaredClassProperty',
'PhanTypeArraySuspiciousNullable',
// 'PhanPluginInconsistentReturnMethod',
'PhanTypeExpectedObjectPropAccessButGotNull',
// 'PhanUndeclaredClassAttribute',
'PhanNonClassMethodCall',
// 'PhanPluginNoAssert',
'PhanTypeMismatchReturnSuperType',
'PhanTypeMismatchArgumentSuperType',
'PhanPluginDuplicateConditionalTernaryDuplication',
],
// You can put relative paths to internal stubs in this config option.
// Phan will continue using its detailed type annotations,
// but load the constants, classes, functions, and classes (and their Reflection types)
// from these stub files (doubling as valid php files).
// Use a different extension from php (and preferably a separate folder)
// to avoid accidentally parsing these as PHP (includes projects depending on this).
// The 'mkstubs' script can be used to generate your own stubs (compatible with php 7.0+ right now)
// Note: The array key must be the same as the extension name reported by `php -m`,
// so that phan can skip loading the stubs if the extension is actually available.
'autoload_internal_extension_signatures' => [
// Stubs may be available at https://github.com/JetBrains/phpstorm-stubs/tree/master
// Xdebug stubs are bundled with Phan 0.10.1+/0.8.9+ for usage,
// because Phan disables xdebug by default.
//'xdebug' => 'vendor/phan/phan/.phan/internal_stubs/xdebug.phan_php',
//'memcached' => PHAN_DIR . '/your_internal_stubs_folder_name/memcached.phan_php',
//'PDO' => PHAN_DIR . '/stubs/PDO.phan_php',
'brotli' => PHAN_DIR . '/stubs/brotli.phan_php',
'curl' => PHAN_DIR . '/stubs/curl.phan_php',
'calendar' => PHAN_DIR . '/stubs/calendar.phan_php',
'fileinfo' => PHAN_DIR . '/stubs/fileinfo.phan_php',
'ftp' => PHAN_DIR . '/stubs/ftp.phan_php',
'gd' => PHAN_DIR . '/stubs/gd.phan_php',
'geoip' => PHAN_DIR . '/stubs/geoip.phan_php',
'imap' => PHAN_DIR . '/stubs/imap.phan_php',
'intl' => PHAN_DIR . '/stubs/intl.phan_php',
'ldap' => PHAN_DIR . '/stubs/ldap.phan_php',
'mcrypt' => PHAN_DIR . '/stubs/mcrypt.phan_php',
'memcache' => PHAN_DIR . '/stubs/memcache.phan_php',
'mysqli' => PHAN_DIR . '/stubs/mysqli.phan_php',
'pdo_cubrid' => PHAN_DIR . '/stubs/pdo_cubrid.phan_php',
'pdo_mysql' => PHAN_DIR . '/stubs/pdo_mysql.phan_php',
'pdo_pgsql' => PHAN_DIR . '/stubs/pdo_pgsql.phan_php',
'pdo_sqlite' => PHAN_DIR . '/stubs/pdo_sqlite.phan_php',
'pgsql' => PHAN_DIR . '/stubs/pgsql.phan_php',
'session' => PHAN_DIR . '/stubs/session.phan_php',
'simplexml' => PHAN_DIR . '/stubs/SimpleXML.phan_php',
'soap' => PHAN_DIR . '/stubs/soap.phan_php',
'sockets' => PHAN_DIR . '/stubs/sockets.phan_php',
'zip' => PHAN_DIR . '/stubs/zip.phan_php',
],
];

View File

@@ -0,0 +1,196 @@
<?php
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*/
define('DOL_PROJECT_ROOT', __DIR__.'/../../..');
define('DOL_DOCUMENT_ROOT', DOL_PROJECT_ROOT.'/htdocs');
define('PHAN_DIR', __DIR__);
/**
* This configuration will be read and overlaid on top of the
* default configuration. Command line arguments will be applied
* after this file is read.
*/
return [
// 'processes' => 6,
'backward_compatibility_checks' => false,
'simplify_ast' => true,
'analyzed_file_extensions' => ['php','inc'],
'globals_type_map' => [
'conf' => '\Conf',
'db' => '\DoliDB',
'extrafields' => '\ExtraFields',
'hookmanager' => '\HookManager',
'langs' => '\Translate',
'mysoc' => '\Societe',
'nblines' => '\int',
'user' => '\User',
],
// Supported values: `'5.6'`, `'7.0'`, `'7.1'`, `'7.2'`, `'7.3'`, `'7.4'`, `null`.
// If this is set to `null`,
// then Phan assumes the PHP version which is closest to the minor version
// of the php executable used to execute Phan.
//"target_php_version" => null,
"target_php_version" => '8.2',
//"target_php_version" => '7.3',
//"target_php_version" => '5.6',
// A list of directories that should be parsed for class and
// method information. After excluding the directories
// defined in exclude_analysis_directory_list, the remaining
// files will be statically analyzed for errors.
//
// Thus, both first-party and third-party code being used by
// your application should be included in this list.
'directory_list' => [
'htdocs',
PHAN_DIR . '/stubs/',
],
// A directory list that defines files that will be excluded
// from static analysis, but whose class and method
// information should be included.
//
// Generally, you'll want to include the directories for
// third-party code (such as "vendor/") in this list.
//
// n.b.: If you'd like to parse but not analyze 3rd
// party code, directories containing that code
// should be added to the `directory_list` as
// to `exclude_analysis_directory_list`.
"exclude_analysis_directory_list" => [
'htdocs/includes/',
'htdocs/core/class/lessc.class.php', // External library
PHAN_DIR . '/stubs/',
],
//'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@',
'exclude_file_regex' => '@^(' // @phpstan-ignore-line
.'dummy' // @phpstan-ignore-line
.'|htdocs/.*/canvas/.*/tpl/.*.tpl.php' // @phpstan-ignore-line
.'|htdocs/modulebuilder/template/.*' // @phpstan-ignore-line
// Included as stub (old version + incompatible typing hints)
.'|htdocs/includes/restler/.*' // @phpstan-ignore-line
// Included as stub (did not seem properly analysed by phan without it)
.'|htdocs/includes/stripe/.*' // @phpstan-ignore-line
.')@', // @phpstan-ignore-line
// A list of plugin files to execute.
// Plugins which are bundled with Phan can be added here by providing their name
// (e.g. 'AlwaysReturnPlugin')
//
// Documentation about available bundled plugins can be found
// at https://github.com/phan/phan/tree/master/.phan/plugins
//
// Alternately, you can pass in the full path to a PHP file
// with the plugin's implementation (e.g. 'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php')
'plugins' => [
'DeprecateAliasPlugin',
//'EmptyMethodAndFunctionPlugin',
'InvalidVariableIssetPlugin',
//'MoreSpecificElementTypePlugin',
'NoAssertPlugin',
'NotFullyQualifiedUsagePlugin',
'PHPDocRedundantPlugin',
'PHPUnitNotDeadCodePlugin',
//'PossiblyStaticMethodPlugin',
'PreferNamespaceUsePlugin',
'PrintfCheckerPlugin',
'RedundantAssignmentPlugin',
'ConstantVariablePlugin', // Warns about values that are actually constant
//'HasPHPDocPlugin', // Requires PHPDoc
'InlineHTMLPlugin', // html in PHP file, or at end of file
'NonBoolBranchPlugin', // Requires test on bool, nont on ints
'NonBoolInLogicalArithPlugin',
'NumericalComparisonPlugin',
'PHPDocToRealTypesPlugin',
'PHPDocInWrongCommentPlugin', // Missing /** (/* was used)
//'ShortArrayPlugin', // Checks that [] is used
//'StrictLiteralComparisonPlugin',
'UnknownClassElementAccessPlugin',
'UnknownElementTypePlugin',
'WhitespacePlugin',
//'RemoveDebugStatementPlugin', // Reports echo, print, ...
'SimplifyExpressionPlugin',
//'StrictComparisonPlugin', // Expects ===
'SuspiciousParamOrderPlugin',
'UnsafeCodePlugin',
//'UnusedSuppressionPlugin',
'AlwaysReturnPlugin',
//'DollarDollarPlugin',
'DuplicateArrayKeyPlugin',
'DuplicateExpressionPlugin',
'PregRegexCheckerPlugin',
'PrintfCheckerPlugin',
'SleepCheckerPlugin',
// Checks for syntactically unreachable statements in
// the global scope or function bodies.
'UnreachableCodePlugin',
'UseReturnValuePlugin',
'EmptyStatementListPlugin',
'LoopVariableReusePlugin',
],
// Add any issue types (such as 'PhanUndeclaredMethod')
// here to inhibit them from being reported
'suppress_issue_types' => [
'PhanPluginWhitespaceTab', // Dolibarr used tabs
'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility
'PhanPluginShortArray', // Dolibarr uses array()
'PhanPluginShortArrayList', // Dolibarr uses array()
// The following may require that --quick is not used
'PhanPluginCanUseParamType', // Does not seem useful: is reporting types already in PHPDoc?
'PhanPluginCanUseReturnType', // Does not seem useful: is reporting types already in PHPDoc?
'PhanPluginCanUseNullableParamType', // Does not seem useful: is reporting types already in PHPDoc?
'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences
'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences
'PhanTypeMismatchArgument', // Not essential - 12300+ occurrences
'PhanPluginNonBoolInLogicalArith', // Not essential - 11040+ occurrences
'PhanPluginConstantVariableScalar', // Not essential - 5180+ occurrences
'PhanPluginDuplicateConditionalTernaryDuplication', // 2750+ occurrences
'PhanPluginDuplicateConditionalNullCoalescing', // Not essential - 990+ occurrences
],
// You can put relative paths to internal stubs in this config option.
// Phan will continue using its detailed type annotations,
// but load the constants, classes, functions, and classes (and their Reflection types)
// from these stub files (doubling as valid php files).
// Use a different extension from php (and preferably a separate folder)
// to avoid accidentally parsing these as PHP (includes projects depending on this).
// The 'mkstubs' script can be used to generate your own stubs (compatible with php 7.0+ right now)
// Note: The array key must be the same as the extension name reported by `php -m`,
// so that phan can skip loading the stubs if the extension is actually available.
'autoload_internal_extension_signatures' => [
// Stubs may be available at https://github.com/JetBrains/phpstorm-stubs/tree/master
// Xdebug stubs are bundled with Phan 0.10.1+/0.8.9+ for usage,
// because Phan disables xdebug by default.
//'xdebug' => 'vendor/phan/phan/.phan/internal_stubs/xdebug.phan_php',
//'memcached' => PHAN_DIR . '/your_internal_stubs_folder_name/memcached.phan_php',
//'PDO' => PHAN_DIR . '/stubs/PDO.phan_php',
'brotli' => PHAN_DIR . '/stubs/brotli.phan_php',
'curl' => PHAN_DIR . '/stubs/curl.phan_php',
'calendar' => PHAN_DIR . '/stubs/calendar.phan_php',
'fileinfo' => PHAN_DIR . '/stubs/fileinfo.phan_php',
'ftp' => PHAN_DIR . '/stubs/ftp.phan_php',
'gd' => PHAN_DIR . '/stubs/gd.phan_php',
'geoip' => PHAN_DIR . '/stubs/geoip.phan_php',
'imap' => PHAN_DIR . '/stubs/imap.phan_php',
'intl' => PHAN_DIR . '/stubs/intl.phan_php',
'ldap' => PHAN_DIR . '/stubs/ldap.phan_php',
'mcrypt' => PHAN_DIR . '/stubs/mcrypt.phan_php',
'memcache' => PHAN_DIR . '/stubs/memcache.phan_php',
'mysqli' => PHAN_DIR . '/stubs/mysqli.phan_php',
'pdo_cubrid' => PHAN_DIR . '/stubs/pdo_cubrid.phan_php',
'pdo_mysql' => PHAN_DIR . '/stubs/pdo_mysql.phan_php',
'pdo_pgsql' => PHAN_DIR . '/stubs/pdo_pgsql.phan_php',
'pdo_sqlite' => PHAN_DIR . '/stubs/pdo_sqlite.phan_php',
'pgsql' => PHAN_DIR . '/stubs/pgsql.phan_php',
'session' => PHAN_DIR . '/stubs/session.phan_php',
'simplexml' => PHAN_DIR . '/stubs/SimpleXML.phan_php',
'soap' => PHAN_DIR . '/stubs/soap.phan_php',
'sockets' => PHAN_DIR . '/stubs/sockets.phan_php',
'zip' => PHAN_DIR . '/stubs/zip.phan_php',
],
];

99
dev/tools/phan/run-phan.sh Executable file
View File

@@ -0,0 +1,99 @@
#!/bin/bash -xv
# Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
#
# Usage:
# Optionally set COMPOSER_CMD to allow running composer.
# Optionally point COMPOSER_VENDOR_DIR to your vendor path for composer.
#
# Run phan by calling this script:
# ./run-phan.sh # Only checks
# ./run-phan.sh 1 # Regenerate the baseline.txt file
#
# You can run this from the root directory of dolibarr
# dev/tools/run-phan.sh
#
# You can provide the environment variables on the CLI like this:
# COMPOSER_CMD="php ~/composer.phar" COMPOSER_VENDOR_DIR="~/vendor" ./run-phan.sh
#
# or export them:
# export COMPOSER_CMD="~/composer.phar"
# export COMPOSER_VENDOR_DIR="~/vendor"
# ./run-phan.sh
#
# Or some other method
#
#
MYDIR=$(dirname "$(realpath "$0")")
PROJECT_DIR=$(realpath "${MYDIR}/../../..")
if [[ $(uname) = CYGWIN* ]] ; then
MYDIR="$(cygpath -w "$MYDIR")"
PROJECT_DIR="$(cygpath -w "$PROJECT_DIR")"
fi
BASELINE=${MYDIR}/baseline.txt
PHAN_CONFIG=${PHAN_CONFIG:=${MYDIR}/config.php}
export COMPOSER_VENDOR_DIR=${COMPOSER_VENDOR_DIR:=$MYDIR/vendor}
COMPOSER_CMD=${COMPOSER_CMD:=${MYDIR}/../composer.phar}
PHAN=${COMPOSER_VENDOR_DIR}/bin/phan
PHP=${PHP:=php${MINPHPVERSION}}
# Check if we should use the extended configuration
if [ "$1" = "full" ] ; then
shift
PHAN_CONFIG=${MYDIR}/config_extended.php
BASELINE=${MYDIR}/baseline_extended.txt
fi
if [ "$1" = "1" ] ; then
shift
BASELINE_OPT=(--save-baseline "${BASELINE}")
elif [ -r "${BASELINE}" ] ; then
BASELINE_OPT=(--load-baseline "${BASELINE}")
fi
export BASELINE_OPT
echo "***** $(basename "$0") *****"
if [ ! -x "${PHAN}" ] && [ "$(which phan 2>/dev/null)" != "" ] ; then
PHAN=phan
fi
if [ ! -x "${PHAN}" ] ; then
#
# Check composer is available
#
if [ ! -r "${COMPOSER_CMD}" ] ; then
echo composer is not available. Provide the path by setting COMPOSER_CMD=/path/to/composer
echo Example: export COMPOSER_CMD="~/composer.phar"
echo Example: export COMPOSER_CMD="/usr/local/bin/composer"
exit 1
fi
#
# Install/update phan
#
echo Install phan
if [ ! -r "${PHAN}" ] ; then
# shellcheck disable=2086
[[ ! -e "${COMPOSER_VENDOR_DIR}" ]] && "${PHP}" ${COMPOSER_CMD} install
# shellcheck disable=2086
[[ -e "${COMPOSER_VENDOR_DIR}" ]] && "${PHP}" ${COMPOSER_CMD} update
"${PHP}" "${COMPOSER_CMD}" require --dev phan/phan
echo
fi
fi
(
echo "cd '${PROJECT_DIR}'"
cd "${PROJECT_DIR}" || exit
echo "\"${PHAN}\" --analyze-twice --config-file \"${PHAN_CONFIG}\" --memory-limit 4096M ${BASELINE_OPT}""$*"
# shellcheck disable=2086,2090
"${PHAN}" --analyze-twice --config-file "${PHAN_CONFIG}" --memory-limit 4096M "${BASELINE_OPT[@]}" "$@"
)

27
dev/tools/phan/runPhanDocker.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Script compatible with Cygwin
# When argument is '1', save baseline
#
# Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
MYPATH=$(realpath "$(dirname "$(readlink -f "$0")")/../../..")
if [[ $(uname) = CYGWIN* ]] ; then
MYPATH="$(cygpath -w "$MYPATH")"
fi
# BASELINE_PATH=.phan/baseline.txt
CONFIG_PATH=dev/tools/phan/config.php
BASELINE_PATH=dev/tools/phan/baseline.txt
# When full is provided as an argument,
# still use the baseline, but verify all
# rules.
if [ "$1" = "full" ] || [ "$2" = "full" ] ; then
CONFIG_PATH=dev/tools/phan/config_extended.php
fi
if [ "$1" = "1" ] ; then
docker run -v "$MYPATH:/mnt/src" phanphp/phan:latest -k /mnt/src/${CONFIG_PATH} --analyze-twice --save-baseline /mnt/src/${BASELINE_PATH}
else
docker run -v "$MYPATH:/mnt/src" phanphp/phan:latest -k /mnt/src/${CONFIG_PATH} -B /mnt/src/${BASELINE_PATH} --analyze-twice
fi

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,43 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension SimpleXML@7.4.12
namespace {
class SimpleXMLElement implements \Traversable, \Countable {
// methods
final public function __construct($data, $options = null, $data_is_url = null, $ns = null, $is_prefix = null) {}
public function asXML($filename = null) {}
public function saveXML($filename = null) {}
public function xpath($path) {}
public function registerXPathNamespace($prefix, $ns) {}
public function attributes($ns = null, $is_prefix = null) {}
public function children($ns = null, $is_prefix = null) {}
public function getNamespaces($recursve = null) {}
public function getDocNamespaces($recursve = null, $from_root = null) {}
public function getName() {}
public function addChild($name, $value = null, $ns = null) {}
public function addAttribute($name, $value = null, $ns = null) {}
public function __toString() {}
public function count() {}
}
class SimpleXMLIterator extends \SimpleXMLElement implements \RecursiveIterator, \Iterator {
// properties
public $name;
// methods
public function rewind() {}
public function valid() {}
public function current() {}
public function key() {}
public function next() {}
public function hasChildren() {}
public function getChildren() {}
}
function simplexml_import_dom($node, $class_name = null) {}
function simplexml_load_file($filename, $class_name = null, $options = null, $ns = null, $is_prefix = null) {}
function simplexml_load_string($data, $class_name = null, $options = null, $ns = null, $is_prefix = null) {}
}

View File

@@ -0,0 +1,29 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension brotli@0.14.2
namespace {
function brotli_compress($data, $quality = null, $mode = null) {}
function brotli_compress_add($context, $data, $mode = null) {}
function brotli_compress_init($quality = null, $mode = null) {}
function brotli_uncompress($data, $max = null) {}
function brotli_uncompress_add($context, $data, $mode = null) {}
function brotli_uncompress_init() {}
const BROTLI_COMPRESS_LEVEL_DEFAULT = 11;
const BROTLI_COMPRESS_LEVEL_MAX = 11;
const BROTLI_COMPRESS_LEVEL_MIN = 0;
const BROTLI_FINISH = 2;
const BROTLI_FONT = 2;
const BROTLI_GENERIC = 0;
const BROTLI_PROCESS = 0;
const BROTLI_TEXT = 1;
}
namespace brotli {
function compress($data, $quality = null, $mode = null) {}
function compress_add($context, $data, $mode = null) {}
function compress_init($quality = null, $mode = null) {}
function uncompress($data, $max = null) {}
function uncompress_add($context, $data, $mode = null) {}
function uncompress_init() {}
}

View File

@@ -0,0 +1,45 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension calendar@8.2.9
namespace {
function cal_days_in_month(int $calendar, int $month, int $year) : int {}
function cal_from_jd(int $julian_day, int $calendar) : array {}
function cal_info(int $calendar = -1) : array {}
function cal_to_jd(int $calendar, int $month, int $day, int $year) : int {}
function easter_date(?int $year = null, int $mode = \CAL_EASTER_DEFAULT) : int {}
function easter_days(?int $year = null, int $mode = \CAL_EASTER_DEFAULT) : int {}
function frenchtojd(int $month, int $day, int $year) : int {}
function gregoriantojd(int $month, int $day, int $year) : int {}
function jddayofweek(int $julian_day, int $mode = \CAL_DOW_DAYNO) : int|string {}
function jdmonthname(int $julian_day, int $mode) : string {}
function jdtofrench(int $julian_day) : string {}
function jdtogregorian(int $julian_day) : string {}
function jdtojewish(int $julian_day, bool $hebrew = false, int $flags = 0) : string {}
function jdtojulian(int $julian_day) : string {}
function jdtounix(int $julian_day) : int {}
function jewishtojd(int $month, int $day, int $year) : int {}
function juliantojd(int $month, int $day, int $year) : int {}
function unixtojd(?int $timestamp = null) : false|int {}
const CAL_DOW_DAYNO = 0;
const CAL_DOW_LONG = 1;
const CAL_DOW_SHORT = 2;
const CAL_EASTER_ALWAYS_GREGORIAN = 2;
const CAL_EASTER_ALWAYS_JULIAN = 3;
const CAL_EASTER_DEFAULT = 0;
const CAL_EASTER_ROMAN = 1;
const CAL_FRENCH = 3;
const CAL_GREGORIAN = 0;
const CAL_JEWISH = 2;
const CAL_JEWISH_ADD_ALAFIM = 4;
const CAL_JEWISH_ADD_ALAFIM_GERESH = 2;
const CAL_JEWISH_ADD_GERESHAYIM = 8;
const CAL_JULIAN = 1;
const CAL_MONTH_FRENCH = 5;
const CAL_MONTH_GREGORIAN_LONG = 1;
const CAL_MONTH_GREGORIAN_SHORT = 0;
const CAL_MONTH_JEWISH = 4;
const CAL_MONTH_JULIAN_LONG = 3;
const CAL_MONTH_JULIAN_SHORT = 2;
const CAL_NUM_CALS = 4;
}

View File

@@ -0,0 +1,616 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension curl@7.4.12
namespace {
class CURLFile {
// properties
public $mime;
public $name;
public $postname;
// methods
public function __construct($filename, $mimetype = null, $postname = null) {}
public function getFilename() {}
public function getMimeType() {}
public function setMimeType($name) {}
public function getPostFilename() {}
public function setPostFilename($name) {}
}
function curl_close($ch) {}
function curl_copy_handle($ch) {}
function curl_errno($ch) {}
function curl_error($ch) {}
function curl_escape($ch, $str) {}
function curl_exec($ch) {}
function curl_file_create($filename, $mimetype = null, $postname = null) {}
function curl_getinfo($ch, $option = null) {}
function curl_init($url = null) {}
function curl_multi_add_handle($mh, $ch) {}
function curl_multi_close($mh) {}
function curl_multi_errno($mh) {}
function curl_multi_exec($mh, &$still_running = null) {}
function curl_multi_getcontent($ch) {}
function curl_multi_info_read($mh, &$msgs_in_queue = null) {}
function curl_multi_init() {}
function curl_multi_remove_handle($mh, $ch) {}
function curl_multi_select($mh, $timeout = null) {}
function curl_multi_setopt($sh, $option, $value) {}
function curl_multi_strerror($errornum) {}
function curl_pause($ch, $bitmask) {}
function curl_reset($ch) {}
function curl_setopt($ch, $option, $value) {}
function curl_setopt_array($ch, array $options) {}
function curl_share_close($sh) {}
function curl_share_errno($sh) {}
function curl_share_init() {}
function curl_share_setopt($sh, $option, $value) {}
function curl_share_strerror($errornum) {}
function curl_strerror($errornum) {}
function curl_unescape($ch, $str) {}
function curl_version($version = null) {}
const CURLAUTH_ANY = -17;
const CURLAUTH_ANYSAFE = -18;
const CURLAUTH_BASIC = 1;
const CURLAUTH_BEARER = 64;
const CURLAUTH_DIGEST = 2;
const CURLAUTH_DIGEST_IE = 16;
const CURLAUTH_GSSAPI = 4;
const CURLAUTH_GSSNEGOTIATE = 4;
const CURLAUTH_NEGOTIATE = 4;
const CURLAUTH_NONE = 0;
const CURLAUTH_NTLM = 8;
const CURLAUTH_NTLM_WB = 32;
const CURLAUTH_ONLY = 2147483648;
const CURLE_ABORTED_BY_CALLBACK = 42;
const CURLE_BAD_CALLING_ORDER = 44;
const CURLE_BAD_CONTENT_ENCODING = 61;
const CURLE_BAD_DOWNLOAD_RESUME = 36;
const CURLE_BAD_FUNCTION_ARGUMENT = 43;
const CURLE_BAD_PASSWORD_ENTERED = 46;
const CURLE_COULDNT_CONNECT = 7;
const CURLE_COULDNT_RESOLVE_HOST = 6;
const CURLE_COULDNT_RESOLVE_PROXY = 5;
const CURLE_FAILED_INIT = 2;
const CURLE_FILESIZE_EXCEEDED = 63;
const CURLE_FILE_COULDNT_READ_FILE = 37;
const CURLE_FTP_ACCESS_DENIED = 9;
const CURLE_FTP_BAD_DOWNLOAD_RESUME = 36;
const CURLE_FTP_CANT_GET_HOST = 15;
const CURLE_FTP_CANT_RECONNECT = 16;
const CURLE_FTP_COULDNT_GET_SIZE = 32;
const CURLE_FTP_COULDNT_RETR_FILE = 19;
const CURLE_FTP_COULDNT_SET_ASCII = 29;
const CURLE_FTP_COULDNT_SET_BINARY = 17;
const CURLE_FTP_COULDNT_STOR_FILE = 25;
const CURLE_FTP_COULDNT_USE_REST = 31;
const CURLE_FTP_PARTIAL_FILE = 18;
const CURLE_FTP_PORT_FAILED = 30;
const CURLE_FTP_QUOTE_ERROR = 21;
const CURLE_FTP_SSL_FAILED = 64;
const CURLE_FTP_USER_PASSWORD_INCORRECT = 10;
const CURLE_FTP_WEIRD_227_FORMAT = 14;
const CURLE_FTP_WEIRD_PASS_REPLY = 11;
const CURLE_FTP_WEIRD_PASV_REPLY = 13;
const CURLE_FTP_WEIRD_SERVER_REPLY = 8;
const CURLE_FTP_WEIRD_USER_REPLY = 12;
const CURLE_FTP_WRITE_ERROR = 20;
const CURLE_FUNCTION_NOT_FOUND = 41;
const CURLE_GOT_NOTHING = 52;
const CURLE_HTTP_NOT_FOUND = 22;
const CURLE_HTTP_PORT_FAILED = 45;
const CURLE_HTTP_POST_ERROR = 34;
const CURLE_HTTP_RANGE_ERROR = 33;
const CURLE_HTTP_RETURNED_ERROR = 22;
const CURLE_LDAP_CANNOT_BIND = 38;
const CURLE_LDAP_INVALID_URL = 62;
const CURLE_LDAP_SEARCH_FAILED = 39;
const CURLE_LIBRARY_NOT_FOUND = 40;
const CURLE_MALFORMAT_USER = 24;
const CURLE_OBSOLETE = 50;
const CURLE_OK = 0;
const CURLE_OPERATION_TIMEDOUT = 28;
const CURLE_OPERATION_TIMEOUTED = 28;
const CURLE_OUT_OF_MEMORY = 27;
const CURLE_PARTIAL_FILE = 18;
const CURLE_READ_ERROR = 26;
const CURLE_RECV_ERROR = 56;
const CURLE_SEND_ERROR = 55;
const CURLE_SHARE_IN_USE = 57;
const CURLE_SSH = 79;
const CURLE_SSL_CACERT = 60;
const CURLE_SSL_CACERT_BADFILE = 77;
const CURLE_SSL_CERTPROBLEM = 58;
const CURLE_SSL_CIPHER = 59;
const CURLE_SSL_CONNECT_ERROR = 35;
const CURLE_SSL_ENGINE_NOTFOUND = 53;
const CURLE_SSL_ENGINE_SETFAILED = 54;
const CURLE_SSL_PEER_CERTIFICATE = 60;
const CURLE_SSL_PINNEDPUBKEYNOTMATCH = 90;
const CURLE_TELNET_OPTION_SYNTAX = 49;
const CURLE_TOO_MANY_REDIRECTS = 47;
const CURLE_UNKNOWN_TELNET_OPTION = 48;
const CURLE_UNSUPPORTED_PROTOCOL = 1;
const CURLE_URL_MALFORMAT = 3;
const CURLE_URL_MALFORMAT_USER = 4;
const CURLE_WEIRD_SERVER_REPLY = 8;
const CURLE_WRITE_ERROR = 23;
const CURLFTPAUTH_DEFAULT = 0;
const CURLFTPAUTH_SSL = 1;
const CURLFTPAUTH_TLS = 2;
const CURLFTPMETHOD_MULTICWD = 1;
const CURLFTPMETHOD_NOCWD = 2;
const CURLFTPMETHOD_SINGLECWD = 3;
const CURLFTPSSL_ALL = 3;
const CURLFTPSSL_CCC_ACTIVE = 2;
const CURLFTPSSL_CCC_NONE = 0;
const CURLFTPSSL_CCC_PASSIVE = 1;
const CURLFTPSSL_CONTROL = 2;
const CURLFTPSSL_NONE = 0;
const CURLFTPSSL_TRY = 1;
const CURLFTP_CREATE_DIR = 1;
const CURLFTP_CREATE_DIR_NONE = 0;
const CURLFTP_CREATE_DIR_RETRY = 2;
const CURLGSSAPI_DELEGATION_FLAG = 2;
const CURLGSSAPI_DELEGATION_POLICY_FLAG = 1;
const CURLHEADER_SEPARATE = 1;
const CURLHEADER_UNIFIED = 0;
const CURLINFO_APPCONNECT_TIME = 3145761;
const CURLINFO_APPCONNECT_TIME_T = 6291512;
const CURLINFO_CERTINFO = 4194338;
const CURLINFO_CONDITION_UNMET = 2097187;
const CURLINFO_CONNECT_TIME = 3145733;
const CURLINFO_CONNECT_TIME_T = 6291508;
const CURLINFO_CONTENT_LENGTH_DOWNLOAD = 3145743;
const CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = 6291471;
const CURLINFO_CONTENT_LENGTH_UPLOAD = 3145744;
const CURLINFO_CONTENT_LENGTH_UPLOAD_T = 6291472;
const CURLINFO_CONTENT_TYPE = 1048594;
const CURLINFO_COOKIELIST = 4194332;
const CURLINFO_EFFECTIVE_URL = 1048577;
const CURLINFO_FILETIME = 2097166;
const CURLINFO_FILETIME_T = 6291470;
const CURLINFO_FTP_ENTRY_PATH = 1048606;
const CURLINFO_HEADER_OUT = 2;
const CURLINFO_HEADER_SIZE = 2097163;
const CURLINFO_HTTPAUTH_AVAIL = 2097175;
const CURLINFO_HTTP_CODE = 2097154;
const CURLINFO_HTTP_CONNECTCODE = 2097174;
const CURLINFO_HTTP_VERSION = 2097198;
const CURLINFO_LASTONE = 56;
const CURLINFO_LOCAL_IP = 1048617;
const CURLINFO_LOCAL_PORT = 2097194;
const CURLINFO_NAMELOOKUP_TIME = 3145732;
const CURLINFO_NAMELOOKUP_TIME_T = 6291507;
const CURLINFO_NUM_CONNECTS = 2097178;
const CURLINFO_OS_ERRNO = 2097177;
const CURLINFO_PRETRANSFER_TIME = 3145734;
const CURLINFO_PRETRANSFER_TIME_T = 6291509;
const CURLINFO_PRIMARY_IP = 1048608;
const CURLINFO_PRIMARY_PORT = 2097192;
const CURLINFO_PRIVATE = 1048597;
const CURLINFO_PROTOCOL = 2097200;
const CURLINFO_PROXYAUTH_AVAIL = 2097176;
const CURLINFO_PROXY_SSL_VERIFYRESULT = 2097199;
const CURLINFO_REDIRECT_COUNT = 2097172;
const CURLINFO_REDIRECT_TIME = 3145747;
const CURLINFO_REDIRECT_TIME_T = 6291511;
const CURLINFO_REDIRECT_URL = 1048607;
const CURLINFO_REQUEST_SIZE = 2097164;
const CURLINFO_RESPONSE_CODE = 2097154;
const CURLINFO_RTSP_CLIENT_CSEQ = 2097189;
const CURLINFO_RTSP_CSEQ_RECV = 2097191;
const CURLINFO_RTSP_SERVER_CSEQ = 2097190;
const CURLINFO_RTSP_SESSION_ID = 1048612;
const CURLINFO_SCHEME = 1048625;
const CURLINFO_SIZE_DOWNLOAD = 3145736;
const CURLINFO_SIZE_DOWNLOAD_T = 6291464;
const CURLINFO_SIZE_UPLOAD = 3145735;
const CURLINFO_SIZE_UPLOAD_T = 6291463;
const CURLINFO_SPEED_DOWNLOAD = 3145737;
const CURLINFO_SPEED_DOWNLOAD_T = 6291465;
const CURLINFO_SPEED_UPLOAD = 3145738;
const CURLINFO_SPEED_UPLOAD_T = 6291466;
const CURLINFO_SSL_ENGINES = 4194331;
const CURLINFO_SSL_VERIFYRESULT = 2097165;
const CURLINFO_STARTTRANSFER_TIME = 3145745;
const CURLINFO_STARTTRANSFER_TIME_T = 6291510;
const CURLINFO_TOTAL_TIME = 3145731;
const CURLINFO_TOTAL_TIME_T = 6291506;
const CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE = 30010;
const CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE = 30009;
const CURLMOPT_MAXCONNECTS = 6;
const CURLMOPT_MAX_HOST_CONNECTIONS = 7;
const CURLMOPT_MAX_PIPELINE_LENGTH = 8;
const CURLMOPT_MAX_TOTAL_CONNECTIONS = 13;
const CURLMOPT_PIPELINING = 3;
const CURLMOPT_PUSHFUNCTION = 20014;
const CURLMSG_DONE = 1;
const CURLM_ADDED_ALREADY = 7;
const CURLM_BAD_EASY_HANDLE = 2;
const CURLM_BAD_HANDLE = 1;
const CURLM_CALL_MULTI_PERFORM = -1;
const CURLM_INTERNAL_ERROR = 4;
const CURLM_OK = 0;
const CURLM_OUT_OF_MEMORY = 3;
const CURLOPT_ABSTRACT_UNIX_SOCKET = 10264;
const CURLOPT_ACCEPTTIMEOUT_MS = 212;
const CURLOPT_ACCEPT_ENCODING = 10102;
const CURLOPT_ADDRESS_SCOPE = 171;
const CURLOPT_APPEND = 50;
const CURLOPT_AUTOREFERER = 58;
const CURLOPT_BINARYTRANSFER = 19914;
const CURLOPT_BUFFERSIZE = 98;
const CURLOPT_CAINFO = 10065;
const CURLOPT_CAPATH = 10097;
const CURLOPT_CERTINFO = 172;
const CURLOPT_CONNECTTIMEOUT = 78;
const CURLOPT_CONNECTTIMEOUT_MS = 156;
const CURLOPT_CONNECT_ONLY = 141;
const CURLOPT_CONNECT_TO = 10243;
const CURLOPT_COOKIE = 10022;
const CURLOPT_COOKIEFILE = 10031;
const CURLOPT_COOKIEJAR = 10082;
const CURLOPT_COOKIELIST = 10135;
const CURLOPT_COOKIESESSION = 96;
const CURLOPT_CRLF = 27;
const CURLOPT_CRLFILE = 10169;
const CURLOPT_CUSTOMREQUEST = 10036;
const CURLOPT_DEFAULT_PROTOCOL = 10238;
const CURLOPT_DIRLISTONLY = 48;
const CURLOPT_DISALLOW_USERNAME_IN_URL = 278;
const CURLOPT_DNS_CACHE_TIMEOUT = 92;
const CURLOPT_DNS_INTERFACE = 10221;
const CURLOPT_DNS_LOCAL_IP4 = 10222;
const CURLOPT_DNS_LOCAL_IP6 = 10223;
const CURLOPT_DNS_SERVERS = 10211;
const CURLOPT_DNS_SHUFFLE_ADDRESSES = 275;
const CURLOPT_DNS_USE_GLOBAL_CACHE = 91;
const CURLOPT_EGDSOCKET = 10077;
const CURLOPT_ENCODING = 10102;
const CURLOPT_EXPECT_100_TIMEOUT_MS = 227;
const CURLOPT_FAILONERROR = 45;
const CURLOPT_FILE = 10001;
const CURLOPT_FILETIME = 69;
const CURLOPT_FNMATCH_FUNCTION = 20200;
const CURLOPT_FOLLOWLOCATION = 52;
const CURLOPT_FORBID_REUSE = 75;
const CURLOPT_FRESH_CONNECT = 74;
const CURLOPT_FTPAPPEND = 50;
const CURLOPT_FTPLISTONLY = 48;
const CURLOPT_FTPPORT = 10017;
const CURLOPT_FTPSSLAUTH = 129;
const CURLOPT_FTP_ACCOUNT = 10134;
const CURLOPT_FTP_ALTERNATIVE_TO_USER = 10147;
const CURLOPT_FTP_CREATE_MISSING_DIRS = 110;
const CURLOPT_FTP_FILEMETHOD = 138;
const CURLOPT_FTP_RESPONSE_TIMEOUT = 112;
const CURLOPT_FTP_SKIP_PASV_IP = 137;
const CURLOPT_FTP_SSL = 119;
const CURLOPT_FTP_SSL_CCC = 154;
const CURLOPT_FTP_USE_EPRT = 106;
const CURLOPT_FTP_USE_EPSV = 85;
const CURLOPT_FTP_USE_PRET = 188;
const CURLOPT_GSSAPI_DELEGATION = 210;
const CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS = 271;
const CURLOPT_HAPROXYPROTOCOL = 274;
const CURLOPT_HEADER = 42;
const CURLOPT_HEADERFUNCTION = 20079;
const CURLOPT_HEADEROPT = 229;
const CURLOPT_HTTP09_ALLOWED = 285;
const CURLOPT_HTTP200ALIASES = 10104;
const CURLOPT_HTTPAUTH = 107;
const CURLOPT_HTTPGET = 80;
const CURLOPT_HTTPHEADER = 10023;
const CURLOPT_HTTPPROXYTUNNEL = 61;
const CURLOPT_HTTP_CONTENT_DECODING = 158;
const CURLOPT_HTTP_TRANSFER_DECODING = 157;
const CURLOPT_HTTP_VERSION = 84;
const CURLOPT_IGNORE_CONTENT_LENGTH = 136;
const CURLOPT_INFILE = 10009;
const CURLOPT_INFILESIZE = 14;
const CURLOPT_INTERFACE = 10062;
const CURLOPT_IPRESOLVE = 113;
const CURLOPT_ISSUERCERT = 10170;
const CURLOPT_KEEP_SENDING_ON_ERROR = 245;
const CURLOPT_KEYPASSWD = 10026;
const CURLOPT_KRB4LEVEL = 10063;
const CURLOPT_KRBLEVEL = 10063;
const CURLOPT_LOCALPORT = 139;
const CURLOPT_LOCALPORTRANGE = 140;
const CURLOPT_LOGIN_OPTIONS = 10224;
const CURLOPT_LOW_SPEED_LIMIT = 19;
const CURLOPT_LOW_SPEED_TIME = 20;
const CURLOPT_MAIL_AUTH = 10217;
const CURLOPT_MAIL_FROM = 10186;
const CURLOPT_MAIL_RCPT = 10187;
const CURLOPT_MAXCONNECTS = 71;
const CURLOPT_MAXFILESIZE = 114;
const CURLOPT_MAXREDIRS = 68;
const CURLOPT_MAX_RECV_SPEED_LARGE = 30146;
const CURLOPT_MAX_SEND_SPEED_LARGE = 30145;
const CURLOPT_NETRC = 51;
const CURLOPT_NETRC_FILE = 10118;
const CURLOPT_NEW_DIRECTORY_PERMS = 160;
const CURLOPT_NEW_FILE_PERMS = 159;
const CURLOPT_NOBODY = 44;
const CURLOPT_NOPROGRESS = 43;
const CURLOPT_NOPROXY = 10177;
const CURLOPT_NOSIGNAL = 99;
const CURLOPT_PASSWORD = 10174;
const CURLOPT_PATH_AS_IS = 234;
const CURLOPT_PINNEDPUBLICKEY = 10230;
const CURLOPT_PIPEWAIT = 237;
const CURLOPT_PORT = 3;
const CURLOPT_POST = 47;
const CURLOPT_POSTFIELDS = 10015;
const CURLOPT_POSTQUOTE = 10039;
const CURLOPT_POSTREDIR = 161;
const CURLOPT_PREQUOTE = 10093;
const CURLOPT_PRE_PROXY = 10262;
const CURLOPT_PRIVATE = 10103;
const CURLOPT_PROGRESSFUNCTION = 20056;
const CURLOPT_PROTOCOLS = 181;
const CURLOPT_PROXY = 10004;
const CURLOPT_PROXYAUTH = 111;
const CURLOPT_PROXYHEADER = 10228;
const CURLOPT_PROXYPASSWORD = 10176;
const CURLOPT_PROXYPORT = 59;
const CURLOPT_PROXYTYPE = 101;
const CURLOPT_PROXYUSERNAME = 10175;
const CURLOPT_PROXYUSERPWD = 10006;
const CURLOPT_PROXY_CAINFO = 10246;
const CURLOPT_PROXY_CAPATH = 10247;
const CURLOPT_PROXY_CRLFILE = 10260;
const CURLOPT_PROXY_KEYPASSWD = 10258;
const CURLOPT_PROXY_PINNEDPUBLICKEY = 10263;
const CURLOPT_PROXY_SERVICE_NAME = 10235;
const CURLOPT_PROXY_SSLCERT = 10254;
const CURLOPT_PROXY_SSLCERTTYPE = 10255;
const CURLOPT_PROXY_SSLKEY = 10256;
const CURLOPT_PROXY_SSLKEYTYPE = 10257;
const CURLOPT_PROXY_SSLVERSION = 250;
const CURLOPT_PROXY_SSL_CIPHER_LIST = 10259;
const CURLOPT_PROXY_SSL_OPTIONS = 261;
const CURLOPT_PROXY_SSL_VERIFYHOST = 249;
const CURLOPT_PROXY_SSL_VERIFYPEER = 248;
const CURLOPT_PROXY_TLS13_CIPHERS = 10277;
const CURLOPT_PROXY_TLSAUTH_PASSWORD = 10252;
const CURLOPT_PROXY_TLSAUTH_TYPE = 10253;
const CURLOPT_PROXY_TLSAUTH_USERNAME = 10251;
const CURLOPT_PROXY_TRANSFER_MODE = 166;
const CURLOPT_PUT = 54;
const CURLOPT_QUOTE = 10028;
const CURLOPT_RANDOM_FILE = 10076;
const CURLOPT_RANGE = 10007;
const CURLOPT_READDATA = 10009;
const CURLOPT_READFUNCTION = 20012;
const CURLOPT_REDIR_PROTOCOLS = 182;
const CURLOPT_REFERER = 10016;
const CURLOPT_REQUEST_TARGET = 10266;
const CURLOPT_RESOLVE = 10203;
const CURLOPT_RESUME_FROM = 21;
const CURLOPT_RETURNTRANSFER = 19913;
const CURLOPT_RTSP_CLIENT_CSEQ = 193;
const CURLOPT_RTSP_REQUEST = 189;
const CURLOPT_RTSP_SERVER_CSEQ = 194;
const CURLOPT_RTSP_SESSION_ID = 10190;
const CURLOPT_RTSP_STREAM_URI = 10191;
const CURLOPT_RTSP_TRANSPORT = 10192;
const CURLOPT_SAFE_UPLOAD = -1;
const CURLOPT_SASL_IR = 218;
const CURLOPT_SERVICE_NAME = 10236;
const CURLOPT_SHARE = 10100;
const CURLOPT_SOCKS5_AUTH = 267;
const CURLOPT_SOCKS5_GSSAPI_NEC = 180;
const CURLOPT_SOCKS5_GSSAPI_SERVICE = 10179;
const CURLOPT_SSH_AUTH_TYPES = 151;
const CURLOPT_SSH_COMPRESSION = 268;
const CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 = 10162;
const CURLOPT_SSH_KNOWNHOSTS = 10183;
const CURLOPT_SSH_PRIVATE_KEYFILE = 10153;
const CURLOPT_SSH_PUBLIC_KEYFILE = 10152;
const CURLOPT_SSLCERT = 10025;
const CURLOPT_SSLCERTPASSWD = 10026;
const CURLOPT_SSLCERTTYPE = 10086;
const CURLOPT_SSLENGINE = 10089;
const CURLOPT_SSLENGINE_DEFAULT = 90;
const CURLOPT_SSLKEY = 10087;
const CURLOPT_SSLKEYPASSWD = 10026;
const CURLOPT_SSLKEYTYPE = 10088;
const CURLOPT_SSLVERSION = 32;
const CURLOPT_SSL_CIPHER_LIST = 10083;
const CURLOPT_SSL_ENABLE_ALPN = 226;
const CURLOPT_SSL_ENABLE_NPN = 225;
const CURLOPT_SSL_FALSESTART = 233;
const CURLOPT_SSL_OPTIONS = 216;
const CURLOPT_SSL_SESSIONID_CACHE = 150;
const CURLOPT_SSL_VERIFYHOST = 81;
const CURLOPT_SSL_VERIFYPEER = 64;
const CURLOPT_SSL_VERIFYSTATUS = 232;
const CURLOPT_STDERR = 10037;
const CURLOPT_STREAM_WEIGHT = 239;
const CURLOPT_SUPPRESS_CONNECT_HEADERS = 265;
const CURLOPT_TCP_FASTOPEN = 244;
const CURLOPT_TCP_KEEPALIVE = 213;
const CURLOPT_TCP_KEEPIDLE = 214;
const CURLOPT_TCP_KEEPINTVL = 215;
const CURLOPT_TCP_NODELAY = 121;
const CURLOPT_TELNETOPTIONS = 10070;
const CURLOPT_TFTP_BLKSIZE = 178;
const CURLOPT_TFTP_NO_OPTIONS = 242;
const CURLOPT_TIMECONDITION = 33;
const CURLOPT_TIMEOUT = 13;
const CURLOPT_TIMEOUT_MS = 155;
const CURLOPT_TIMEVALUE = 34;
const CURLOPT_TIMEVALUE_LARGE = 30270;
const CURLOPT_TLS13_CIPHERS = 10276;
const CURLOPT_TLSAUTH_PASSWORD = 10205;
const CURLOPT_TLSAUTH_TYPE = 10206;
const CURLOPT_TLSAUTH_USERNAME = 10204;
const CURLOPT_TRANSFERTEXT = 53;
const CURLOPT_TRANSFER_ENCODING = 207;
const CURLOPT_UNIX_SOCKET_PATH = 10231;
const CURLOPT_UNRESTRICTED_AUTH = 105;
const CURLOPT_UPLOAD = 46;
const CURLOPT_URL = 10002;
const CURLOPT_USERAGENT = 10018;
const CURLOPT_USERNAME = 10173;
const CURLOPT_USERPWD = 10005;
const CURLOPT_USE_SSL = 119;
const CURLOPT_VERBOSE = 41;
const CURLOPT_WILDCARDMATCH = 197;
const CURLOPT_WRITEFUNCTION = 20011;
const CURLOPT_WRITEHEADER = 10029;
const CURLOPT_XOAUTH2_BEARER = 10220;
const CURLPAUSE_ALL = 5;
const CURLPAUSE_CONT = 0;
const CURLPAUSE_RECV = 1;
const CURLPAUSE_RECV_CONT = 0;
const CURLPAUSE_SEND = 4;
const CURLPAUSE_SEND_CONT = 0;
const CURLPIPE_HTTP1 = 1;
const CURLPIPE_MULTIPLEX = 2;
const CURLPIPE_NOTHING = 0;
const CURLPROTO_ALL = -1;
const CURLPROTO_DICT = 512;
const CURLPROTO_FILE = 1024;
const CURLPROTO_FTP = 4;
const CURLPROTO_FTPS = 8;
const CURLPROTO_GOPHER = 33554432;
const CURLPROTO_HTTP = 1;
const CURLPROTO_HTTPS = 2;
const CURLPROTO_IMAP = 4096;
const CURLPROTO_IMAPS = 8192;
const CURLPROTO_LDAP = 128;
const CURLPROTO_LDAPS = 256;
const CURLPROTO_POP3 = 16384;
const CURLPROTO_POP3S = 32768;
const CURLPROTO_RTMP = 524288;
const CURLPROTO_RTMPE = 2097152;
const CURLPROTO_RTMPS = 8388608;
const CURLPROTO_RTMPT = 1048576;
const CURLPROTO_RTMPTE = 4194304;
const CURLPROTO_RTMPTS = 16777216;
const CURLPROTO_RTSP = 262144;
const CURLPROTO_SCP = 16;
const CURLPROTO_SFTP = 32;
const CURLPROTO_SMB = 67108864;
const CURLPROTO_SMBS = 134217728;
const CURLPROTO_SMTP = 65536;
const CURLPROTO_SMTPS = 131072;
const CURLPROTO_TELNET = 64;
const CURLPROTO_TFTP = 2048;
const CURLPROXY_HTTP = 0;
const CURLPROXY_HTTPS = 2;
const CURLPROXY_HTTP_1_0 = 1;
const CURLPROXY_SOCKS4 = 4;
const CURLPROXY_SOCKS4A = 6;
const CURLPROXY_SOCKS5 = 5;
const CURLPROXY_SOCKS5_HOSTNAME = 7;
const CURLSHOPT_NONE = 0;
const CURLSHOPT_SHARE = 1;
const CURLSHOPT_UNSHARE = 2;
const CURLSSH_AUTH_AGENT = 16;
const CURLSSH_AUTH_ANY = -1;
const CURLSSH_AUTH_DEFAULT = -1;
const CURLSSH_AUTH_GSSAPI = 32;
const CURLSSH_AUTH_HOST = 4;
const CURLSSH_AUTH_KEYBOARD = 8;
const CURLSSH_AUTH_NONE = 0;
const CURLSSH_AUTH_PASSWORD = 2;
const CURLSSH_AUTH_PUBLICKEY = 1;
const CURLSSLOPT_ALLOW_BEAST = 1;
const CURLSSLOPT_NO_REVOKE = 2;
const CURLUSESSL_ALL = 3;
const CURLUSESSL_CONTROL = 2;
const CURLUSESSL_NONE = 0;
const CURLUSESSL_TRY = 1;
const CURLVERSION_NOW = 4;
const CURL_FNMATCHFUNC_FAIL = 2;
const CURL_FNMATCHFUNC_MATCH = 0;
const CURL_FNMATCHFUNC_NOMATCH = 1;
const CURL_HTTP_VERSION_1_0 = 1;
const CURL_HTTP_VERSION_1_1 = 2;
const CURL_HTTP_VERSION_2 = 3;
const CURL_HTTP_VERSION_2TLS = 4;
const CURL_HTTP_VERSION_2_0 = 3;
const CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE = 5;
const CURL_HTTP_VERSION_NONE = 0;
const CURL_IPRESOLVE_V4 = 1;
const CURL_IPRESOLVE_V6 = 2;
const CURL_IPRESOLVE_WHATEVER = 0;
const CURL_LOCK_DATA_CONNECT = 5;
const CURL_LOCK_DATA_COOKIE = 2;
const CURL_LOCK_DATA_DNS = 3;
const CURL_LOCK_DATA_PSL = 6;
const CURL_LOCK_DATA_SSL_SESSION = 4;
const CURL_MAX_READ_SIZE = 524288;
const CURL_NETRC_IGNORED = 0;
const CURL_NETRC_OPTIONAL = 1;
const CURL_NETRC_REQUIRED = 2;
const CURL_PUSH_DENY = 1;
const CURL_PUSH_OK = 0;
const CURL_READFUNC_PAUSE = 268435457;
const CURL_REDIR_POST_301 = 1;
const CURL_REDIR_POST_302 = 2;
const CURL_REDIR_POST_303 = 4;
const CURL_REDIR_POST_ALL = 7;
const CURL_RTSPREQ_ANNOUNCE = 3;
const CURL_RTSPREQ_DESCRIBE = 2;
const CURL_RTSPREQ_GET_PARAMETER = 8;
const CURL_RTSPREQ_OPTIONS = 1;
const CURL_RTSPREQ_PAUSE = 6;
const CURL_RTSPREQ_PLAY = 5;
const CURL_RTSPREQ_RECEIVE = 11;
const CURL_RTSPREQ_RECORD = 10;
const CURL_RTSPREQ_SETUP = 4;
const CURL_RTSPREQ_SET_PARAMETER = 9;
const CURL_RTSPREQ_TEARDOWN = 7;
const CURL_SSLVERSION_DEFAULT = 0;
const CURL_SSLVERSION_MAX_DEFAULT = 65536;
const CURL_SSLVERSION_MAX_NONE = 0;
const CURL_SSLVERSION_MAX_TLSv1_0 = 262144;
const CURL_SSLVERSION_MAX_TLSv1_1 = 327680;
const CURL_SSLVERSION_MAX_TLSv1_2 = 393216;
const CURL_SSLVERSION_MAX_TLSv1_3 = 458752;
const CURL_SSLVERSION_SSLv2 = 2;
const CURL_SSLVERSION_SSLv3 = 3;
const CURL_SSLVERSION_TLSv1 = 1;
const CURL_SSLVERSION_TLSv1_0 = 4;
const CURL_SSLVERSION_TLSv1_1 = 5;
const CURL_SSLVERSION_TLSv1_2 = 6;
const CURL_SSLVERSION_TLSv1_3 = 7;
const CURL_TIMECOND_IFMODSINCE = 1;
const CURL_TIMECOND_IFUNMODSINCE = 2;
const CURL_TIMECOND_LASTMOD = 3;
const CURL_TIMECOND_NONE = 0;
const CURL_TLSAUTH_SRP = 1;
const CURL_VERSION_ASYNCHDNS = 128;
const CURL_VERSION_BROTLI = 8388608;
const CURL_VERSION_CONV = 4096;
const CURL_VERSION_CURLDEBUG = 8192;
const CURL_VERSION_DEBUG = 64;
const CURL_VERSION_GSSAPI = 131072;
const CURL_VERSION_GSSNEGOTIATE = 32;
const CURL_VERSION_HTTP2 = 65536;
const CURL_VERSION_HTTPS_PROXY = 2097152;
const CURL_VERSION_IDN = 1024;
const CURL_VERSION_IPV6 = 1;
const CURL_VERSION_KERBEROS4 = 2;
const CURL_VERSION_KERBEROS5 = 262144;
const CURL_VERSION_LARGEFILE = 512;
const CURL_VERSION_LIBZ = 8;
const CURL_VERSION_MULTI_SSL = 4194304;
const CURL_VERSION_NTLM = 16;
const CURL_VERSION_NTLM_WB = 32768;
const CURL_VERSION_PSL = 1048576;
const CURL_VERSION_SPNEGO = 256;
const CURL_VERSION_SSL = 4;
const CURL_VERSION_SSPI = 2048;
const CURL_VERSION_TLSAUTH_SRP = 16384;
const CURL_VERSION_UNIX_SOCKETS = 524288;
const CURL_WRITEFUNC_PAUSE = 268435457;
}

View File

@@ -0,0 +1,30 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension fileinfo@1.0.5
namespace {
class finfo {
// methods
public function finfo($options = null, $arg = null) {}
public function set_flags($options) {}
public function file($filename, $options = null, $context = null) {}
public function buffer($string, $options = null, $context = null) {}
}
function finfo_buffer($finfo, $string, $options = null, $context = null) {}
function finfo_close($finfo) {}
function finfo_file($finfo, $filename, $options = null, $context = null) {}
function finfo_open($options = null, $arg = null) {}
function finfo_set_flags($finfo, $options) {}
function mime_content_type($string) {}
const FILEINFO_CONTINUE = 32;
const FILEINFO_DEVICES = 8;
const FILEINFO_MIME = 1040;
const FILEINFO_MIME_ENCODING = 1024;
const FILEINFO_MIME_TYPE = 16;
const FILEINFO_NONE = 0;
const FILEINFO_PRESERVE_ATIME = 128;
const FILEINFO_RAW = 256;
const FILEINFO_SYMLINK = 2;
}

View File

@@ -0,0 +1,53 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension ftp@7.4.12
namespace {
function ftp_alloc($ftp, $size, &$response = null) {}
function ftp_append($ftp, $remote_file, $local_file, $mode = null) {}
function ftp_cdup($ftp) {}
function ftp_chdir($ftp, $directory) {}
function ftp_chmod($ftp, $mode, $filename) {}
function ftp_close($ftp) {}
function ftp_connect($host, $port = null, $timeout = null) {}
function ftp_delete($ftp, $file) {}
function ftp_exec($ftp, $command) {}
function ftp_fget($ftp, $fp, $remote_file, $mode = null, $resumepos = null) {}
function ftp_fput($ftp, $remote_file, $fp, $mode = null, $startpos = null) {}
function ftp_get($ftp, $local_file, $remote_file, $mode = null, $resume_pos = null) {}
function ftp_get_option($ftp, $option) {}
function ftp_login($ftp, $username, $password) {}
function ftp_mdtm($ftp, $filename) {}
function ftp_mkdir($ftp, $directory) {}
function ftp_mlsd($ftp, $directory) {}
function ftp_nb_continue($ftp) {}
function ftp_nb_fget($ftp, $fp, $remote_file, $mode = null, $resumepos = null) {}
function ftp_nb_fput($ftp, $remote_file, $fp, $mode = null, $startpos = null) {}
function ftp_nb_get($ftp, $local_file, $remote_file, $mode = null, $resume_pos = null) {}
function ftp_nb_put($ftp, $remote_file, $local_file, $mode = null, $startpos = null) {}
function ftp_nlist($ftp, $directory) {}
function ftp_pasv($ftp, $pasv) {}
function ftp_put($ftp, $remote_file, $local_file, $mode = null, $startpos = null) {}
function ftp_pwd($ftp) {}
function ftp_quit($ftp) {}
function ftp_raw($ftp, $command) {}
function ftp_rawlist($ftp, $directory, $recursive = null) {}
function ftp_rename($ftp, $src, $dest) {}
function ftp_rmdir($ftp, $directory) {}
function ftp_set_option($ftp, $option, $value) {}
function ftp_site($ftp, $cmd) {}
function ftp_size($ftp, $filename) {}
function ftp_ssl_connect($host, $port = null, $timeout = null) {}
function ftp_systype($ftp) {}
const FTP_ASCII = 1;
const FTP_AUTORESUME = -1;
const FTP_AUTOSEEK = 1;
const FTP_BINARY = 2;
const FTP_FAILED = 0;
const FTP_FINISHED = 1;
const FTP_IMAGE = 2;
const FTP_MOREDATA = 2;
const FTP_TEXT = 1;
const FTP_TIMEOUT_SEC = 0;
const FTP_USEPASVADDRESS = 2;
}

View File

@@ -0,0 +1,207 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension gd@8.2.11
namespace {
final class GdFont {
}
final class GdImage {
}
function gd_info() : array {}
function imageaffine(\GdImage $image, array $affine, ?array $clip = null) : \GdImage|false {}
function imageaffinematrixconcat(array $matrix1, array $matrix2) : array|false {}
function imageaffinematrixget(int $type, $options) : array|false {}
function imagealphablending(\GdImage $image, bool $enable) : bool {}
function imageantialias(\GdImage $image, bool $enable) : bool {}
function imagearc(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color) : bool {}
function imageavif(\GdImage $image, $file = null, int $quality = -1, int $speed = -1) : bool {}
function imagebmp(\GdImage $image, $file = null, bool $compressed = true) : bool {}
function imagechar(\GdImage $image, \GdFont|int $font, int $x, int $y, string $char, int $color) : bool {}
function imagecharup(\GdImage $image, \GdFont|int $font, int $x, int $y, string $char, int $color) : bool {}
function imagecolorallocate(\GdImage $image, int $red, int $green, int $blue) : false|int {}
function imagecolorallocatealpha(\GdImage $image, int $red, int $green, int $blue, int $alpha) : false|int {}
function imagecolorat(\GdImage $image, int $x, int $y) : false|int {}
function imagecolorclosest(\GdImage $image, int $red, int $green, int $blue) : int {}
function imagecolorclosestalpha(\GdImage $image, int $red, int $green, int $blue, int $alpha) : int {}
function imagecolorclosesthwb(\GdImage $image, int $red, int $green, int $blue) : int {}
function imagecolordeallocate(\GdImage $image, int $color) : bool {}
function imagecolorexact(\GdImage $image, int $red, int $green, int $blue) : int {}
function imagecolorexactalpha(\GdImage $image, int $red, int $green, int $blue, int $alpha) : int {}
function imagecolormatch(\GdImage $image1, \GdImage $image2) : bool {}
function imagecolorresolve(\GdImage $image, int $red, int $green, int $blue) : int {}
function imagecolorresolvealpha(\GdImage $image, int $red, int $green, int $blue, int $alpha) : int {}
function imagecolorset(\GdImage $image, int $color, int $red, int $green, int $blue, int $alpha = 0) : ?false {}
function imagecolorsforindex(\GdImage $image, int $color) : array {}
function imagecolorstotal(\GdImage $image) : int {}
function imagecolortransparent(\GdImage $image, ?int $color = null) : int {}
function imageconvolution(\GdImage $image, array $matrix, float $divisor, float $offset) : bool {}
function imagecopy(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height) : bool {}
function imagecopymerge(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct) : bool {}
function imagecopymergegray(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $src_width, int $src_height, int $pct) : bool {}
function imagecopyresampled(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height) : bool {}
function imagecopyresized(\GdImage $dst_image, \GdImage $src_image, int $dst_x, int $dst_y, int $src_x, int $src_y, int $dst_width, int $dst_height, int $src_width, int $src_height) : bool {}
function imagecreate(int $width, int $height) : \GdImage|false {}
function imagecreatefromavif(string $filename) : \GdImage|false {}
function imagecreatefrombmp(string $filename) : \GdImage|false {}
function imagecreatefromgd(string $filename) : \GdImage|false {}
function imagecreatefromgd2(string $filename) : \GdImage|false {}
function imagecreatefromgd2part(string $filename, int $x, int $y, int $width, int $height) : \GdImage|false {}
function imagecreatefromgif(string $filename) : \GdImage|false {}
function imagecreatefromjpeg(string $filename) : \GdImage|false {}
function imagecreatefrompng(string $filename) : \GdImage|false {}
function imagecreatefromstring(string $data) : \GdImage|false {}
function imagecreatefromtga(string $filename) : \GdImage|false {}
function imagecreatefromwbmp(string $filename) : \GdImage|false {}
function imagecreatefromwebp(string $filename) : \GdImage|false {}
function imagecreatefromxbm(string $filename) : \GdImage|false {}
function imagecreatefromxpm(string $filename) : \GdImage|false {}
function imagecreatetruecolor(int $width, int $height) : \GdImage|false {}
function imagecrop(\GdImage $image, array $rectangle) : \GdImage|false {}
function imagecropauto(\GdImage $image, int $mode = \IMG_CROP_DEFAULT, float $threshold = 0.5, int $color = -1) : \GdImage|false {}
function imagedashedline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color) : bool {}
function imagedestroy(\GdImage $image) : bool {}
function imageellipse(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color) : bool {}
function imagefill(\GdImage $image, int $x, int $y, int $color) : bool {}
function imagefilledarc(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $start_angle, int $end_angle, int $color, int $style) : bool {}
function imagefilledellipse(\GdImage $image, int $center_x, int $center_y, int $width, int $height, int $color) : bool {}
function imagefilledpolygon(\GdImage $image, array $points, int $num_points_or_color, ?int $color = null) : bool {}
function imagefilledrectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color) : bool {}
function imagefilltoborder(\GdImage $image, int $x, int $y, int $border_color, int $color) : bool {}
function imagefilter(\GdImage $image, int $filter, ...$args) : bool {}
function imageflip(\GdImage $image, int $mode) : bool {}
function imagefontheight(\GdFont|int $font) : int {}
function imagefontwidth(\GdFont|int $font) : int {}
function imageftbbox(float $size, float $angle, string $font_filename, string $string, array $options = []) : array|false {}
function imagefttext(\GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []) : array|false {}
function imagegammacorrect(\GdImage $image, float $input_gamma, float $output_gamma) : bool {}
function imagegd(\GdImage $image, ?string $file = null) : bool {}
function imagegd2(\GdImage $image, ?string $file = null, int $chunk_size = unknown, int $mode = unknown) : bool {}
function imagegetclip(\GdImage $image) : array {}
function imagegetinterpolation(\GdImage $image) : int {}
function imagegif(\GdImage $image, $file = null) : bool {}
function imageinterlace(\GdImage $image, ?bool $enable = null) : bool {}
function imageistruecolor(\GdImage $image) : bool {}
function imagejpeg(\GdImage $image, $file = null, int $quality = -1) : bool {}
function imagelayereffect(\GdImage $image, int $effect) : bool {}
function imageline(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color) : bool {}
function imageloadfont(string $filename) : \GdFont|false {}
function imageopenpolygon(\GdImage $image, array $points, int $num_points_or_color, ?int $color = null) : bool {}
function imagepalettecopy(\GdImage $dst, \GdImage $src) : void {}
function imagepalettetotruecolor(\GdImage $image) : bool {}
function imagepng(\GdImage $image, $file = null, int $quality = -1, int $filters = -1) : bool {}
function imagepolygon(\GdImage $image, array $points, int $num_points_or_color, ?int $color = null) : bool {}
function imagerectangle(\GdImage $image, int $x1, int $y1, int $x2, int $y2, int $color) : bool {}
function imageresolution(\GdImage $image, ?int $resolution_x = null, ?int $resolution_y = null) : array|bool {}
function imagerotate(\GdImage $image, float $angle, int $background_color, bool $ignore_transparent = false) : \GdImage|false {}
function imagesavealpha(\GdImage $image, bool $enable) : bool {}
function imagescale(\GdImage $image, int $width, int $height = -1, int $mode = \IMG_BILINEAR_FIXED) : \GdImage|false {}
function imagesetbrush(\GdImage $image, \GdImage $brush) : bool {}
function imagesetclip(\GdImage $image, int $x1, int $y1, int $x2, int $y2) : bool {}
function imagesetinterpolation(\GdImage $image, int $method = \IMG_BILINEAR_FIXED) : bool {}
function imagesetpixel(\GdImage $image, int $x, int $y, int $color) : bool {}
function imagesetstyle(\GdImage $image, array $style) : bool {}
function imagesetthickness(\GdImage $image, int $thickness) : bool {}
function imagesettile(\GdImage $image, \GdImage $tile) : bool {}
function imagestring(\GdImage $image, \GdFont|int $font, int $x, int $y, string $string, int $color) : bool {}
function imagestringup(\GdImage $image, \GdFont|int $font, int $x, int $y, string $string, int $color) : bool {}
function imagesx(\GdImage $image) : int {}
function imagesy(\GdImage $image) : int {}
function imagetruecolortopalette(\GdImage $image, bool $dither, int $num_colors) : bool {}
function imagettfbbox(float $size, float $angle, string $font_filename, string $string, array $options = []) : array|false {}
function imagettftext(\GdImage $image, float $size, float $angle, int $x, int $y, int $color, string $font_filename, string $text, array $options = []) : array|false {}
function imagetypes() : int {}
function imagewbmp(\GdImage $image, $file = null, ?int $foreground_color = null) : bool {}
function imagewebp(\GdImage $image, $file = null, int $quality = -1) : bool {}
function imagexbm(\GdImage $image, ?string $filename, ?int $foreground_color = null) : bool {}
const GD_BUNDLED = 0;
const GD_EXTRA_VERSION = '';
const GD_MAJOR_VERSION = 2;
const GD_MINOR_VERSION = 3;
const GD_RELEASE_VERSION = 3;
const GD_VERSION = '2.3.3';
const IMG_AFFINE_ROTATE = 2;
const IMG_AFFINE_SCALE = 1;
const IMG_AFFINE_SHEAR_HORIZONTAL = 3;
const IMG_AFFINE_SHEAR_VERTICAL = 4;
const IMG_AFFINE_TRANSLATE = 0;
const IMG_ARC_CHORD = 1;
const IMG_ARC_EDGED = 4;
const IMG_ARC_NOFILL = 2;
const IMG_ARC_PIE = 0;
const IMG_ARC_ROUNDED = 0;
const IMG_AVIF = 256;
const IMG_BELL = 1;
const IMG_BESSEL = 2;
const IMG_BICUBIC = 4;
const IMG_BICUBIC_FIXED = 5;
const IMG_BILINEAR_FIXED = 3;
const IMG_BLACKMAN = 6;
const IMG_BMP = 64;
const IMG_BOX = 7;
const IMG_BSPLINE = 8;
const IMG_CATMULLROM = 9;
const IMG_COLOR_BRUSHED = -3;
const IMG_COLOR_STYLED = -2;
const IMG_COLOR_STYLEDBRUSHED = -4;
const IMG_COLOR_TILED = -5;
const IMG_COLOR_TRANSPARENT = -6;
const IMG_CROP_BLACK = 2;
const IMG_CROP_DEFAULT = 0;
const IMG_CROP_SIDES = 4;
const IMG_CROP_THRESHOLD = 5;
const IMG_CROP_TRANSPARENT = 1;
const IMG_CROP_WHITE = 3;
const IMG_EFFECT_ALPHABLEND = 1;
const IMG_EFFECT_MULTIPLY = 4;
const IMG_EFFECT_NORMAL = 2;
const IMG_EFFECT_OVERLAY = 3;
const IMG_EFFECT_REPLACE = 0;
const IMG_FILTER_BRIGHTNESS = 2;
const IMG_FILTER_COLORIZE = 4;
const IMG_FILTER_CONTRAST = 3;
const IMG_FILTER_EDGEDETECT = 5;
const IMG_FILTER_EMBOSS = 6;
const IMG_FILTER_GAUSSIAN_BLUR = 7;
const IMG_FILTER_GRAYSCALE = 1;
const IMG_FILTER_MEAN_REMOVAL = 9;
const IMG_FILTER_NEGATE = 0;
const IMG_FILTER_PIXELATE = 11;
const IMG_FILTER_SCATTER = 12;
const IMG_FILTER_SELECTIVE_BLUR = 8;
const IMG_FILTER_SMOOTH = 10;
const IMG_FLIP_BOTH = 3;
const IMG_FLIP_HORIZONTAL = 1;
const IMG_FLIP_VERTICAL = 2;
const IMG_GAUSSIAN = 10;
const IMG_GD2_COMPRESSED = 2;
const IMG_GD2_RAW = 1;
const IMG_GENERALIZED_CUBIC = 11;
const IMG_GIF = 1;
const IMG_HAMMING = 13;
const IMG_HANNING = 14;
const IMG_HERMITE = 12;
const IMG_JPEG = 2;
const IMG_JPG = 2;
const IMG_MITCHELL = 15;
const IMG_NEAREST_NEIGHBOUR = 16;
const IMG_PNG = 4;
const IMG_POWER = 17;
const IMG_QUADRATIC = 18;
const IMG_SINC = 19;
const IMG_TGA = 128;
const IMG_TRIANGLE = 20;
const IMG_WBMP = 8;
const IMG_WEBP = 32;
const IMG_WEBP_LOSSLESS = 101;
const IMG_WEIGHTED4 = 21;
const IMG_XPM = 16;
const PNG_ALL_FILTERS = 248;
const PNG_FILTER_AVG = 64;
const PNG_FILTER_NONE = 8;
const PNG_FILTER_PAETH = 128;
const PNG_FILTER_SUB = 16;
const PNG_FILTER_UP = 32;
const PNG_NO_FILTER = 0;
}

View File

@@ -0,0 +1,44 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension geoip@1.1.1
namespace {
function geoip_asnum_by_name() {}
function geoip_continent_code_by_name() {}
function geoip_country_code3_by_name() {}
function geoip_country_code3_by_name_v6() {}
function geoip_country_code_by_name() {}
function geoip_country_code_by_name_v6() {}
function geoip_country_name_by_name() {}
function geoip_country_name_by_name_v6() {}
function geoip_database_info() {}
function geoip_db_avail() {}
function geoip_db_filename() {}
function geoip_db_get_all_info() {}
function geoip_domain_by_name() {}
function geoip_id_by_name() {}
function geoip_isp_by_name() {}
function geoip_netspeedcell_by_name() {}
function geoip_org_by_name() {}
function geoip_record_by_name() {}
function geoip_region_by_name() {}
function geoip_region_name_by_code() {}
function geoip_setup_custom_directory() {}
function geoip_time_zone_by_country_and_region() {}
const GEOIP_ASNUM_EDITION = 9;
const GEOIP_CABLEDSL_SPEED = 2;
const GEOIP_CITY_EDITION_REV0 = 6;
const GEOIP_CITY_EDITION_REV1 = 2;
const GEOIP_CORPORATE_SPEED = 3;
const GEOIP_COUNTRY_EDITION = 1;
const GEOIP_DIALUP_SPEED = 1;
const GEOIP_DOMAIN_EDITION = 11;
const GEOIP_ISP_EDITION = 4;
const GEOIP_NETSPEED_EDITION = 10;
const GEOIP_NETSPEED_EDITION_REV1 = 32;
const GEOIP_ORG_EDITION = 5;
const GEOIP_PROXY_EDITION = 8;
const GEOIP_REGION_EDITION_REV0 = 7;
const GEOIP_REGION_EDITION_REV1 = 3;
const GEOIP_UNKNOWN_SPEED = 0;
}

View File

@@ -0,0 +1,194 @@
<?php
// phpcs:disable Generic.Files.LineLength,PEAR.Commenting,PEAR.NamingConventions
class GeoIP
{
public $flags;
public $filehandle;
public $memory_buffer;
public $databaseType;
public $databaseSegments;
public $record_length;
public $shmid;
public $GEOIP_COUNTRY_CODE_TO_NUMBER = array("" => 0, "AP" => 1, "EU" => 2, "AD" => 3, "AE" => 4, "AF" => 5, "AG" => 6, "AI" => 7, "AL" => 8, "AM" => 9, "CW" => 10, "AO" => 11, "AQ" => 12, "AR" => 13, "AS" => 14, "AT" => 15, "AU" => 16, "AW" => 17, "AZ" => 18, "BA" => 19, "BB" => 20, "BD" => 21, "BE" => 22, "BF" => 23, "BG" => 24, "BH" => 25, "BI" => 26, "BJ" => 27, "BM" => 28, "BN" => 29, "BO" => 30, "BR" => 31, "BS" => 32, "BT" => 33, "BV" => 34, "BW" => 35, "BY" => 36, "BZ" => 37, "CA" => 38, "CC" => 39, "CD" => 40, "CF" => 41, "CG" => 42, "CH" => 43, "CI" => 44, "CK" => 45, "CL" => 46, "CM" => 47, "CN" => 48, "CO" => 49, "CR" => 50, "CU" => 51, "CV" => 52, "CX" => 53, "CY" => 54, "CZ" => 55, "DE" => 56, "DJ" => 57, "DK" => 58, "DM" => 59, "DO" => 60, "DZ" => 61, "EC" => 62, "EE" => 63, "EG" => 64, "EH" => 65, "ER" => 66, "ES" => 67, "ET" => 68, "FI" => 69, "FJ" => 70, "FK" => 71, "FM" => 72, "FO" => 73, "FR" => 74, "SX" => 75, "GA" => 76, "GB" => 77, "GD" => 78, "GE" => 79, "GF" => 80, "GH" => 81, "GI" => 82, "GL" => 83, "GM" => 84, "GN" => 85, "GP" => 86, "GQ" => 87, "GR" => 88, "GS" => 89, "GT" => 90, "GU" => 91, "GW" => 92, "GY" => 93, "HK" => 94, "HM" => 95, "HN" => 96, "HR" => 97, "HT" => 98, "HU" => 99, "ID" => 100, "IE" => 101, "IL" => 102, "IN" => 103, "IO" => 104, "IQ" => 105, "IR" => 106, "IS" => 107, "IT" => 108, "JM" => 109, "JO" => 110, "JP" => 111, "KE" => 112, "KG" => 113, "KH" => 114, "KI" => 115, "KM" => 116, "KN" => 117, "KP" => 118, "KR" => 119, "KW" => 120, "KY" => 121, "KZ" => 122, "LA" => 123, "LB" => 124, "LC" => 125, "LI" => 126, "LK" => 127, "LR" => 128, "LS" => 129, "LT" => 130, "LU" => 131, "LV" => 132, "LY" => 133, "MA" => 134, "MC" => 135, "MD" => 136, "MG" => 137, "MH" => 138, "MK" => 139, "ML" => 140, "MM" => 141, "MN" => 142, "MO" => 143, "MP" => 144, "MQ" => 145, "MR" => 146, "MS" => 147, "MT" => 148, "MU" => 149, "MV" => 150, "MW" => 151, "MX" => 152, "MY" => 153, "MZ" => 154, "NA" => 155, "NC" => 156, "NE" => 157, "NF" => 158, "NG" => 159, "NI" => 160, "NL" => 161, "NO" => 162, "NP" => 163, "NR" => 164, "NU" => 165, "NZ" => 166, "OM" => 167, "PA" => 168, "PE" => 169, "PF" => 170, "PG" => 171, "PH" => 172, "PK" => 173, "PL" => 174, "PM" => 175, "PN" => 176, "PR" => 177, "PS" => 178, "PT" => 179, "PW" => 180, "PY" => 181, "QA" => 182, "RE" => 183, "RO" => 184, "RU" => 185, "RW" => 186, "SA" => 187, "SB" => 188, "SC" => 189, "SD" => 190, "SE" => 191, "SG" => 192, "SH" => 193, "SI" => 194, "SJ" => 195, "SK" => 196, "SL" => 197, "SM" => 198, "SN" => 199, "SO" => 200, "SR" => 201, "ST" => 202, "SV" => 203, "SY" => 204, "SZ" => 205, "TC" => 206, "TD" => 207, "TF" => 208, "TG" => 209, "TH" => 210, "TJ" => 211, "TK" => 212, "TM" => 213, "TN" => 214, "TO" => 215, "TL" => 216, "TR" => 217, "TT" => 218, "TV" => 219, "TW" => 220, "TZ" => 221, "UA" => 222, "UG" => 223, "UM" => 224, "US" => 225, "UY" => 226, "UZ" => 227, "VA" => 228, "VC" => 229, "VE" => 230, "VG" => 231, "VI" => 232, "VN" => 233, "VU" => 234, "WF" => 235, "WS" => 236, "YE" => 237, "YT" => 238, "RS" => 239, "ZA" => 240, "ZM" => 241, "ME" => 242, "ZW" => 243, "A1" => 244, "A2" => 245, "O1" => 246, "AX" => 247, "GG" => 248, "IM" => 249, "JE" => 250, "BL" => 251, "MF" => 252, "BQ" => 253, "SS" => 254);
public $GEOIP_COUNTRY_CODES = array("", "AP", "EU", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "CW", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "SX", "GA", "GB", "GD", "GE", "GF", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TM", "TN", "TO", "TL", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "RS", "ZA", "ZM", "ME", "ZW", "A1", "A2", "O1", "AX", "GG", "IM", "JE", "BL", "MF", "BQ", "SS", "O1");
public $GEOIP_COUNTRY_CODES3 = array("", "AP", "EU", "AND", "ARE", "AFG", "ATG", "AIA", "ALB", "ARM", "CUW", "AGO", "ATA", "ARG", "ASM", "AUT", "AUS", "ABW", "AZE", "BIH", "BRB", "BGD", "BEL", "BFA", "BGR", "BHR", "BDI", "BEN", "BMU", "BRN", "BOL", "BRA", "BHS", "BTN", "BVT", "BWA", "BLR", "BLZ", "CAN", "CCK", "COD", "CAF", "COG", "CHE", "CIV", "COK", "CHL", "CMR", "CHN", "COL", "CRI", "CUB", "CPV", "CXR", "CYP", "CZE", "DEU", "DJI", "DNK", "DMA", "DOM", "DZA", "ECU", "EST", "EGY", "ESH", "ERI", "ESP", "ETH", "FIN", "FJI", "FLK", "FSM", "FRO", "FRA", "SXM", "GAB", "GBR", "GRD", "GEO", "GUF", "GHA", "GIB", "GRL", "GMB", "GIN", "GLP", "GNQ", "GRC", "SGS", "GTM", "GUM", "GNB", "GUY", "HKG", "HMD", "HND", "HRV", "HTI", "HUN", "IDN", "IRL", "ISR", "IND", "IOT", "IRQ", "IRN", "ISL", "ITA", "JAM", "JOR", "JPN", "KEN", "KGZ", "KHM", "KIR", "COM", "KNA", "PRK", "KOR", "KWT", "CYM", "KAZ", "LAO", "LBN", "LCA", "LIE", "LKA", "LBR", "LSO", "LTU", "LUX", "LVA", "LBY", "MAR", "MCO", "MDA", "MDG", "MHL", "MKD", "MLI", "MMR", "MNG", "MAC", "MNP", "MTQ", "MRT", "MSR", "MLT", "MUS", "MDV", "MWI", "MEX", "MYS", "MOZ", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", "NLD", "NOR", "NPL", "NRU", "NIU", "NZL", "OMN", "PAN", "PER", "PYF", "PNG", "PHL", "PAK", "POL", "SPM", "PCN", "PRI", "PSE", "PRT", "PLW", "PRY", "QAT", "REU", "ROU", "RUS", "RWA", "SAU", "SLB", "SYC", "SDN", "SWE", "SGP", "SHN", "SVN", "SJM", "SVK", "SLE", "SMR", "SEN", "SOM", "SUR", "STP", "SLV", "SYR", "SWZ", "TCA", "TCD", "ATF", "TGO", "THA", "TJK", "TKL", "TKM", "TUN", "TON", "TLS", "TUR", "TTO", "TUV", "TWN", "TZA", "UKR", "UGA", "UMI", "USA", "URY", "UZB", "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "YEM", "MYT", "SRB", "ZAF", "ZMB", "MNE", "ZWE", "A1", "A2", "O1", "ALA", "GGY", "IMN", "JEY", "BLM", "MAF", "BES", "SSD", "O1");
public $GEOIP_COUNTRY_NAMES = array("", "Asia/Pacific Region", "Europe", "Andorra", "United Arab Emirates", "Afghanistan", "Antigua and Barbuda", "Anguilla", "Albania", "Armenia", "Curacao", "Angola", "Antarctica", "Argentina", "American Samoa", "Austria", "Australia", "Aruba", "Azerbaijan", "Bosnia and Herzegovina", "Barbados", "Bangladesh", "Belgium", "Burkina Faso", "Bulgaria", "Bahrain", "Burundi", "Benin", "Bermuda", "Brunei Darussalam", "Bolivia", "Brazil", "Bahamas", "Bhutan", "Bouvet Island", "Botswana", "Belarus", "Belize", "Canada", "Cocos (Keeling) Islands", "Congo, The Democratic Republic of the", "Central African Republic", "Congo", "Switzerland", "Cote D'Ivoire", "Cook Islands", "Chile", "Cameroon", "China", "Colombia", "Costa Rica", "Cuba", "Cape Verde", "Christmas Island", "Cyprus", "Czech Republic", "Germany", "Djibouti", "Denmark", "Dominica", "Dominican Republic", "Algeria", "Ecuador", "Estonia", "Egypt", "Western Sahara", "Eritrea", "Spain", "Ethiopia", "Finland", "Fiji", "Falkland Islands (Malvinas)", "Micronesia, Federated States of", "Faroe Islands", "France", "Sint Maarten (Dutch part)", "Gabon", "United Kingdom", "Grenada", "Georgia", "French Guiana", "Ghana", "Gibraltar", "Greenland", "Gambia", "Guinea", "Guadeloupe", "Equatorial Guinea", "Greece", "South Georgia and the South Sandwich Islands", "Guatemala", "Guam", "Guinea-Bissau", "Guyana", "Hong Kong", "Heard Island and McDonald Islands", "Honduras", "Croatia", "Haiti", "Hungary", "Indonesia", "Ireland", "Israel", "India", "British Indian Ocean Territory", "Iraq", "Iran, Islamic Republic of", "Iceland", "Italy", "Jamaica", "Jordan", "Japan", "Kenya", "Kyrgyzstan", "Cambodia", "Kiribati", "Comoros", "Saint Kitts and Nevis", "Korea, Democratic People's Republic of", "Korea, Republic of", "Kuwait", "Cayman Islands", "Kazakhstan", "Lao People's Democratic Republic", "Lebanon", "Saint Lucia", "Liechtenstein", "Sri Lanka", "Liberia", "Lesotho", "Lithuania", "Luxembourg", "Latvia", "Libya", "Morocco", "Monaco", "Moldova, Republic of", "Madagascar", "Marshall Islands", "Macedonia", "Mali", "Myanmar", "Mongolia", "Macau", "Northern Mariana Islands", "Martinique", "Mauritania", "Montserrat", "Malta", "Mauritius", "Maldives", "Malawi", "Mexico", "Malaysia", "Mozambique", "Namibia", "New Caledonia", "Niger", "Norfolk Island", "Nigeria", "Nicaragua", "Netherlands", "Norway", "Nepal", "Nauru", "Niue", "New Zealand", "Oman", "Panama", "Peru", "French Polynesia", "Papua New Guinea", "Philippines", "Pakistan", "Poland", "Saint Pierre and Miquelon", "Pitcairn Islands", "Puerto Rico", "Palestinian Territory", "Portugal", "Palau", "Paraguay", "Qatar", "Reunion", "Romania", "Russian Federation", "Rwanda", "Saudi Arabia", "Solomon Islands", "Seychelles", "Sudan", "Sweden", "Singapore", "Saint Helena", "Slovenia", "Svalbard and Jan Mayen", "Slovakia", "Sierra Leone", "San Marino", "Senegal", "Somalia", "Suriname", "Sao Tome and Principe", "El Salvador", "Syrian Arab Republic", "Swaziland", "Turks and Caicos Islands", "Chad", "French Southern Territories", "Togo", "Thailand", "Tajikistan", "Tokelau", "Turkmenistan", "Tunisia", "Tonga", "Timor-Leste", "Turkey", "Trinidad and Tobago", "Tuvalu", "Taiwan", "Tanzania, United Republic of", "Ukraine", "Uganda", "United States Minor Outlying Islands", "United States", "Uruguay", "Uzbekistan", "Holy See (Vatican City State)", "Saint Vincent and the Grenadines", "Venezuela", "Virgin Islands, British", "Virgin Islands, U.S.", "Vietnam", "Vanuatu", "Wallis and Futuna", "Samoa", "Yemen", "Mayotte", "Serbia", "South Africa", "Zambia", "Montenegro", "Zimbabwe", "Anonymous Proxy", "Satellite Provider", "Other", "Aland Islands", "Guernsey", "Isle of Man", "Jersey", "Saint Barthelemy", "Saint Martin", "Bonaire, Saint Eustatius and Saba", "South Sudan", "Other");
public $GEOIP_CONTINENT_CODES = array("--", "AS", "EU", "EU", "AS", "AS", "NA", "NA", "EU", "AS", "NA", "AF", "AN", "SA", "OC", "EU", "OC", "NA", "AS", "EU", "NA", "AS", "EU", "AF", "EU", "AS", "AF", "AF", "NA", "AS", "SA", "SA", "NA", "AS", "AN", "AF", "EU", "NA", "NA", "AS", "AF", "AF", "AF", "EU", "AF", "OC", "SA", "AF", "AS", "SA", "NA", "NA", "AF", "AS", "AS", "EU", "EU", "AF", "EU", "NA", "NA", "AF", "SA", "EU", "AF", "AF", "AF", "EU", "AF", "EU", "OC", "SA", "OC", "EU", "EU", "NA", "AF", "EU", "NA", "AS", "SA", "AF", "EU", "NA", "AF", "AF", "NA", "AF", "EU", "AN", "NA", "OC", "AF", "SA", "AS", "AN", "NA", "EU", "NA", "EU", "AS", "EU", "AS", "AS", "AS", "AS", "AS", "EU", "EU", "NA", "AS", "AS", "AF", "AS", "AS", "OC", "AF", "NA", "AS", "AS", "AS", "NA", "AS", "AS", "AS", "NA", "EU", "AS", "AF", "AF", "EU", "EU", "EU", "AF", "AF", "EU", "EU", "AF", "OC", "EU", "AF", "AS", "AS", "AS", "OC", "NA", "AF", "NA", "EU", "AF", "AS", "AF", "NA", "AS", "AF", "AF", "OC", "AF", "OC", "AF", "NA", "EU", "EU", "AS", "OC", "OC", "OC", "AS", "NA", "SA", "OC", "OC", "AS", "AS", "EU", "NA", "OC", "NA", "AS", "EU", "OC", "SA", "AS", "AF", "EU", "EU", "AF", "AS", "OC", "AF", "AF", "EU", "AS", "AF", "EU", "EU", "EU", "AF", "EU", "AF", "AF", "SA", "AF", "NA", "AS", "AF", "NA", "AF", "AN", "AF", "AS", "AS", "OC", "AS", "AF", "OC", "AS", "EU", "NA", "OC", "AS", "AF", "EU", "AF", "OC", "NA", "SA", "AS", "EU", "NA", "SA", "NA", "NA", "AS", "OC", "OC", "OC", "AS", "AF", "EU", "AF", "AF", "EU", "AF", "--", "--", "--", "EU", "EU", "EU", "EU", "NA", "NA", "NA", "AF", "--");
}
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/* geoip.inc
*
* Copyright (C) 2007 MaxMind LLC
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
\define("GEOIP_COUNTRY_BEGIN", 16776960);
\define("GEOIP_STATE_BEGIN_REV0", 16700000);
\define("GEOIP_STATE_BEGIN_REV1", 16000000);
\define("GEOIP_STANDARD", 0);
\define("GEOIP_MEMORY_CACHE", 1);
\define("GEOIP_SHARED_MEMORY", 2);
\define("STRUCTURE_INFO_MAX_SIZE", 20);
\define("DATABASE_INFO_MAX_SIZE", 100);
\define("GEOIP_COUNTRY_EDITION", 1);
\define("GEOIP_PROXY_EDITION", 8);
\define("GEOIP_ASNUM_EDITION", 9);
\define("GEOIP_NETSPEED_EDITION", 10);
\define("GEOIP_REGION_EDITION_REV0", 7);
\define("GEOIP_REGION_EDITION_REV1", 3);
\define("GEOIP_CITY_EDITION_REV0", 6);
\define("GEOIP_CITY_EDITION_REV1", 2);
\define("GEOIP_ORG_EDITION", 5);
\define("GEOIP_ISP_EDITION", 4);
\define("SEGMENT_RECORD_LENGTH", 3);
\define("STANDARD_RECORD_LENGTH", 3);
\define("ORG_RECORD_LENGTH", 4);
\define("MAX_RECORD_LENGTH", 4);
\define("MAX_ORG_RECORD_LENGTH", 300);
\define("GEOIP_SHM_KEY", 0x4f415401);
\define("US_OFFSET", 1);
\define("CANADA_OFFSET", 677);
\define("WORLD_OFFSET", 1353);
\define("FIPS_RANGE", 360);
\define("GEOIP_UNKNOWN_SPEED", 0);
\define("GEOIP_DIALUP_SPEED", 1);
\define("GEOIP_CABLEDSL_SPEED", 2);
\define("GEOIP_CORPORATE_SPEED", 3);
\define("GEOIP_DOMAIN_EDITION", 11);
\define("GEOIP_COUNTRY_EDITION_V6", 12);
\define("GEOIP_LOCATIONA_EDITION", 13);
\define("GEOIP_ACCURACYRADIUS_EDITION", 14);
\define("GEOIP_CITYCOMBINED_EDITION", 15);
\define("GEOIP_CITY_EDITION_REV1_V6", 30);
\define("GEOIP_CITY_EDITION_REV0_V6", 31);
\define("GEOIP_NETSPEED_EDITION_REV1", 32);
\define("GEOIP_NETSPEED_EDITION_REV1_V6", 33);
\define("GEOIP_USERTYPE_EDITION", 28);
\define("GEOIP_USERTYPE_EDITION_V6", 29);
\define("GEOIP_ASNUM_EDITION_V6", 21);
\define("GEOIP_ISP_EDITION_V6", 22);
\define("GEOIP_ORG_EDITION_V6", 23);
\define("GEOIP_DOMAIN_EDITION_V6", 24);
\define("CITYCOMBINED_FIXED_RECORD", 7);
function geoip_load_shared_mem($file)
{
}
function _setup_segments($gi)
{
}
// This should be only used for variable-length records where
// $start + $maxLength may be greater than the shared mem size
function _sharedMemRead($gi, $start, $maxLength)
{
}
/**
* @param string $filename
* @param int $flags
* @return GeoIP
*/
function geoip_open($filename, $flags)
{
}
/**
* @param GeoIP $gi
* @return bool
*/
function geoip_close($gi)
{
}
function geoip_country_id_by_name_v6($gi, $name)
{
}
function geoip_country_id_by_name($gi, $name)
{
}
function geoip_country_code_by_name_v6($gi, $name)
{
}
function geoip_country_code_by_name($gi, $name)
{
}
function geoip_country_name_by_name_v6($gi, $name)
{
}
function geoip_country_name_by_name($gi, $name)
{
}
function geoip_country_id_by_addr_v6($gi, $addr)
{
}
function geoip_country_id_by_addr($gi, $addr)
{
}
/**
* @return string|false
*/
function geoip_country_code_by_addr_v6($gi, $addr)
{
}
/**
* @param GeoIP $gi
* @return string|false
*/
function geoip_country_code_by_addr($gi, $addr)
{
}
/**
* @param GeoIP $gi
* @return string|false
*/
function geoip_country_name_by_addr_v6($gi, $addr)
{
}
/**
* @param GeoIP $gi
* @return string|false
*/
function geoip_country_name_by_addr($gi, $addr)
{
}
function _geoip_seek_country_v6($gi, $ipnum)
{
}
function _geoip_seek_country($gi, $ipnum)
{
}
function _common_get_org($gi, $seek_org)
{
}
function _get_org_v6($gi, $ipnum)
{
}
function _get_org($gi, $ipnum)
{
}
function geoip_name_by_addr_v6($gi, $addr)
{
}
function geoip_name_by_addr($gi, $addr)
{
}
function geoip_org_by_addr($gi, $addr)
{
}
function _get_region($gi, $ipnum)
{
}
function geoip_region_by_addr($gi, $addr)
{
}
function _safe_substr($string, $start, $length)
{
}

View File

@@ -0,0 +1,149 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension imap@7.4.33
namespace {
function imap_8bit($text) {}
function imap_alerts() {}
function imap_append($stream_id, $folder, $message, $options = null, $date = null) {}
function imap_base64($text) {}
function imap_binary($text) {}
function imap_body($stream_id, $msg_no, $options = null) {}
function imap_bodystruct($stream_id, $msg_no, $section) {}
function imap_check($stream_id) {}
function imap_clearflag_full($stream_id, $sequence, $flag, $options = null) {}
function imap_close($stream_id, $options = null) {}
function imap_create($stream_id, $mailbox) {}
function imap_createmailbox($stream_id, $mailbox) {}
function imap_delete($stream_id, $msg_no, $options = null) {}
function imap_deletemailbox($stream_id, $mailbox) {}
function imap_errors() {}
function imap_expunge($stream_id) {}
function imap_fetch_overview($stream_id, $sequence, $options = null) {}
function imap_fetchbody($stream_id, $msg_no, $section, $options = null) {}
function imap_fetchheader($stream_id, $msg_no, $options = null) {}
function imap_fetchmime($stream_id, $msg_no, $section, $options = null) {}
function imap_fetchstructure($stream_id, $msg_no, $options = null) {}
function imap_fetchtext($stream_id, $msg_no, $options = null) {}
function imap_gc($stream_id, $flags = null) {}
function imap_get_quota($stream_id, $qroot) {}
function imap_get_quotaroot($stream_id, $mbox) {}
function imap_getacl($stream_id, $mailbox) {}
function imap_getmailboxes($stream_id, $ref, $pattern) {}
function imap_getsubscribed($stream_id, $ref, $pattern) {}
function imap_header($stream_id, $msg_no, $from_length = null, $subject_length = null, $default_host = null) {}
function imap_headerinfo($stream_id, $msg_no, $from_length = null, $subject_length = null, $default_host = null) {}
function imap_headers($stream_id) {}
function imap_last_error() {}
function imap_list($stream_id, $ref, $pattern) {}
function imap_listmailbox($stream_id, $ref, $pattern) {}
function imap_listscan($stream_id, $ref, $pattern, $content) {}
function imap_listsubscribed($stream_id, $ref, $pattern) {}
function imap_lsub($stream_id, $ref, $pattern) {}
function imap_mail($to, $subject, $message, $additional_headers = null, $cc = null, $bcc = null, $rpath = null) {}
function imap_mail_compose($envelope, $body) {}
function imap_mail_copy($stream_id, $msglist, $mailbox, $options = null) {}
function imap_mail_move($stream_id, $sequence, $mailbox, $options = null) {}
function imap_mailboxmsginfo($stream_id) {}
function imap_mime_header_decode($str) {}
function imap_msgno($stream_id, $unique_msg_id) {}
function imap_mutf7_to_utf8($in) {}
function imap_num_msg($stream_id) {}
function imap_num_recent($stream_id) {}
function imap_open($mailbox, $user, $password, $options = null, $n_retries = null, $params = null) {}
function imap_ping($stream_id) {}
function imap_qprint($text) {}
function imap_rename($stream_id, $old_name, $new_name) {}
function imap_renamemailbox($stream_id, $old_name, $new_name) {}
function imap_reopen($stream_id, $mailbox, $options = null, $n_retries = null) {}
function imap_rfc822_parse_adrlist($address_string, $default_host) {}
function imap_rfc822_parse_headers($headers, $default_host = null) {}
function imap_rfc822_write_address($mailbox, $host, $personal) {}
function imap_savebody($stream_id, $file, $msg_no, $section = null, $options = null) {}
function imap_scan($stream_id, $ref, $pattern, $content) {}
function imap_scanmailbox($stream_id, $ref, $pattern, $content) {}
function imap_search($stream_id, $criteria, $options = null, $charset = null) {}
function imap_set_quota($stream_id, $qroot, $mailbox_size) {}
function imap_setacl($stream_id, $mailbox, $id, $rights) {}
function imap_setflag_full($stream_id, $sequence, $flag, $options = null) {}
function imap_sort($stream_id, $criteria, $reverse, $options = null, $search_criteria = null, $charset = null) {}
function imap_status($stream_id, $mailbox, $options) {}
function imap_subscribe($stream_id, $mailbox) {}
function imap_thread($stream_id, $options = null) {}
function imap_timeout($timeout_type, $timeout = null) {}
function imap_uid($stream_id, $msg_no) {}
function imap_undelete($stream_id, $msg_no, $flags = null) {}
function imap_unsubscribe($stream_id, $mailbox) {}
function imap_utf7_decode($buf) {}
function imap_utf7_encode($buf) {}
function imap_utf8($mime_encoded_text) {}
function imap_utf8_to_mutf7($in) {}
const CL_EXPUNGE = 32768;
const CP_MOVE = 2;
const CP_UID = 1;
const ENC7BIT = 0;
const ENC8BIT = 1;
const ENCBASE64 = 3;
const ENCBINARY = 2;
const ENCOTHER = 5;
const ENCQUOTEDPRINTABLE = 4;
const FT_INTERNAL = 8;
const FT_NOT = 4;
const FT_PEEK = 2;
const FT_PREFETCHTEXT = 32;
const FT_UID = 1;
const IMAP_CLOSETIMEOUT = 4;
const IMAP_GC_ELT = 1;
const IMAP_GC_ENV = 2;
const IMAP_GC_TEXTS = 4;
const IMAP_OPENTIMEOUT = 1;
const IMAP_READTIMEOUT = 2;
const IMAP_WRITETIMEOUT = 3;
const LATT_HASCHILDREN = 32;
const LATT_HASNOCHILDREN = 64;
const LATT_MARKED = 4;
const LATT_NOINFERIORS = 1;
const LATT_NOSELECT = 2;
const LATT_REFERRAL = 16;
const LATT_UNMARKED = 8;
const NIL = 0;
const OP_ANONYMOUS = 4;
const OP_DEBUG = 1;
const OP_EXPUNGE = 128;
const OP_HALFOPEN = 64;
const OP_PROTOTYPE = 32;
const OP_READONLY = 2;
const OP_SECURE = 256;
const OP_SHORTCACHE = 8;
const OP_SILENT = 16;
const SA_ALL = 31;
const SA_MESSAGES = 1;
const SA_RECENT = 2;
const SA_UIDNEXT = 8;
const SA_UIDVALIDITY = 16;
const SA_UNSEEN = 4;
const SE_FREE = 2;
const SE_NOPREFETCH = 4;
const SE_UID = 1;
const SORTARRIVAL = 1;
const SORTCC = 5;
const SORTDATE = 0;
const SORTFROM = 2;
const SORTSIZE = 6;
const SORTSUBJECT = 3;
const SORTTO = 4;
const SO_FREE = 8;
const SO_NOSERVER = 16;
const ST_SET = 4;
const ST_SILENT = 2;
const ST_UID = 1;
const TYPEAPPLICATION = 3;
const TYPEAUDIO = 4;
const TYPEIMAGE = 5;
const TYPEMESSAGE = 2;
const TYPEMODEL = 7;
const TYPEMULTIPART = 1;
const TYPEOTHER = 8;
const TYPETEXT = 0;
const TYPEVIDEO = 6;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,157 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension ldap@7.4.33
namespace {
function ldap_add($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_add_ext($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_bind($link_identifier, $bind_rdn = null, $bind_password = null) {}
function ldap_bind_ext($link_identifier, $bind_rdn = null, $bind_password = null, $servercontrols = null) {}
function ldap_close($link_identifier) {}
function ldap_compare($link_identifier, $dn, $attribute, $value, $servercontrols = null) {}
function ldap_connect($hostname = null, $port = null) {}
function ldap_control_paged_result($link, $pagesize, $iscritical = null, $cookie = null) {}
function ldap_control_paged_result_response($link, $result, &$cookie = null, &$estimated = null) {}
function ldap_count_entries($link_identifier, $result_identifier) {}
function ldap_delete($link_identifier, $dn, $servercontrols = null) {}
function ldap_delete_ext($link_identifier, $dn, $servercontrols = null) {}
function ldap_dn2ufn($dn) {}
function ldap_err2str($errno) {}
/** @return int */
function ldap_errno($link_identifier) {}
/** @return string */
function ldap_error($link_identifier) {}
function ldap_escape($value, $ignore = null, $flags = null) {}
function ldap_exop($link, $reqoid, $reqdata = null, $servercontrols = null, &$retdata = null, &$retoid = null) {}
function ldap_exop_passwd($link, $user = null, $oldpw = null, $newpw = null, &$serverctrls = null) {}
function ldap_exop_refresh($link, $dn, $ttl) {}
function ldap_exop_whoami($link) {}
function ldap_explode_dn($dn, $with_attrib) {}
function ldap_first_attribute($link_identifier, $result_entry_identifier) {}
function ldap_first_entry($link_identifier, $result_identifier) {}
function ldap_first_reference($link, $result) {}
function ldap_free_result($link_identifier) {}
function ldap_get_attributes($link_identifier, $result_entry_identifier) {}
function ldap_get_dn($link_identifier, $result_entry_identifier) {}
function ldap_get_entries($link_identifier, $result_identifier) {}
function ldap_get_option($link_identifier, $option, &$retval) {}
function ldap_get_values($link_identifier, $result_entry_identifier, $attribute) {}
function ldap_get_values_len($link_identifier, $result_entry_identifier, $attribute) {}
function ldap_list($link_identifier, $base_dn, $filter, $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $servercontrols = null) {}
function ldap_mod_add($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_mod_add_ext($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_mod_del($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_mod_del_ext($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_mod_replace($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_mod_replace_ext($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_modify($link_identifier, $dn, $entry, $servercontrols = null) {}
function ldap_modify_batch($link_identifier, $dn, array $modifications_info, $servercontrols = null) {}
function ldap_next_attribute($link_identifier, $result_entry_identifier) {}
function ldap_next_entry($link_identifier, $result_identifier) {}
function ldap_next_reference($link, $entry) {}
function ldap_parse_exop($link, $result, &$retdata, &$retoid) {}
function ldap_parse_reference($link, $entry, &$referrals) {}
function ldap_parse_result($link, $result, &$errcode, &$matcheddn = null, &$errmsg = null, &$referrals = null, &$serverctrls = null) {}
function ldap_read($link_identifier, $base_dn, $filter, $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $servercontrols = null) {}
function ldap_rename($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $servercontrols = null) {}
function ldap_rename_ext($link_identifier, $dn, $newrdn, $newparent, $deleteoldrdn, $servercontrols = null) {}
function ldap_sasl_bind($link, $binddn = null, $password = null, $sasl_mech = null, $sasl_realm = null, $sasl_authz_id = null, $props = null) {}
function ldap_search($link_identifier, $base_dn, $filter, $attributes = null, $attrsonly = null, $sizelimit = null, $timelimit = null, $deref = null, $servercontrols = null) {}
function ldap_set_option($link_identifier, $option, $newval) {}
function ldap_set_rebind_proc($link, $callback) {}
function ldap_sort($link, $result, $sortfilter) {}
function ldap_start_tls($link_identifier) {}
function ldap_unbind($link_identifier) {}
const LDAP_CONTROL_ASSERT = '1.3.6.1.1.12';
const LDAP_CONTROL_DONTUSECOPY = '1.3.6.1.1.22';
const LDAP_CONTROL_MANAGEDSAIT = '2.16.840.1.113730.3.4.2';
const LDAP_CONTROL_PAGEDRESULTS = '1.2.840.113556.1.4.319';
const LDAP_CONTROL_PASSWORDPOLICYREQUEST = '1.3.6.1.4.1.42.2.27.8.5.1';
const LDAP_CONTROL_PASSWORDPOLICYRESPONSE = '1.3.6.1.4.1.42.2.27.8.5.1';
const LDAP_CONTROL_POST_READ = '1.3.6.1.1.13.2';
const LDAP_CONTROL_PRE_READ = '1.3.6.1.1.13.1';
const LDAP_CONTROL_PROXY_AUTHZ = '2.16.840.1.113730.3.4.18';
const LDAP_CONTROL_SORTREQUEST = '1.2.840.113556.1.4.473';
const LDAP_CONTROL_SORTRESPONSE = '1.2.840.113556.1.4.474';
const LDAP_CONTROL_SUBENTRIES = '1.3.6.1.4.1.4203.1.10.1';
const LDAP_CONTROL_SYNC = '1.3.6.1.4.1.4203.1.9.1.1';
const LDAP_CONTROL_SYNC_DONE = '1.3.6.1.4.1.4203.1.9.1.3';
const LDAP_CONTROL_SYNC_STATE = '1.3.6.1.4.1.4203.1.9.1.2';
const LDAP_CONTROL_VALUESRETURNFILTER = '1.2.826.0.1.3344810.2.3';
const LDAP_CONTROL_VLVREQUEST = '2.16.840.1.113730.3.4.9';
const LDAP_CONTROL_VLVRESPONSE = '2.16.840.1.113730.3.4.10';
const LDAP_CONTROL_X_DOMAIN_SCOPE = '1.2.840.113556.1.4.1339';
const LDAP_CONTROL_X_EXTENDED_DN = '1.2.840.113556.1.4.529';
const LDAP_CONTROL_X_INCREMENTAL_VALUES = '1.2.840.113556.1.4.802';
const LDAP_CONTROL_X_PERMISSIVE_MODIFY = '1.2.840.113556.1.4.1413';
const LDAP_CONTROL_X_SEARCH_OPTIONS = '1.2.840.113556.1.4.1340';
const LDAP_CONTROL_X_TREE_DELETE = '1.2.840.113556.1.4.805';
const LDAP_DEREF_ALWAYS = 3;
const LDAP_DEREF_FINDING = 2;
const LDAP_DEREF_NEVER = 0;
const LDAP_DEREF_SEARCHING = 1;
const LDAP_ESCAPE_DN = 2;
const LDAP_ESCAPE_FILTER = 1;
const LDAP_EXOP_MODIFY_PASSWD = '1.3.6.1.4.1.4203.1.11.1';
const LDAP_EXOP_REFRESH = '1.3.6.1.4.1.1466.101.119.1';
const LDAP_EXOP_START_TLS = '1.3.6.1.4.1.1466.20037';
const LDAP_EXOP_TURN = '1.3.6.1.1.19';
const LDAP_EXOP_WHO_AM_I = '1.3.6.1.4.1.4203.1.11.3';
const LDAP_MODIFY_BATCH_ADD = 1;
const LDAP_MODIFY_BATCH_ATTRIB = 'attrib';
const LDAP_MODIFY_BATCH_MODTYPE = 'modtype';
const LDAP_MODIFY_BATCH_REMOVE = 2;
const LDAP_MODIFY_BATCH_REMOVE_ALL = 18;
const LDAP_MODIFY_BATCH_REPLACE = 3;
const LDAP_MODIFY_BATCH_VALUES = 'values';
const LDAP_OPT_CLIENT_CONTROLS = 19;
const LDAP_OPT_DEBUG_LEVEL = 20481;
const LDAP_OPT_DEREF = 2;
const LDAP_OPT_DIAGNOSTIC_MESSAGE = 50;
const LDAP_OPT_ERROR_NUMBER = 49;
const LDAP_OPT_ERROR_STRING = 50;
const LDAP_OPT_HOST_NAME = 48;
const LDAP_OPT_MATCHED_DN = 51;
const LDAP_OPT_NETWORK_TIMEOUT = 20485;
const LDAP_OPT_PROTOCOL_VERSION = 17;
const LDAP_OPT_REFERRALS = 8;
const LDAP_OPT_RESTART = 9;
const LDAP_OPT_SERVER_CONTROLS = 18;
const LDAP_OPT_SIZELIMIT = 3;
const LDAP_OPT_TIMELIMIT = 4;
const LDAP_OPT_TIMEOUT = 20482;
const LDAP_OPT_X_KEEPALIVE_IDLE = 25344;
const LDAP_OPT_X_KEEPALIVE_INTERVAL = 25346;
const LDAP_OPT_X_KEEPALIVE_PROBES = 25345;
const LDAP_OPT_X_SASL_AUTHCID = 24834;
const LDAP_OPT_X_SASL_AUTHZID = 24835;
const LDAP_OPT_X_SASL_MECH = 24832;
const LDAP_OPT_X_SASL_NOCANON = 24843;
const LDAP_OPT_X_SASL_REALM = 24833;
const LDAP_OPT_X_SASL_USERNAME = 24844;
const LDAP_OPT_X_TLS_ALLOW = 3;
const LDAP_OPT_X_TLS_CACERTDIR = 24579;
const LDAP_OPT_X_TLS_CACERTFILE = 24578;
const LDAP_OPT_X_TLS_CERTFILE = 24580;
const LDAP_OPT_X_TLS_CIPHER_SUITE = 24584;
const LDAP_OPT_X_TLS_CRLCHECK = 24587;
const LDAP_OPT_X_TLS_CRLFILE = 24592;
const LDAP_OPT_X_TLS_CRL_ALL = 2;
const LDAP_OPT_X_TLS_CRL_NONE = 0;
const LDAP_OPT_X_TLS_CRL_PEER = 1;
const LDAP_OPT_X_TLS_DEMAND = 2;
const LDAP_OPT_X_TLS_DHFILE = 24590;
const LDAP_OPT_X_TLS_HARD = 1;
const LDAP_OPT_X_TLS_KEYFILE = 24581;
const LDAP_OPT_X_TLS_NEVER = 0;
const LDAP_OPT_X_TLS_PACKAGE = 24593;
const LDAP_OPT_X_TLS_PROTOCOL_MIN = 24583;
const LDAP_OPT_X_TLS_PROTOCOL_SSL2 = 512;
const LDAP_OPT_X_TLS_PROTOCOL_SSL3 = 768;
const LDAP_OPT_X_TLS_PROTOCOL_TLS1_0 = 769;
const LDAP_OPT_X_TLS_PROTOCOL_TLS1_1 = 770;
const LDAP_OPT_X_TLS_PROTOCOL_TLS1_2 = 771;
const LDAP_OPT_X_TLS_RANDOM_FILE = 24585;
const LDAP_OPT_X_TLS_REQUIRE_CERT = 24582;
const LDAP_OPT_X_TLS_TRY = 4;
}

View File

@@ -0,0 +1,79 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension mcrypt@1.0.6
namespace {
function mcrypt_create_iv($size, $source = null) {}
function mcrypt_decrypt($cipher, $key, $data, $mode, $iv = null) {}
function mcrypt_enc_get_algorithms_name($td) {}
function mcrypt_enc_get_block_size($td) {}
function mcrypt_enc_get_iv_size($td) {}
function mcrypt_enc_get_key_size($td) {}
function mcrypt_enc_get_modes_name($td) {}
function mcrypt_enc_get_supported_key_sizes($td) {}
function mcrypt_enc_is_block_algorithm($td) {}
function mcrypt_enc_is_block_algorithm_mode($td) {}
function mcrypt_enc_is_block_mode($td) {}
function mcrypt_enc_self_test($td) {}
function mcrypt_encrypt($cipher, $key, $data, $mode, $iv = null) {}
function mcrypt_generic($td, $data) {}
function mcrypt_generic_deinit($td) {}
function mcrypt_generic_init($td, $key, $iv) {}
function mcrypt_get_block_size($cipher, $module) {}
function mcrypt_get_cipher_name($cipher) {}
function mcrypt_get_iv_size($cipher, $module) {}
function mcrypt_get_key_size($cipher, $module) {}
function mcrypt_list_algorithms($lib_dir = null) {}
function mcrypt_list_modes($lib_dir = null) {}
function mcrypt_module_close($td) {}
function mcrypt_module_get_algo_block_size($algorithm, $lib_dir = null) {}
function mcrypt_module_get_algo_key_size($algorithm, $lib_dir = null) {}
function mcrypt_module_get_supported_key_sizes($algorithm, $lib_dir = null) {}
function mcrypt_module_is_block_algorithm($algorithm, $lib_dir = null) {}
function mcrypt_module_is_block_algorithm_mode($mode, $lib_dir = null) {}
function mcrypt_module_is_block_mode($mode, $lib_dir = null) {}
function mcrypt_module_open($cipher, $cipher_directory, $mode, $mode_directory) {}
function mcrypt_module_self_test($algorithm, $lib_dir = null) {}
function mdecrypt_generic($td, $data) {}
const MCRYPT_3DES = 'tripledes';
const MCRYPT_ARCFOUR = 'arcfour';
const MCRYPT_ARCFOUR_IV = 'arcfour-iv';
const MCRYPT_BLOWFISH = 'blowfish';
const MCRYPT_BLOWFISH_COMPAT = 'blowfish-compat';
const MCRYPT_CAST_128 = 'cast-128';
const MCRYPT_CAST_256 = 'cast-256';
const MCRYPT_CRYPT = 'crypt';
const MCRYPT_DECRYPT = 1;
const MCRYPT_DES = 'des';
const MCRYPT_DEV_RANDOM = 0;
const MCRYPT_DEV_URANDOM = 1;
const MCRYPT_ENCRYPT = 0;
const MCRYPT_ENIGNA = 'crypt';
const MCRYPT_GOST = 'gost';
const MCRYPT_IDEA = 'idea';
const MCRYPT_LOKI97 = 'loki97';
const MCRYPT_MARS = 'mars';
const MCRYPT_MODE_CBC = 'cbc';
const MCRYPT_MODE_CFB = 'cfb';
const MCRYPT_MODE_ECB = 'ecb';
const MCRYPT_MODE_NOFB = 'nofb';
const MCRYPT_MODE_OFB = 'ofb';
const MCRYPT_MODE_STREAM = 'stream';
const MCRYPT_PANAMA = 'panama';
const MCRYPT_RAND = 2;
const MCRYPT_RC2 = 'rc2';
const MCRYPT_RC6 = 'rc6';
const MCRYPT_RIJNDAEL_128 = 'rijndael-128';
const MCRYPT_RIJNDAEL_192 = 'rijndael-192';
const MCRYPT_RIJNDAEL_256 = 'rijndael-256';
const MCRYPT_SAFER64 = 'safer-sk64';
const MCRYPT_SAFER128 = 'safer-sk128';
const MCRYPT_SAFERPLUS = 'saferplus';
const MCRYPT_SERPENT = 'serpent';
const MCRYPT_SKIPJACK = 'skipjack';
const MCRYPT_THREEWAY = 'threeway';
const MCRYPT_TRIPLEDES = 'tripledes';
const MCRYPT_TWOFISH = 'twofish';
const MCRYPT_WAKE = 'wake';
const MCRYPT_XTEA = 'xtea';
}

View File

@@ -0,0 +1,72 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension memcache@4.0.5.2
namespace {
class Memcache extends \MemcachePool {
// methods
public function connect() {}
public function pconnect() {}
public function addserver() {}
}
class MemcachePool {
// methods
public function connect() {}
public function addserver() {}
public function setserverparams() {}
public function setfailurecallback() {}
public function getserverstatus() {}
public function findserver() {}
public function getversion() {}
public function add() {}
public function set() {}
public function replace() {}
public function cas() {}
public function append() {}
public function prepend() {}
public function get($arg, &$arg, &$arg) {}
public function delete() {}
public function getstats() {}
public function getextendedstats() {}
public function setcompressthreshold() {}
public function increment() {}
public function decrement() {}
public function close() {}
public function flush() {}
public function setSaslAuthData() {}
}
function memcache_add() {}
function memcache_add_server() {}
function memcache_append() {}
function memcache_cas() {}
function memcache_close() {}
function memcache_connect() {}
function memcache_debug() {}
function memcache_decrement() {}
function memcache_delete() {}
function memcache_flush() {}
function memcache_get($arg, $arg, &$arg, &$arg) {}
function memcache_get_extended_stats() {}
function memcache_get_server_status() {}
function memcache_get_stats() {}
function memcache_get_version() {}
function memcache_increment() {}
function memcache_pconnect() {}
function memcache_prepend() {}
function memcache_replace() {}
function memcache_set() {}
function memcache_set_compress_threshold() {}
function memcache_set_failure_callback() {}
function memcache_set_sasl_auth_data() {}
function memcache_set_server_params() {}
const MEMCACHE_COMPRESSED = 2;
const MEMCACHE_HAVE_SESSION = 1;
const MEMCACHE_USER1 = 65536;
const MEMCACHE_USER2 = 131072;
const MEMCACHE_USER3 = 262144;
const MEMCACHE_USER4 = 524288;
}

View File

@@ -0,0 +1,48 @@
<?php
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* or see http://www.gnu.org/
*/
/**
* \file htdocs/core/modules/substitutions/functions_numberwords.lib.php
* \brief A set of functions for Dolibarr
* This file contains functions for plugin numberwords.
*/
/**
* Function called to complete substitution array (before generating on ODT, or a personalized email)
* functions xxx_completesubstitutionarray are called by make_substitutions() if file
* is inside directory htdocs/core/substitutions
*
* @param array $substitutionarray Array with substitution key=>val
* @param Translate $outlangs Output langs
* @param Object $object Object to use to get values
* @return void The entry parameter $substitutionarray is modified
*/
function numberwords_completesubstitutionarray(&$substitutionarray, $outlangs, $object)
{
}
/**
* Return full text translated to language label for a key. Store key-label in a cache.
*
* @param Translate $outlangs Language for output
* @param int $number Number to encode in full text
* @param string $isamount ''=it's just a number, '1'=It's an amount (default currency), 'currencycode'=It's an amount (foreign currency)
* @return string Label translated in UTF8 (but without entities)
* 10 if setDefaultLang was en_US => ten
* 123 if setDefaultLang was fr_FR => cent vingt trois
*/
function numberwords_getLabelFromNumber($outlangs, $number, $isamount = '')
{
}

View File

@@ -0,0 +1,397 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension mysqli@8.2.9
namespace {
class mysqli {
// properties
public $affected_rows;
public $client_info;
public $client_version;
public $connect_errno;
public $connect_error;
public $errno;
public $error;
public $error_list;
public $field_count;
public $host_info;
public $info;
public $insert_id;
public $protocol_version;
public $server_info;
public $server_version;
public $sqlstate;
public $stat;
public $thread_id;
public $warning_count;
// methods
public function __construct(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null) {}
public function autocommit(bool $enable) : bool {}
public function begin_transaction(int $flags = 0, ?string $name = null) : bool {}
public function change_user(string $username, string $password, ?string $database) : bool {}
public function character_set_name() : string {}
public function close() {}
public function commit(int $flags = 0, ?string $name = null) : bool {}
public function connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null) : bool {}
public function dump_debug_info() : bool {}
public function debug(string $options) {}
public function get_charset() : ?object {}
public function execute_query(string $query, ?array $params = null) : \mysqli_result|bool {}
public function get_client_info() : string {}
public function get_connection_stats() : array {}
public function get_server_info() : string {}
public function get_warnings() : \mysqli_warning|false {}
public function init() {}
public function kill(int $process_id) : bool {}
public function multi_query(string $query) : bool {}
public function more_results() : bool {}
public function next_result() : bool {}
public function ping() : bool {}
public static function poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0) : false|int {}
public function prepare(string $query) : \mysqli_stmt|false {}
public function query(string $query, int $result_mode = \MYSQLI_STORE_RESULT) : \mysqli_result|bool {}
public function real_connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null, int $flags = 0) : bool {}
public function real_escape_string(string $string) : string {}
public function reap_async_query() : \mysqli_result|bool {}
public function escape_string(string $string) : string {}
public function real_query(string $query) : bool {}
public function release_savepoint(string $name) : bool {}
public function rollback(int $flags = 0, ?string $name = null) : bool {}
public function savepoint(string $name) : bool {}
public function select_db(string $database) : bool {}
public function set_charset(string $charset) : bool {}
public function options(int $option, $value) : bool {}
public function set_opt(int $option, $value) : bool {}
public function ssl_set(?string $key, ?string $certificate, ?string $ca_certificate, ?string $ca_path, ?string $cipher_algos) {}
public function stat() : false|string {}
public function stmt_init() : \mysqli_stmt|false {}
public function store_result(int $mode = 0) : \mysqli_result|false {}
public function thread_safe() : bool {}
public function use_result() : \mysqli_result|false {}
public function refresh(int $flags) : bool {}
}
final class mysqli_driver {
// properties
public $client_info;
public $client_version;
public $driver_version;
public $embedded;
public $reconnect;
public $report_mode;
}
class mysqli_result implements \IteratorAggregate, \Traversable {
// properties
public $current_field;
public $field_count;
public $lengths;
public $num_rows;
public $type;
// methods
public function __construct(\mysqli $mysql, int $result_mode = \MYSQLI_STORE_RESULT) {}
public function close() : void {}
public function free() : void {}
public function data_seek(int $offset) : bool {}
public function fetch_field() : false|object {}
public function fetch_fields() : array {}
public function fetch_field_direct(int $index) : false|object {}
public function fetch_all(int $mode = \MYSQLI_NUM) : array {}
public function fetch_array(int $mode = \MYSQLI_BOTH) : array|false|null {}
public function fetch_assoc() : array|false|null {}
public function fetch_object(string $class = 'stdClass', array $constructor_args = []) : false|null|object {}
public function fetch_row() : array|false|null {}
public function fetch_column(int $column = 0) : false|float|int|null|string {}
public function field_seek(int $index) : bool {}
public function free_result() : void {}
public function getIterator() : \Iterator {}
}
final class mysqli_sql_exception extends \RuntimeException {
// properties
protected $sqlstate;
protected $message;
protected $code;
protected $file;
protected $line;
// methods
public function getSqlState() : string {}
}
class mysqli_stmt {
// properties
public $affected_rows;
public $errno;
public $error;
public $error_list;
public $field_count;
public $id;
public $insert_id;
public $num_rows;
public $param_count;
public $sqlstate;
// methods
public function __construct(\mysqli $mysql, ?string $query = null) {}
public function attr_get(int $attribute) : int {}
public function attr_set(int $attribute, int $value) : bool {}
public function bind_param(string $types, mixed &...$vars) : bool {}
public function bind_result(mixed &...$vars) : bool {}
public function close() {}
public function data_seek(int $offset) : void {}
public function execute(?array $params = null) : bool {}
public function fetch() : ?bool {}
public function get_warnings() : \mysqli_warning|false {}
public function result_metadata() : \mysqli_result|false {}
public function more_results() : bool {}
public function next_result() : bool {}
public function num_rows() : int|string {}
public function send_long_data(int $param_num, string $data) : bool {}
public function free_result() : void {}
public function reset() : bool {}
public function prepare(string $query) : bool {}
public function store_result() : bool {}
public function get_result() : \mysqli_result|false {}
}
final class mysqli_warning {
// properties
public $errno;
public $message;
public $sqlstate;
// methods
private function __construct() {}
public function next() : bool {}
}
function mysqli_affected_rows(\mysqli $mysql) : int|string {}
function mysqli_autocommit(\mysqli $mysql, bool $enable) : bool {}
function mysqli_begin_transaction(\mysqli $mysql, int $flags = 0, ?string $name = null) : bool {}
function mysqli_change_user(\mysqli $mysql, string $username, string $password, ?string $database) : bool {}
function mysqli_character_set_name(\mysqli $mysql) : string {}
function mysqli_close(\mysqli $mysql) : true {}
function mysqli_commit(\mysqli $mysql, int $flags = 0, ?string $name = null) : bool {}
function mysqli_connect(?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null) : \mysqli|false {}
function mysqli_connect_errno() : int {}
function mysqli_connect_error() : ?string {}
function mysqli_data_seek(\mysqli_result $result, int $offset) : bool {}
function mysqli_debug(string $options) : true {}
function mysqli_dump_debug_info(\mysqli $mysql) : bool {}
function mysqli_errno(\mysqli $mysql) : int {}
function mysqli_error(\mysqli $mysql) : string {}
function mysqli_error_list(\mysqli $mysql) : array {}
function mysqli_escape_string(\mysqli $mysql, string $string) : string {}
function mysqli_execute(\mysqli_stmt $statement, ?array $params = null) : bool {}
function mysqli_execute_query(\mysqli $mysql, string $query, ?array $params = null) : \mysqli_result|bool {}
function mysqli_fetch_all(\mysqli_result $result, int $mode = \MYSQLI_NUM) : array {}
function mysqli_fetch_array(\mysqli_result $result, int $mode = \MYSQLI_BOTH) : array|false|null {}
function mysqli_fetch_assoc(\mysqli_result $result) : array|false|null {}
function mysqli_fetch_column(\mysqli_result $result, int $column = 0) : false|float|int|null|string {}
function mysqli_fetch_field(\mysqli_result $result) : false|object {}
function mysqli_fetch_field_direct(\mysqli_result $result, int $index) : false|object {}
function mysqli_fetch_fields(\mysqli_result $result) : array {}
function mysqli_fetch_lengths(\mysqli_result $result) : array|false {}
function mysqli_fetch_object(\mysqli_result $result, string $class = 'stdClass', array $constructor_args = []) : false|null|object {}
function mysqli_fetch_row(\mysqli_result $result) : array|false|null {}
function mysqli_field_count(\mysqli $mysql) : int {}
function mysqli_field_seek(\mysqli_result $result, int $index) : bool {}
function mysqli_field_tell(\mysqli_result $result) : int {}
function mysqli_free_result(\mysqli_result $result) : void {}
function mysqli_get_charset(\mysqli $mysql) : ?object {}
function mysqli_get_client_info(?\mysqli $mysql = null) : string {}
function mysqli_get_client_stats() : array {}
function mysqli_get_client_version() : int {}
function mysqli_get_connection_stats(\mysqli $mysql) : array {}
function mysqli_get_host_info(\mysqli $mysql) : string {}
function mysqli_get_links_stats() : array {}
function mysqli_get_proto_info(\mysqli $mysql) : int {}
function mysqli_get_server_info(\mysqli $mysql) : string {}
function mysqli_get_server_version(\mysqli $mysql) : int {}
function mysqli_get_warnings(\mysqli $mysql) : \mysqli_warning|false {}
function mysqli_info(\mysqli $mysql) : ?string {}
function mysqli_init() : \mysqli|false {}
function mysqli_insert_id(\mysqli $mysql) : int|string {}
function mysqli_kill(\mysqli $mysql, int $process_id) : bool {}
function mysqli_more_results(\mysqli $mysql) : bool {}
function mysqli_multi_query(\mysqli $mysql, string $query) : bool {}
function mysqli_next_result(\mysqli $mysql) : bool {}
function mysqli_num_fields(\mysqli_result $result) : int {}
function mysqli_num_rows(\mysqli_result $result) : int|string {}
function mysqli_options(\mysqli $mysql, int $option, $value) : bool {}
function mysqli_ping(\mysqli $mysql) : bool {}
function mysqli_poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0) : false|int {}
function mysqli_prepare(\mysqli $mysql, string $query) : \mysqli_stmt|false {}
function mysqli_query(\mysqli $mysql, string $query, int $result_mode = \MYSQLI_STORE_RESULT) : \mysqli_result|bool {}
function mysqli_real_connect(\mysqli $mysql, ?string $hostname = null, ?string $username = null, ?string $password = null, ?string $database = null, ?int $port = null, ?string $socket = null, int $flags = 0) : bool {}
function mysqli_real_escape_string(\mysqli $mysql, string $string) : string {}
function mysqli_real_query(\mysqli $mysql, string $query) : bool {}
function mysqli_reap_async_query(\mysqli $mysql) : \mysqli_result|bool {}
function mysqli_refresh(\mysqli $mysql, int $flags) : bool {}
function mysqli_release_savepoint(\mysqli $mysql, string $name) : bool {}
function mysqli_report(int $flags) : bool {}
function mysqli_rollback(\mysqli $mysql, int $flags = 0, ?string $name = null) : bool {}
function mysqli_savepoint(\mysqli $mysql, string $name) : bool {}
function mysqli_select_db(\mysqli $mysql, string $database) : bool {}
function mysqli_set_charset(\mysqli $mysql, string $charset) : bool {}
function mysqli_set_opt(\mysqli $mysql, int $option, $value) : bool {}
function mysqli_sqlstate(\mysqli $mysql) : string {}
function mysqli_ssl_set(\mysqli $mysql, ?string $key, ?string $certificate, ?string $ca_certificate, ?string $ca_path, ?string $cipher_algos) : true {}
function mysqli_stat(\mysqli $mysql) : false|string {}
function mysqli_stmt_affected_rows(\mysqli_stmt $statement) : int|string {}
function mysqli_stmt_attr_get(\mysqli_stmt $statement, int $attribute) : int {}
function mysqli_stmt_attr_set(\mysqli_stmt $statement, int $attribute, int $value) : bool {}
function mysqli_stmt_bind_param(\mysqli_stmt $statement, string $types, mixed &...$vars) : bool {}
function mysqli_stmt_bind_result(\mysqli_stmt $statement, mixed &...$vars) : bool {}
function mysqli_stmt_close(\mysqli_stmt $statement) : true {}
function mysqli_stmt_data_seek(\mysqli_stmt $statement, int $offset) : void {}
function mysqli_stmt_errno(\mysqli_stmt $statement) : int {}
function mysqli_stmt_error(\mysqli_stmt $statement) : string {}
function mysqli_stmt_error_list(\mysqli_stmt $statement) : array {}
function mysqli_stmt_execute(\mysqli_stmt $statement, ?array $params = null) : bool {}
function mysqli_stmt_fetch(\mysqli_stmt $statement) : ?bool {}
function mysqli_stmt_field_count(\mysqli_stmt $statement) : int {}
function mysqli_stmt_free_result(\mysqli_stmt $statement) : void {}
function mysqli_stmt_get_result(\mysqli_stmt $statement) : \mysqli_result|false {}
function mysqli_stmt_get_warnings(\mysqli_stmt $statement) : \mysqli_warning|false {}
function mysqli_stmt_init(\mysqli $mysql) : \mysqli_stmt|false {}
function mysqli_stmt_insert_id(\mysqli_stmt $statement) : int|string {}
function mysqli_stmt_more_results(\mysqli_stmt $statement) : bool {}
function mysqli_stmt_next_result(\mysqli_stmt $statement) : bool {}
function mysqli_stmt_num_rows(\mysqli_stmt $statement) : int|string {}
function mysqli_stmt_param_count(\mysqli_stmt $statement) : int {}
function mysqli_stmt_prepare(\mysqli_stmt $statement, string $query) : bool {}
function mysqli_stmt_reset(\mysqli_stmt $statement) : bool {}
function mysqli_stmt_result_metadata(\mysqli_stmt $statement) : \mysqli_result|false {}
function mysqli_stmt_send_long_data(\mysqli_stmt $statement, int $param_num, string $data) : bool {}
function mysqli_stmt_sqlstate(\mysqli_stmt $statement) : string {}
function mysqli_stmt_store_result(\mysqli_stmt $statement) : bool {}
function mysqli_store_result(\mysqli $mysql, int $mode = 0) : \mysqli_result|false {}
function mysqli_thread_id(\mysqli $mysql) : int {}
function mysqli_thread_safe() : bool {}
function mysqli_use_result(\mysqli $mysql) : \mysqli_result|false {}
function mysqli_warning_count(\mysqli $mysql) : int {}
const MYSQLI_ASSOC = 1;
const MYSQLI_ASYNC = 8;
const MYSQLI_AUTO_INCREMENT_FLAG = 512;
const MYSQLI_BINARY_FLAG = 128;
const MYSQLI_BLOB_FLAG = 16;
const MYSQLI_BOTH = 3;
const MYSQLI_CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS = 4194304;
const MYSQLI_CLIENT_COMPRESS = 32;
const MYSQLI_CLIENT_FOUND_ROWS = 2;
const MYSQLI_CLIENT_IGNORE_SPACE = 256;
const MYSQLI_CLIENT_INTERACTIVE = 1024;
const MYSQLI_CLIENT_NO_SCHEMA = 16;
const MYSQLI_CLIENT_SSL = 2048;
const MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT = 64;
const MYSQLI_CLIENT_SSL_VERIFY_SERVER_CERT = 1073741824;
const MYSQLI_CURSOR_TYPE_FOR_UPDATE = 2;
const MYSQLI_CURSOR_TYPE_NO_CURSOR = 0;
const MYSQLI_CURSOR_TYPE_READ_ONLY = 1;
const MYSQLI_CURSOR_TYPE_SCROLLABLE = 4;
const MYSQLI_DATA_TRUNCATED = 101;
const MYSQLI_DEBUG_TRACE_ENABLED = 0;
const MYSQLI_ENUM_FLAG = 256;
const MYSQLI_GROUP_FLAG = 32768;
const MYSQLI_INIT_COMMAND = 3;
const MYSQLI_IS_MARIADB = false;
const MYSQLI_MULTIPLE_KEY_FLAG = 8;
const MYSQLI_NOT_NULL_FLAG = 1;
const MYSQLI_NO_DATA = 100;
const MYSQLI_NO_DEFAULT_VALUE_FLAG = 4096;
const MYSQLI_NUM = 2;
const MYSQLI_NUM_FLAG = 32768;
const MYSQLI_ON_UPDATE_NOW_FLAG = 8192;
const MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS = 37;
const MYSQLI_OPT_CONNECT_TIMEOUT = 0;
const MYSQLI_OPT_INT_AND_FLOAT_NATIVE = 201;
const MYSQLI_OPT_LOAD_DATA_LOCAL_DIR = 43;
const MYSQLI_OPT_LOCAL_INFILE = 8;
const MYSQLI_OPT_NET_CMD_BUFFER_SIZE = 202;
const MYSQLI_OPT_NET_READ_BUFFER_SIZE = 203;
const MYSQLI_OPT_READ_TIMEOUT = 11;
const MYSQLI_OPT_SSL_VERIFY_SERVER_CERT = 21;
const MYSQLI_PART_KEY_FLAG = 16384;
const MYSQLI_PRI_KEY_FLAG = 2;
const MYSQLI_READ_DEFAULT_FILE = 4;
const MYSQLI_READ_DEFAULT_GROUP = 5;
const MYSQLI_REFRESH_BACKUP_LOG = 2097152;
const MYSQLI_REFRESH_GRANT = 1;
const MYSQLI_REFRESH_HOSTS = 8;
const MYSQLI_REFRESH_LOG = 2;
const MYSQLI_REFRESH_MASTER = 128;
const MYSQLI_REFRESH_REPLICA = 64;
const MYSQLI_REFRESH_SLAVE = 64;
const MYSQLI_REFRESH_STATUS = 16;
const MYSQLI_REFRESH_TABLES = 4;
const MYSQLI_REFRESH_THREADS = 32;
const MYSQLI_REPORT_ALL = 255;
const MYSQLI_REPORT_ERROR = 1;
const MYSQLI_REPORT_INDEX = 4;
const MYSQLI_REPORT_OFF = 0;
const MYSQLI_REPORT_STRICT = 2;
const MYSQLI_SERVER_PS_OUT_PARAMS = 4096;
const MYSQLI_SERVER_PUBLIC_KEY = 35;
const MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED = 16;
const MYSQLI_SERVER_QUERY_NO_INDEX_USED = 32;
const MYSQLI_SERVER_QUERY_WAS_SLOW = 2048;
const MYSQLI_SET_CHARSET_DIR = 6;
const MYSQLI_SET_CHARSET_NAME = 7;
const MYSQLI_SET_FLAG = 2048;
const MYSQLI_STMT_ATTR_CURSOR_TYPE = 1;
const MYSQLI_STMT_ATTR_PREFETCH_ROWS = 2;
const MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH = 0;
const MYSQLI_STORE_RESULT = 0;
const MYSQLI_STORE_RESULT_COPY_DATA = 16;
const MYSQLI_TIMESTAMP_FLAG = 1024;
const MYSQLI_TRANS_COR_AND_CHAIN = 1;
const MYSQLI_TRANS_COR_AND_NO_CHAIN = 2;
const MYSQLI_TRANS_COR_NO_RELEASE = 8;
const MYSQLI_TRANS_COR_RELEASE = 4;
const MYSQLI_TRANS_START_READ_ONLY = 4;
const MYSQLI_TRANS_START_READ_WRITE = 2;
const MYSQLI_TRANS_START_WITH_CONSISTENT_SNAPSHOT = 1;
const MYSQLI_TYPE_BIT = 16;
const MYSQLI_TYPE_BLOB = 252;
const MYSQLI_TYPE_CHAR = 1;
const MYSQLI_TYPE_DATE = 10;
const MYSQLI_TYPE_DATETIME = 12;
const MYSQLI_TYPE_DECIMAL = 0;
const MYSQLI_TYPE_DOUBLE = 5;
const MYSQLI_TYPE_ENUM = 247;
const MYSQLI_TYPE_FLOAT = 4;
const MYSQLI_TYPE_GEOMETRY = 255;
const MYSQLI_TYPE_INT24 = 9;
const MYSQLI_TYPE_INTERVAL = 247;
const MYSQLI_TYPE_JSON = 245;
const MYSQLI_TYPE_LONG = 3;
const MYSQLI_TYPE_LONGLONG = 8;
const MYSQLI_TYPE_LONG_BLOB = 251;
const MYSQLI_TYPE_MEDIUM_BLOB = 250;
const MYSQLI_TYPE_NEWDATE = 14;
const MYSQLI_TYPE_NEWDECIMAL = 246;
const MYSQLI_TYPE_NULL = 6;
const MYSQLI_TYPE_SET = 248;
const MYSQLI_TYPE_SHORT = 2;
const MYSQLI_TYPE_STRING = 254;
const MYSQLI_TYPE_TIME = 11;
const MYSQLI_TYPE_TIMESTAMP = 7;
const MYSQLI_TYPE_TINY = 1;
const MYSQLI_TYPE_TINY_BLOB = 249;
const MYSQLI_TYPE_VAR_STRING = 253;
const MYSQLI_TYPE_YEAR = 13;
const MYSQLI_UNIQUE_KEY_FLAG = 4;
const MYSQLI_UNSIGNED_FLAG = 32;
const MYSQLI_USE_RESULT = 1;
const MYSQLI_ZEROFILL_FLAG = 64;
}

View File

@@ -0,0 +1,3 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension pdo_mysql@7.1.33-55+0~20230829.86+debian10~1.gbp0254ab

View File

@@ -0,0 +1,3 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension pdo_mysql@8.2.9

View File

@@ -0,0 +1,3 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension pdo_pgsql@7.1.33-55+0~20230829.86+debian10~1.gbp0254ab

View File

@@ -0,0 +1,3 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension pdo_sqlite@7.4.12

View File

@@ -0,0 +1,974 @@
<?php
// From https://raw.githubusercontent.com/php/php-src/master/ext/pgsql/pgsql.stub.php
/** @generate-class-entries */
namespace {
/* libpq version */
/**
* @var string
* @cvalue pgsql_libpq_version
*/
const PGSQL_LIBPQ_VERSION = UNKNOWN;
/**
* @var string
* @cvalue pgsql_libpq_version
* @deprecated
*/
const PGSQL_LIBPQ_VERSION_STR = UNKNOWN;
/* For connection option */
/**
* @var int
* @cvalue PGSQL_CONNECT_FORCE_NEW
*/
const PGSQL_CONNECT_FORCE_NEW = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_CONNECT_ASYNC
*/
const PGSQL_CONNECT_ASYNC = UNKNOWN;
/* For pg_fetch_array() */
/**
* @var int
* @cvalue PGSQL_ASSOC
*/
const PGSQL_ASSOC = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_NUM
*/
const PGSQL_NUM = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_BOTH
*/
const PGSQL_BOTH = UNKNOWN;
/* For pg_last_notice() */
/**
* @var int
* @cvalue PGSQL_NOTICE_LAST
*/
const PGSQL_NOTICE_LAST = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_NOTICE_ALL
*/
const PGSQL_NOTICE_ALL = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_NOTICE_CLEAR
*/
const PGSQL_NOTICE_CLEAR = UNKNOWN;
/* For pg_connection_status() */
/**
* @var int
* @cvalue CONNECTION_BAD
*/
const PGSQL_CONNECTION_BAD = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_OK
*/
const PGSQL_CONNECTION_OK = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_STARTED
*/
const PGSQL_CONNECTION_STARTED = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_MADE
*/
const PGSQL_CONNECTION_MADE = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_AWAITING_RESPONSE
*/
const PGSQL_CONNECTION_AWAITING_RESPONSE = UNKNOWN;
/**
* @var int
* @cvalue CONNECTION_AUTH_OK
*/
const PGSQL_CONNECTION_AUTH_OK = UNKNOWN;
#ifdef CONNECTION_SSL_STARTUP
/**
* @var int
* @cvalue CONNECTION_SSL_STARTUP
*/
const PGSQL_CONNECTION_SSL_STARTUP = UNKNOWN;
#endif
/**
* @var int
* @cvalue CONNECTION_SETENV
*/
const PGSQL_CONNECTION_SETENV = UNKNOWN;
/* For pg_connect_poll() */
/**
* @var int
* @cvalue PGRES_POLLING_FAILED
*/
const PGSQL_POLLING_FAILED = UNKNOWN;
/**
* @var int
* @cvalue PGRES_POLLING_READING
*/
const PGSQL_POLLING_READING = UNKNOWN;
/**
* @var int
* @cvalue PGRES_POLLING_WRITING
*/
const PGSQL_POLLING_WRITING = UNKNOWN;
/**
* @var int
* @cvalue PGRES_POLLING_OK
*/
const PGSQL_POLLING_OK = UNKNOWN;
/**
* @var int
* @cvalue PGRES_POLLING_ACTIVE
*/
const PGSQL_POLLING_ACTIVE = UNKNOWN;
/* For pg_transaction_status() */
/**
* @var int
* @cvalue PQTRANS_IDLE
*/
const PGSQL_TRANSACTION_IDLE = UNKNOWN;
/**
* @var int
* @cvalue PQTRANS_ACTIVE
*/
const PGSQL_TRANSACTION_ACTIVE = UNKNOWN;
/**
* @var int
* @cvalue PQTRANS_INTRANS
*/
const PGSQL_TRANSACTION_INTRANS = UNKNOWN;
/**
* @var int
* @cvalue PQTRANS_INERROR
*/
const PGSQL_TRANSACTION_INERROR = UNKNOWN;
/**
* @var int
* @cvalue PQTRANS_UNKNOWN
*/
const PGSQL_TRANSACTION_UNKNOWN = UNKNOWN;
/* For pg_set_error_verbosity() */
/**
* @var int
* @cvalue PQERRORS_TERSE
*/
const PGSQL_ERRORS_TERSE = UNKNOWN;
/**
* @var int
* @cvalue PQERRORS_DEFAULT
*/
const PGSQL_ERRORS_DEFAULT = UNKNOWN;
/**
* @var int
* @cvalue PQERRORS_VERBOSE
*/
const PGSQL_ERRORS_VERBOSE = UNKNOWN;
#if PGVERSION_NUM > 110000
/**
* @var int
* @cvalue PQERRORS_SQLSTATE
*/
const PGSQL_ERRORS_SQLSTATE = UNKNOWN;
#else
/**
* @var int
* @cvalue PQERRORS_TERSE
*/
const PGSQL_ERRORS_SQLSTATE = UNKNOWN;
#endif
/* For lo_seek() */
/**
* @var int
* @cvalue SEEK_SET
*/
const PGSQL_SEEK_SET = UNKNOWN;
/**
* @var int
* @cvalue SEEK_CUR
*/
const PGSQL_SEEK_CUR = UNKNOWN;
/**
* @var int
* @cvalue SEEK_END
*/
const PGSQL_SEEK_END = UNKNOWN;
/* For pg_result_status() return value type */
/**
* @var int
* @cvalue PGSQL_STATUS_LONG
*/
const PGSQL_STATUS_LONG = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_STATUS_STRING
*/
const PGSQL_STATUS_STRING = UNKNOWN;
/* For pg_result_status() return value */
/**
* @var int
* @cvalue PGRES_EMPTY_QUERY
*/
const PGSQL_EMPTY_QUERY = UNKNOWN;
/**
* @var int
* @cvalue PGRES_COMMAND_OK
*/
const PGSQL_COMMAND_OK = UNKNOWN;
/**
* @var int
* @cvalue PGRES_TUPLES_OK
*/
const PGSQL_TUPLES_OK = UNKNOWN;
/**
* @var int
* @cvalue PGRES_COPY_OUT
*/
const PGSQL_COPY_OUT = UNKNOWN;
/**
* @var int
* @cvalue PGRES_COPY_IN
*/
const PGSQL_COPY_IN = UNKNOWN;
/**
* @var int
* @cvalue PGRES_BAD_RESPONSE
*/
const PGSQL_BAD_RESPONSE = UNKNOWN;
/**
* @var int
* @cvalue PGRES_NONFATAL_ERROR
*/
const PGSQL_NONFATAL_ERROR = UNKNOWN;
/**
* @var int
* @cvalue PGRES_FATAL_ERROR
*/
const PGSQL_FATAL_ERROR = UNKNOWN;
/* For pg_result_error_field() field codes */
/**
* @var int
* @cvalue PG_DIAG_SEVERITY
*/
const PGSQL_DIAG_SEVERITY = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_SQLSTATE
*/
const PGSQL_DIAG_SQLSTATE = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_MESSAGE_PRIMARY
*/
const PGSQL_DIAG_MESSAGE_PRIMARY = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_MESSAGE_DETAIL
*/
const PGSQL_DIAG_MESSAGE_DETAIL = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_MESSAGE_HINT
*/
const PGSQL_DIAG_MESSAGE_HINT = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_STATEMENT_POSITION
*/
const PGSQL_DIAG_STATEMENT_POSITION = UNKNOWN;
#ifdef PG_DIAG_INTERNAL_POSITION
/**
* @var int
* @cvalue PG_DIAG_INTERNAL_POSITION
*/
const PGSQL_DIAG_INTERNAL_POSITION = UNKNOWN;
#endif
#ifdef PG_DIAG_INTERNAL_QUERY
/**
* @var int
* @cvalue PG_DIAG_INTERNAL_QUERY
*/
const PGSQL_DIAG_INTERNAL_QUERY = UNKNOWN;
#endif
/**
* @var int
* @cvalue PG_DIAG_CONTEXT
*/
const PGSQL_DIAG_CONTEXT = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_SOURCE_FILE
*/
const PGSQL_DIAG_SOURCE_FILE = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_SOURCE_LINE
*/
const PGSQL_DIAG_SOURCE_LINE = UNKNOWN;
/**
* @var int
* @cvalue PG_DIAG_SOURCE_FUNCTION
*/
const PGSQL_DIAG_SOURCE_FUNCTION = UNKNOWN;
#ifdef PG_DIAG_SCHEMA_NAME
/**
* @var int
* @cvalue PG_DIAG_SCHEMA_NAME
*/
const PGSQL_DIAG_SCHEMA_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_TABLE_NAME
/**
* @var int
* @cvalue PG_DIAG_TABLE_NAME
*/
const PGSQL_DIAG_TABLE_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_COLUMN_NAME
/**
* @var int
* @cvalue PG_DIAG_COLUMN_NAME
*/
const PGSQL_DIAG_COLUMN_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_DATATYPE_NAME
/**
* @var int
* @cvalue PG_DIAG_DATATYPE_NAME
*/
const PGSQL_DIAG_DATATYPE_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_CONSTRAINT_NAME
/**
* @var int
* @cvalue PG_DIAG_CONSTRAINT_NAME
*/
const PGSQL_DIAG_CONSTRAINT_NAME = UNKNOWN;
#endif
#ifdef PG_DIAG_SEVERITY_NONLOCALIZED
/**
* @var int
* @cvalue PG_DIAG_SEVERITY_NONLOCALIZED
*/
const PGSQL_DIAG_SEVERITY_NONLOCALIZED = UNKNOWN;
#endif
/* pg_convert options */
/**
* @var int
* @cvalue PGSQL_CONV_IGNORE_DEFAULT
*/
const PGSQL_CONV_IGNORE_DEFAULT = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_CONV_FORCE_NULL
*/
const PGSQL_CONV_FORCE_NULL = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_CONV_IGNORE_NOT_NULL
*/
const PGSQL_CONV_IGNORE_NOT_NULL = UNKNOWN;
/* pg_insert/update/delete/select options */
/**
* @var int
* @cvalue PGSQL_DML_ESCAPE
*/
const PGSQL_DML_ESCAPE = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_DML_NO_CONV
*/
const PGSQL_DML_NO_CONV = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_DML_EXEC
*/
const PGSQL_DML_EXEC = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_DML_ASYNC
*/
const PGSQL_DML_ASYNC = UNKNOWN;
/**
* @var int
* @cvalue PGSQL_DML_STRING
*/
const PGSQL_DML_STRING = UNKNOWN;
#ifdef PQTRACE_SUPPPRESS_TIMESTAMPS
/**
* @var int
* @cvalue PQTRACE_SUPPRESS_TIMESTAMPS
*/
const PGSQL_TRACE_SUPPRESS_TIMESTAMPS = UNKNOWN;
#endif
#ifdef PQTRACE_REGRESS_MODE
/**
* @var int
* @cvalue PQTRACE_REGRESS_MODE
*/
const PGSQL_TRACE_REGRESS_MODE = UNKNOWN;
#endif
#ifdef HAVE_PG_CONTEXT_VISIBILITY
/* For pg_set_error_context_visibility() */
/**
* @var int
* @cvalue PQSHOW_CONTEXT_NEVER
*/
const PGSQL_SHOW_CONTEXT_NEVER = UNKNOWN;
/**
* @var int
* @cvalue PQSHOW_CONTEXT_ERRORS
*/
const PGSQL_SHOW_CONTEXT_ERRORS = UNKNOWN;
/**
* @var int
* @cvalue PQSHOW_CONTEXT_ALWAYS
*/
const PGSQL_SHOW_CONTEXT_ALWAYS = UNKNOWN;
#endif
function pg_connect(string $connection_string, int $flags = 0): PgSql\Connection|false {}
function pg_pconnect(string $connection_string, int $flags = 0): PgSql\Connection|false {}
function pg_connect_poll(PgSql\Connection $connection): int {}
function pg_close(?PgSql\Connection $connection = null): true {}
/** @refcount 1 */
function pg_dbname(?PgSql\Connection $connection = null): string {}
function pg_last_error(?PgSql\Connection $connection = null): string {}
/**
* @alias pg_last_error
* @deprecated
*/
function pg_errormessage(?PgSql\Connection $connection = null): string {}
/** @refcount 1 */
function pg_options(?PgSql\Connection $connection = null): string {}
/** @refcount 1 */
function pg_port(?PgSql\Connection $connection = null): string {}
/** @refcount 1 */
function pg_tty(?PgSql\Connection $connection = null): string {}
/** @refcount 1 */
function pg_host(?PgSql\Connection $connection = null): string {}
/**
* @return array<string, int|string|null>
* @refcount 1
*/
function pg_version(?PgSql\Connection $connection = null): array {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_parameter_status($connection, string $name = UNKNOWN): string|false {}
function pg_ping(?PgSql\Connection $connection = null): bool {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_query($connection, string $query = UNKNOWN): PgSql\Result|false {}
/**
* @param PgSql\Connection|string $connection
* @alias pg_query
*/
function pg_exec($connection, string $query = UNKNOWN): PgSql\Result|false {}
/**
* @param PgSql\Connection|string $connection
* @param string|array $query
* @refcount 1
*/
function pg_query_params($connection, $query, array $params = UNKNOWN): PgSql\Result|false {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_prepare($connection, string $statement_name, string $query = UNKNOWN): PgSql\Result|false {}
/**
* @param PgSql\Connection|string $connection
* @param string|array $statement_name
* @refcount 1
*/
function pg_execute($connection, $statement_name, array $params = UNKNOWN): PgSql\Result|false {}
function pg_num_rows(PgSql\Result $result): int {}
/**
* @alias pg_num_rows
* @deprecated
*/
function pg_numrows(PgSql\Result $result): int {}
function pg_num_fields(PgSql\Result $result): int {}
/**
* @alias pg_num_fields
* @deprecated
*/
function pg_numfields(PgSql\Result $result): int {}
function pg_affected_rows(PgSql\Result $result): int {}
/**
* @alias pg_affected_rows
* @deprecated
*/
function pg_cmdtuples(PgSql\Result $result): int {}
function pg_last_notice(PgSql\Connection $connection, int $mode = PGSQL_NOTICE_LAST): array|string|bool {}
function pg_field_table(PgSql\Result $result, int $field, bool $oid_only = false): string|int|false {}
/** @refcount 1 */
function pg_field_name(PgSql\Result $result, int $field): string {}
/**
* @alias pg_field_name
* @deprecated
*/
function pg_fieldname(PgSql\Result $result, int $field): string {}
function pg_field_size(PgSql\Result $result, int $field): int {}
/**
* @alias pg_field_size
* @deprecated
*/
function pg_fieldsize(PgSql\Result $result, int $field): int {}
function pg_field_type(PgSql\Result $result, int $field): string {}
/**
* @alias pg_field_type
* @deprecated
*/
function pg_fieldtype(PgSql\Result $result, int $field): string {}
/** @refcount 1 */
function pg_field_type_oid(PgSql\Result $result, int $field): string|int {}
function pg_field_num(PgSql\Result $result, string $field): int {}
/**
* @alias pg_field_num
* @deprecated
*/
function pg_fieldnum(PgSql\Result $result, string $field): int {}
/**
* @param string|int|null $row
* @refcount 1
*/
function pg_fetch_result(PgSql\Result $result, $row, string|int $field = UNKNOWN): string|false|null {}
/**
* @param string|int $row
* @alias pg_fetch_result
* @deprecated
*/
function pg_result(PgSql\Result $result, $row, string|int $field = UNKNOWN): string|false|null {}
/**
* @return array<int|string, string|null>|false
* @refcount 1
*/
function pg_fetch_row(PgSql\Result $result, ?int $row = null, int $mode = PGSQL_NUM): array|false {}
/**
* @return array<int|string, string|null>|false
* @refcount 1
*/
function pg_fetch_assoc(PgSql\Result $result, ?int $row = null): array|false {}
/**
* @return array<int|string, string|null>|false
* @refcount 1
*/
function pg_fetch_array(PgSql\Result $result, ?int $row = null, int $mode = PGSQL_BOTH): array|false {}
/** @refcount 1 */
function pg_fetch_object(PgSql\Result $result, ?int $row = null, string $class = "stdClass", array $constructor_args = []): object|false {}
/**
* @return array<int, array>
* @refcount 1
*/
function pg_fetch_all(PgSql\Result $result, int $mode = PGSQL_ASSOC): array {}
/**
* @return array<int, string|null>
* @refcount 1
*/
function pg_fetch_all_columns(PgSql\Result $result, int $field = 0): array {}
function pg_result_seek(PgSql\Result $result, int $row): bool {}
/** @param string|int|null $row */
function pg_field_prtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}
/**
* @param string|int $row
* @deprecated
*/
function pg_fieldprtlen(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}
/** @param string|int|null $row */
function pg_field_is_null(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}
/**
* @param string|int $row
* @deprecated
*/
function pg_fieldisnull(PgSql\Result $result, $row, string|int $field = UNKNOWN): int|false {}
function pg_free_result(PgSql\Result $result): bool {}
/**
* @alias pg_free_result
* @deprecated
*/
function pg_freeresult(PgSql\Result $result): bool {}
/** @refcount 1 */
function pg_last_oid(PgSql\Result $result): string|int|false {}
/**
* @alias pg_last_oid
* @deprecated
*/
function pg_getlastoid(PgSql\Result $result): string|int|false {}
function pg_trace(string $filename, string $mode = "w", ?PgSql\Connection $connection = null, int $trace_mode = 0): bool {}
function pg_untrace(?PgSql\Connection $connection = null): true {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @refcount 1
*/
function pg_lo_create($connection = UNKNOWN, $oid = UNKNOWN): string|int|false {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @alias pg_lo_create
* @deprecated
*/
function pg_locreate($connection = UNKNOWN, $oid = UNKNOWN): string|int|false {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
*/
function pg_lo_unlink($connection, $oid = UNKNOWN): bool {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @alias pg_lo_unlink
* @deprecated
*/
function pg_lounlink($connection, $oid = UNKNOWN): bool {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @refcount 1
*/
function pg_lo_open($connection, $oid = UNKNOWN, string $mode = UNKNOWN): PgSql\Lob|false {}
/**
* @param PgSql\Connection $connection
* @param string|int $oid
* @alias pg_lo_open
* @deprecated
*/
function pg_loopen($connection, $oid = UNKNOWN, string $mode = UNKNOWN): PgSql\Lob|false {}
function pg_lo_close(PgSql\Lob $lob): bool {}
/**
* @alias pg_lo_close
* @deprecated
*/
function pg_loclose(PgSql\Lob $lob): bool {}
/** @refcount 1 */
function pg_lo_read(PgSql\Lob $lob, int $length = 8192): string|false {}
/**
* @alias pg_lo_read
* @deprecated
*/
function pg_loread(PgSql\Lob $lob, int $length = 8192): string|false {}
function pg_lo_write(PgSql\Lob $lob, string $data, ?int $length = null): int|false {}
/**
* @alias pg_lo_write
* @deprecated
*/
function pg_lowrite(PgSql\Lob $lob, string $data, ?int $length = null): int|false {}
function pg_lo_read_all(PgSql\Lob $lob): int {}
/**
* @alias pg_lo_read_all
* @deprecated
*/
function pg_loreadall(PgSql\Lob $lob): int {}
/**
* @param PgSql\Connection|string $connection
* @param string|int $filename
* @param string|int $oid
* @refcount 1
*/
function pg_lo_import($connection, $filename = UNKNOWN, $oid = UNKNOWN): string|int|false {}
/**
* @param PgSql\Connection|string $connection
* @param string|int $filename
* @param string|int $oid
* @alias pg_lo_import
* @deprecated
*/
function pg_loimport($connection, $filename = UNKNOWN, $oid = UNKNOWN): string|int|false {}
/**
* @param PgSql\Connection|string|int $connection
* @param string|int $oid
* @param string|int $filename
*/
function pg_lo_export($connection, $oid = UNKNOWN, $filename = UNKNOWN): bool {}
/**
* @param PgSql\Connection|string|int $connection
* @param string|int $oid
* @param string|int $filename
* @alias pg_lo_export
* @deprecated
*/
function pg_loexport($connection, $oid = UNKNOWN, $filename = UNKNOWN): bool {}
function pg_lo_seek(PgSql\Lob $lob, int $offset, int $whence = SEEK_CUR): bool {}
function pg_lo_tell(PgSql\Lob $lob): int {}
function pg_lo_truncate(PgSql\Lob $lob, int $size): bool {}
/** @param PgSql\Connection|int $connection */
function pg_set_error_verbosity($connection, int $verbosity = UNKNOWN): int|false {}
/** @param PgSql\Connection|string $connection */
function pg_set_client_encoding($connection, string $encoding = UNKNOWN): int {}
/**
* @param PgSql\Connection|string $connection
* @alias pg_set_client_encoding
* @deprecated
*/
function pg_setclientencoding($connection, string $encoding = UNKNOWN): int {}
function pg_client_encoding(?PgSql\Connection $connection = null): string {}
/**
* @alias pg_client_encoding
* @deprecated
*/
function pg_clientencoding(?PgSql\Connection $connection = null): string {}
function pg_end_copy(?PgSql\Connection $connection = null): bool {}
/** @param PgSql\Connection|string $connection */
function pg_put_line($connection, string $query = UNKNOWN): bool {}
/**
* @return array<int, string>|false
* @refcount 1
*/
function pg_copy_to(PgSql\Connection $connection, string $table_name, string $separator = "\t", string $null_as = "\\\\N"): array|false {}
function pg_copy_from(PgSql\Connection $connection, string $table_name, array $rows, string $separator = "\t", string $null_as = "\\\\N"): bool {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_escape_string($connection, string $string = UNKNOWN): string {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_escape_bytea($connection, string $string = UNKNOWN): string {}
/** @refcount 1 */
function pg_unescape_bytea(string $string): string {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_escape_literal($connection, string $string = UNKNOWN): string|false {}
/**
* @param PgSql\Connection|string $connection
* @refcount 1
*/
function pg_escape_identifier($connection, string $string = UNKNOWN): string|false {}
/** @refcount 1 */
function pg_result_error(PgSql\Result $result): string|false {}
/** @refcount 1 */
function pg_result_error_field(PgSql\Result $result, int $field_code): string|false|null {}
function pg_connection_status(PgSql\Connection $connection): int {}
function pg_transaction_status(PgSql\Connection $connection): int {}
function pg_connection_reset(PgSql\Connection $connection): bool {}
function pg_cancel_query(PgSql\Connection $connection): bool {}
function pg_connection_busy(PgSql\Connection $connection): bool {}
function pg_send_query(PgSql\Connection $connection, string $query): int|bool {}
function pg_send_query_params(PgSql\Connection $connection, string $query, array $params): int|bool {}
function pg_send_prepare(PgSql\Connection $connection, string $statement_name, string $query): int|bool {}
function pg_send_execute(PgSql\Connection $connection, string $statement_name, array $params): int|bool {}
/** @refcount 1 */
function pg_get_result(PgSql\Connection $connection): PgSql\Result|false {}
/** @refcount 1 */
function pg_result_status(PgSql\Result $result, int $mode = PGSQL_STATUS_LONG): string|int {}
/**
* @return array<int|string, int|string>
* @refcount 1
*/
function pg_get_notify(PgSql\Connection $connection, int $mode = PGSQL_ASSOC): array|false {}
function pg_get_pid(PgSql\Connection $connection): int {}
/**
* @return resource|false
* @refcount 1
*/
function pg_socket(PgSql\Connection $connection) {}
function pg_consume_input(PgSql\Connection $connection): bool {}
function pg_flush(PgSql\Connection $connection): int|bool {}
/**
* @return array<string, array>|false
* @refcount 1
*/
function pg_meta_data(PgSql\Connection $connection, string $table_name, bool $extended = false): array|false {}
/**
* @return array<string, mixed>|false
* @refcount 1
*/
function pg_convert(PgSql\Connection $connection, string $table_name, array $values, int $flags = 0): array|false {}
/** @refcount 1 */
function pg_insert(PgSql\Connection $connection, string $table_name, array $values, int $flags = PGSQL_DML_EXEC): PgSql\Result|string|bool {}
/** @refcount 1 */
function pg_update(PgSql\Connection $connection, string $table_name, array $values, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
/** @refcount 1 */
function pg_delete(PgSql\Connection $connection, string $table_name, array $conditions, int $flags = PGSQL_DML_EXEC): string|bool {}
/**
* @return array<int, array>|string|false
* @refcount 1
*/
function pg_select(PgSql\Connection $connection, string $table_name, array $conditions = [], int $flags = PGSQL_DML_EXEC, int $mode = PGSQL_ASSOC): array|string|false {}
#ifdef HAVE_PG_CONTEXT_VISIBILITY
function pg_set_error_context_visibility(PgSql\Connection $connection, int $visibility): int {}
#endif
}
namespace PgSql {
/**
* @strict-properties
* @not-serializable
*/
final class Connection
{
}
/**
* @strict-properties
* @not-serializable
*/
final class Result
{
}
/**
* @strict-properties
* @not-serializable
*/
final class Lob
{
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,68 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension session@7.4.12
namespace {
class SessionHandler implements \SessionHandlerInterface, \SessionIdInterface {
// methods
public function open($save_path, $session_name) {}
public function close() {}
public function read($key) {}
public function write($key, $val) {}
public function destroy($key) {}
public function gc($maxlifetime) {}
public function create_sid() {}
}
interface SessionHandlerInterface {
// methods
function open($save_path, $session_name);
function close();
function read($key);
function write($key, $val);
function destroy($key);
function gc($maxlifetime);
}
interface SessionIdInterface {
// methods
function create_sid();
}
interface SessionUpdateTimestampHandlerInterface {
// methods
function validateId($key);
function updateTimestamp($key, $val);
}
function session_abort() {}
function session_cache_expire($new_cache_expire = null) {}
function session_cache_limiter($cache_limiter = null) {}
function session_commit() {}
function session_create_id($prefix = null) {}
function session_decode($data) {}
function session_destroy() {}
function session_encode() {}
function session_gc() {}
function session_get_cookie_params() {}
function session_id($id = null) {}
function session_module_name($module = null) {}
function session_name($name = null) {}
function session_regenerate_id($delete_old_session = null) {}
function session_register_shutdown() {}
function session_reset() {}
function session_save_path($path = null) {}
function session_set_cookie_params($lifetime_or_options, $path = null, $domain = null, $secure = null, $httponly = null) {}
function session_set_save_handler($open, $close = null, $read = null, $write = null, $destroy = null, $gc = null, $create_sid = null, $validate_sid = null, $update_timestamp = null) {}
function session_start($options = null) {}
function session_status() {}
function session_unset() {}
function session_write_close() {}
const PHP_SESSION_ACTIVE = 2;
const PHP_SESSION_DISABLED = 0;
const PHP_SESSION_NONE = 1;
}

View File

@@ -0,0 +1,220 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension soap@8.2.9
namespace {
class SoapClient {
// properties
private $uri;
private $style;
private $use;
private $location;
private $trace;
private $compression;
private $sdl;
private $typemap;
private $httpsocket;
private $httpurl;
private $_login;
private $_password;
private $_use_digest;
private $_digest;
private $_proxy_host;
private $_proxy_port;
private $_proxy_login;
private $_proxy_password;
private $_exceptions;
private $_encoding;
private $_classmap;
private $_features;
private $_connection_timeout;
private $_stream_context;
private $_user_agent;
private $_keep_alive;
private $_ssl_method;
private $_use_proxy;
private $_cookies;
private $__default_headers;
private $__soap_fault;
private $__last_request;
private $__last_response;
private $__last_request_headers;
private $__last_response_headers;
private $_soap_version;
// methods
public function __construct(?string $wsdl, array $options = []) {}
public function __call(string $name, array $args) : mixed {}
public function __soapCall(string $name, array $args, ?array $options = null, $inputHeaders = null, &$outputHeaders = null) : mixed {}
public function __getFunctions() : ?array {}
public function __getTypes() : ?array {}
public function __getLastRequest() : ?string {}
public function __getLastResponse() : ?string {}
public function __getLastRequestHeaders() : ?string {}
public function __getLastResponseHeaders() : ?string {}
public function __doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false) : ?string {}
public function __setCookie(string $name, ?string $value = null) : void {}
public function __getCookies() : array {}
public function __setSoapHeaders($headers = null) : bool {}
public function __setLocation(?string $location = null) : ?string {}
}
class SoapFault extends \Exception {
// properties
protected $message;
protected $code;
protected $file;
protected $line;
public $faultcode;
public $faultcodens;
public $faultactor;
public $detail;
public $_name;
public $headerfault;
public $faultstring;
// methods
public function __construct(array|null|string $code, string $string, ?string $actor = null, mixed $details = null, ?string $name = null, mixed $headerFault = null) {}
public function __toString() : string {}
}
class SoapHeader {
// properties
public $data;
public $namespace;
public $name;
public $mustUnderstand;
public $actor;
// methods
public function __construct(string $namespace, string $name, mixed $data = null, bool $mustUnderstand = false, int|null|string $actor = null) {}
}
class SoapParam {
// properties
public $param_name;
public $param_data;
// methods
public function __construct(mixed $data, string $name) {}
}
class SoapServer {
// properties
private $__soap_fault;
// methods
public function __construct(?string $wsdl, array $options = []) {}
public function fault(string $code, string $string, string $actor = '', mixed $details = null, string $name = '') : void {}
public function addSoapHeader(\SoapHeader $header) : void {}
public function setPersistence(int $mode) : void {}
public function setClass(string $class, mixed ...$args) : void {}
public function setObject(object $object) : void {}
public function getFunctions() : array {}
public function addFunction($functions) : void {}
public function handle(?string $request = null) : void {}
}
class SoapVar {
// properties
public $enc_value;
public $enc_stype;
public $enc_ns;
public $enc_name;
public $enc_namens;
public $enc_type;
// methods
public function __construct(mixed $data, ?int $encoding, ?string $typeName = null, ?string $typeNamespace = null, ?string $nodeName = null, ?string $nodeNamespace = null) {}
}
function is_soap_fault(mixed $object) : bool {}
function use_soap_error_handler(bool $enable = true) : bool {}
const APACHE_MAP = 200;
const SOAP_1_1 = 1;
const SOAP_1_2 = 2;
const SOAP_ACTOR_NEXT = 1;
const SOAP_ACTOR_NONE = 2;
const SOAP_ACTOR_UNLIMATERECEIVER = 3;
const SOAP_AUTHENTICATION_BASIC = 0;
const SOAP_AUTHENTICATION_DIGEST = 1;
const SOAP_COMPRESSION_ACCEPT = 32;
const SOAP_COMPRESSION_DEFLATE = 16;
const SOAP_COMPRESSION_GZIP = 0;
const SOAP_DOCUMENT = 2;
const SOAP_ENCODED = 1;
const SOAP_ENC_ARRAY = 300;
const SOAP_ENC_OBJECT = 301;
const SOAP_FUNCTIONS_ALL = 999;
const SOAP_LITERAL = 2;
const SOAP_PERSISTENCE_REQUEST = 2;
const SOAP_PERSISTENCE_SESSION = 1;
const SOAP_RPC = 1;
const SOAP_SINGLE_ELEMENT_ARRAYS = 1;
const SOAP_SSL_METHOD_SSLv2 = 1;
const SOAP_SSL_METHOD_SSLv3 = 2;
const SOAP_SSL_METHOD_SSLv23 = 3;
const SOAP_SSL_METHOD_TLS = 0;
const SOAP_USE_XSI_ARRAY_TYPE = 4;
const SOAP_WAIT_ONE_WAY_CALLS = 2;
const UNKNOWN_TYPE = 999998;
const WSDL_CACHE_BOTH = 3;
const WSDL_CACHE_DISK = 1;
const WSDL_CACHE_MEMORY = 2;
const WSDL_CACHE_NONE = 0;
const XSD_1999_NAMESPACE = 'http://www.w3.org/1999/XMLSchema';
const XSD_1999_TIMEINSTANT = 401;
const XSD_ANYTYPE = 145;
const XSD_ANYURI = 117;
const XSD_ANYXML = 147;
const XSD_BASE64BINARY = 116;
const XSD_BOOLEAN = 102;
const XSD_BYTE = 137;
const XSD_DATE = 109;
const XSD_DATETIME = 107;
const XSD_DECIMAL = 103;
const XSD_DOUBLE = 105;
const XSD_DURATION = 106;
const XSD_ENTITIES = 130;
const XSD_ENTITY = 129;
const XSD_FLOAT = 104;
const XSD_GDAY = 113;
const XSD_GMONTH = 114;
const XSD_GMONTHDAY = 112;
const XSD_GYEAR = 111;
const XSD_GYEARMONTH = 110;
const XSD_HEXBINARY = 115;
const XSD_ID = 126;
const XSD_IDREF = 127;
const XSD_IDREFS = 128;
const XSD_INT = 135;
const XSD_INTEGER = 131;
const XSD_LANGUAGE = 122;
const XSD_LONG = 134;
const XSD_NAME = 124;
const XSD_NAMESPACE = 'http://www.w3.org/2001/XMLSchema';
const XSD_NCNAME = 125;
const XSD_NEGATIVEINTEGER = 133;
const XSD_NMTOKEN = 123;
const XSD_NMTOKENS = 144;
const XSD_NONNEGATIVEINTEGER = 138;
const XSD_NONPOSITIVEINTEGER = 132;
const XSD_NORMALIZEDSTRING = 120;
const XSD_NOTATION = 119;
const XSD_POSITIVEINTEGER = 143;
const XSD_QNAME = 118;
const XSD_SHORT = 136;
const XSD_STRING = 101;
const XSD_TIME = 108;
const XSD_TOKEN = 121;
const XSD_UNSIGNEDBYTE = 142;
const XSD_UNSIGNEDINT = 140;
const XSD_UNSIGNEDLONG = 139;
const XSD_UNSIGNEDSHORT = 141;
}

View File

@@ -0,0 +1,260 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension sockets@8.2.9
namespace {
final class AddressInfo {
}
final class Socket {
}
function socket_accept(\Socket $socket) : \Socket|false {}
function socket_addrinfo_bind(\AddressInfo $address) : \Socket|false {}
function socket_addrinfo_connect(\AddressInfo $address) : \Socket|false {}
function socket_addrinfo_explain(\AddressInfo $address) : array {}
function socket_addrinfo_lookup(string $host, ?string $service = null, array $hints = []) : array|false {}
function socket_bind(\Socket $socket, string $address, int $port = 0) : bool {}
function socket_clear_error(?\Socket $socket = null) : void {}
function socket_close(\Socket $socket) : void {}
function socket_cmsg_space(int $level, int $type, int $num = 0) : ?int {}
function socket_connect(\Socket $socket, string $address, ?int $port = null) : bool {}
function socket_create(int $domain, int $type, int $protocol) : \Socket|false {}
function socket_create_listen(int $port, int $backlog = 128) : \Socket|false {}
function socket_create_pair(int $domain, int $type, int $protocol, &$pair) : bool {}
function socket_export_stream(\Socket $socket) {}
function socket_get_option(\Socket $socket, int $level, int $option) : array|false|int {}
function socket_getopt(\Socket $socket, int $level, int $option) : array|false|int {}
function socket_getpeername(\Socket $socket, &$address, &$port = null) : bool {}
function socket_getsockname(\Socket $socket, &$address, &$port = null) : bool {}
function socket_import_stream($stream) : \Socket|false {}
function socket_last_error(?\Socket $socket = null) : int {}
function socket_listen(\Socket $socket, int $backlog = 0) : bool {}
function socket_read(\Socket $socket, int $length, int $mode = \PHP_BINARY_READ) : false|string {}
function socket_recv(\Socket $socket, &$data, int $length, int $flags) : false|int {}
function socket_recvfrom(\Socket $socket, &$data, int $length, int $flags, &$address, &$port = null) : false|int {}
function socket_recvmsg(\Socket $socket, array &$message, int $flags = 0) : false|int {}
function socket_select(?array &$read, ?array &$write, ?array &$except, ?int $seconds, int $microseconds = 0) : false|int {}
function socket_send(\Socket $socket, string $data, int $length, int $flags) : false|int {}
function socket_sendmsg(\Socket $socket, array $message, int $flags = 0) : false|int {}
function socket_sendto(\Socket $socket, string $data, int $length, int $flags, string $address, ?int $port = null) : false|int {}
function socket_set_block(\Socket $socket) : bool {}
function socket_set_nonblock(\Socket $socket) : bool {}
function socket_set_option(\Socket $socket, int $level, int $option, $value) : bool {}
function socket_setopt(\Socket $socket, int $level, int $option, $value) : bool {}
function socket_shutdown(\Socket $socket, int $mode = 2) : bool {}
function socket_strerror(int $error_code) : string {}
function socket_write(\Socket $socket, string $data, ?int $length = null) : false|int {}
const AF_INET = 2;
const AF_INET6 = 10;
const AF_UNIX = 1;
const AI_ADDRCONFIG = 32;
const AI_ALL = 16;
const AI_CANONIDN = 128;
const AI_CANONNAME = 2;
const AI_IDN = 64;
const AI_NUMERICHOST = 4;
const AI_NUMERICSERV = 1024;
const AI_PASSIVE = 1;
const AI_V4MAPPED = 8;
const IPPROTO_IP = 0;
const IPPROTO_IPV6 = 41;
const IPV6_HOPLIMIT = 52;
const IPV6_MULTICAST_HOPS = 18;
const IPV6_MULTICAST_IF = 17;
const IPV6_MULTICAST_LOOP = 19;
const IPV6_PKTINFO = 50;
const IPV6_RECVHOPLIMIT = 51;
const IPV6_RECVPKTINFO = 49;
const IPV6_RECVTCLASS = 66;
const IPV6_TCLASS = 67;
const IPV6_UNICAST_HOPS = 16;
const IPV6_V6ONLY = 26;
const IP_MULTICAST_IF = 32;
const IP_MULTICAST_LOOP = 34;
const IP_MULTICAST_TTL = 33;
const MCAST_BLOCK_SOURCE = 43;
const MCAST_JOIN_GROUP = 42;
const MCAST_JOIN_SOURCE_GROUP = 46;
const MCAST_LEAVE_GROUP = 45;
const MCAST_LEAVE_SOURCE_GROUP = 47;
const MCAST_UNBLOCK_SOURCE = 44;
const MSG_CMSG_CLOEXEC = 1073741824;
const MSG_CONFIRM = 2048;
const MSG_CTRUNC = 8;
const MSG_DONTROUTE = 4;
const MSG_DONTWAIT = 64;
const MSG_EOF = 512;
const MSG_EOR = 128;
const MSG_ERRQUEUE = 8192;
const MSG_MORE = 32768;
const MSG_NOSIGNAL = 16384;
const MSG_OOB = 1;
const MSG_PEEK = 2;
const MSG_TRUNC = 32;
const MSG_WAITALL = 256;
const MSG_WAITFORONE = 65536;
const MSG_ZEROCOPY = 67108864;
const PHP_BINARY_READ = 2;
const PHP_NORMAL_READ = 1;
const SCM_CREDENTIALS = 2;
const SCM_RIGHTS = 1;
const SKF_AD_ALU_XOR_X = 40;
const SKF_AD_CPU = 36;
const SKF_AD_HATYPE = 28;
const SKF_AD_IFINDEX = 8;
const SKF_AD_MARK = 20;
const SKF_AD_MAX = 64;
const SKF_AD_NLATTR = 12;
const SKF_AD_NLATTR_NEST = 16;
const SKF_AD_OFF = -4096;
const SKF_AD_PAY_OFFSET = 52;
const SKF_AD_PKTTYPE = 4;
const SKF_AD_PROTOCOL = 0;
const SKF_AD_QUEUE = 24;
const SKF_AD_RANDOM = 56;
const SKF_AD_RXHASH = 32;
const SKF_AD_VLAN_TAG = 44;
const SKF_AD_VLAN_TAG_PRESENT = 48;
const SKF_AD_VLAN_TPID = 60;
const SOCKET_E2BIG = 7;
const SOCKET_EACCES = 13;
const SOCKET_EADDRINUSE = 98;
const SOCKET_EADDRNOTAVAIL = 99;
const SOCKET_EADV = 68;
const SOCKET_EAFNOSUPPORT = 97;
const SOCKET_EAGAIN = 11;
const SOCKET_EALREADY = 114;
const SOCKET_EBADE = 52;
const SOCKET_EBADF = 9;
const SOCKET_EBADFD = 77;
const SOCKET_EBADMSG = 74;
const SOCKET_EBADR = 53;
const SOCKET_EBADRQC = 56;
const SOCKET_EBADSLT = 57;
const SOCKET_EBUSY = 16;
const SOCKET_ECHRNG = 44;
const SOCKET_ECOMM = 70;
const SOCKET_ECONNABORTED = 103;
const SOCKET_ECONNREFUSED = 111;
const SOCKET_ECONNRESET = 104;
const SOCKET_EDESTADDRREQ = 89;
const SOCKET_EDQUOT = 122;
const SOCKET_EEXIST = 17;
const SOCKET_EFAULT = 14;
const SOCKET_EHOSTDOWN = 112;
const SOCKET_EHOSTUNREACH = 113;
const SOCKET_EIDRM = 43;
const SOCKET_EINPROGRESS = 115;
const SOCKET_EINTR = 4;
const SOCKET_EINVAL = 22;
const SOCKET_EIO = 5;
const SOCKET_EISCONN = 106;
const SOCKET_EISDIR = 21;
const SOCKET_EISNAM = 120;
const SOCKET_EL2HLT = 51;
const SOCKET_EL2NSYNC = 45;
const SOCKET_EL3HLT = 46;
const SOCKET_EL3RST = 47;
const SOCKET_ELNRNG = 48;
const SOCKET_ELOOP = 40;
const SOCKET_EMEDIUMTYPE = 124;
const SOCKET_EMFILE = 24;
const SOCKET_EMLINK = 31;
const SOCKET_EMSGSIZE = 90;
const SOCKET_EMULTIHOP = 72;
const SOCKET_ENAMETOOLONG = 36;
const SOCKET_ENETDOWN = 100;
const SOCKET_ENETRESET = 102;
const SOCKET_ENETUNREACH = 101;
const SOCKET_ENFILE = 23;
const SOCKET_ENOANO = 55;
const SOCKET_ENOBUFS = 105;
const SOCKET_ENOCSI = 50;
const SOCKET_ENODATA = 61;
const SOCKET_ENODEV = 19;
const SOCKET_ENOENT = 2;
const SOCKET_ENOLCK = 37;
const SOCKET_ENOLINK = 67;
const SOCKET_ENOMEDIUM = 123;
const SOCKET_ENOMEM = 12;
const SOCKET_ENOMSG = 42;
const SOCKET_ENONET = 64;
const SOCKET_ENOPROTOOPT = 92;
const SOCKET_ENOSPC = 28;
const SOCKET_ENOSR = 63;
const SOCKET_ENOSTR = 60;
const SOCKET_ENOSYS = 38;
const SOCKET_ENOTBLK = 15;
const SOCKET_ENOTCONN = 107;
const SOCKET_ENOTDIR = 20;
const SOCKET_ENOTEMPTY = 39;
const SOCKET_ENOTSOCK = 88;
const SOCKET_ENOTTY = 25;
const SOCKET_ENOTUNIQ = 76;
const SOCKET_ENXIO = 6;
const SOCKET_EOPNOTSUPP = 95;
const SOCKET_EPERM = 1;
const SOCKET_EPFNOSUPPORT = 96;
const SOCKET_EPIPE = 32;
const SOCKET_EPROTO = 71;
const SOCKET_EPROTONOSUPPORT = 93;
const SOCKET_EPROTOTYPE = 91;
const SOCKET_EREMCHG = 78;
const SOCKET_EREMOTE = 66;
const SOCKET_EREMOTEIO = 121;
const SOCKET_ERESTART = 85;
const SOCKET_EROFS = 30;
const SOCKET_ESHUTDOWN = 108;
const SOCKET_ESOCKTNOSUPPORT = 94;
const SOCKET_ESPIPE = 29;
const SOCKET_ESRMNT = 69;
const SOCKET_ESTRPIPE = 86;
const SOCKET_ETIME = 62;
const SOCKET_ETIMEDOUT = 110;
const SOCKET_ETOOMANYREFS = 109;
const SOCKET_EUNATCH = 49;
const SOCKET_EUSERS = 87;
const SOCKET_EWOULDBLOCK = 11;
const SOCKET_EXDEV = 18;
const SOCKET_EXFULL = 54;
const SOCK_DGRAM = 2;
const SOCK_RAW = 3;
const SOCK_RDM = 4;
const SOCK_SEQPACKET = 5;
const SOCK_STREAM = 1;
const SOL_SOCKET = 1;
const SOL_TCP = 6;
const SOL_UDP = 17;
const SOMAXCONN = 128;
const SO_BINDTODEVICE = 25;
const SO_BPF_EXTENSIONS = 48;
const SO_BROADCAST = 6;
const SO_DEBUG = 1;
const SO_DONTROUTE = 5;
const SO_ERROR = 4;
const SO_INCOMING_CPU = 49;
const SO_KEEPALIVE = 9;
const SO_LINGER = 13;
const SO_MARK = 36;
const SO_MEMINFO = 55;
const SO_OOBINLINE = 10;
const SO_PASSCRED = 16;
const SO_RCVBUF = 8;
const SO_RCVLOWAT = 18;
const SO_RCVTIMEO = 20;
const SO_REUSEADDR = 2;
const SO_REUSEPORT = 15;
const SO_SNDBUF = 7;
const SO_SNDLOWAT = 19;
const SO_SNDTIMEO = 21;
const SO_TYPE = 3;
const SO_ZEROCOPY = 60;
const TCP_CONGESTION = 13;
const TCP_DEFER_ACCEPT = 9;
const TCP_KEEPCNT = 6;
const TCP_KEEPIDLE = 4;
const TCP_KEEPINTVL = 5;
const TCP_NODELAY = 1;
const TCP_NOTSENT_LOWAT = 25;
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,161 @@
<?php
// These stubs were generated by the phan stub generator.
// @phan-stub-for-extension zip@1.15.6
namespace {
class ZipArchive implements \Countable {
// constants
const CREATE = 1;
const EXCL = 2;
const CHECKCONS = 4;
const OVERWRITE = 8;
const RDONLY = 16;
const FL_NOCASE = 1;
const FL_NODIR = 2;
const FL_COMPRESSED = 4;
const FL_UNCHANGED = 8;
const FL_ENC_GUESS = 0;
const FL_ENC_RAW = 64;
const FL_ENC_STRICT = 128;
const FL_ENC_UTF_8 = 2048;
const FL_ENC_CP437 = 4096;
const CM_DEFAULT = -1;
const CM_STORE = 0;
const CM_SHRINK = 1;
const CM_REDUCE_1 = 2;
const CM_REDUCE_2 = 3;
const CM_REDUCE_3 = 4;
const CM_REDUCE_4 = 5;
const CM_IMPLODE = 6;
const CM_DEFLATE = 8;
const CM_DEFLATE64 = 9;
const CM_PKWARE_IMPLODE = 10;
const CM_BZIP2 = 12;
const CM_LZMA = 14;
const CM_XZ = 95;
const CM_TERSE = 18;
const CM_LZ77 = 19;
const CM_WAVPACK = 97;
const CM_PPMD = 98;
const ER_OK = 0;
const ER_MULTIDISK = 1;
const ER_RENAME = 2;
const ER_CLOSE = 3;
const ER_SEEK = 4;
const ER_READ = 5;
const ER_WRITE = 6;
const ER_CRC = 7;
const ER_ZIPCLOSED = 8;
const ER_NOENT = 9;
const ER_EXISTS = 10;
const ER_OPEN = 11;
const ER_TMPOPEN = 12;
const ER_ZLIB = 13;
const ER_MEMORY = 14;
const ER_CHANGED = 15;
const ER_COMPNOTSUPP = 16;
const ER_EOF = 17;
const ER_INVAL = 18;
const ER_NOZIP = 19;
const ER_INTERNAL = 20;
const ER_INCONS = 21;
const ER_REMOVE = 22;
const ER_DELETED = 23;
const ER_ENCRNOTSUPP = 24;
const ER_RDONLY = 25;
const ER_NOPASSWD = 26;
const ER_WRONGPASSWD = 27;
const ER_OPNOTSUPP = 28;
const ER_INUSE = 29;
const ER_TELL = 30;
const ER_COMPRESSED_DATA = 31;
const OPSYS_DOS = 0;
const OPSYS_AMIGA = 1;
const OPSYS_OPENVMS = 2;
const OPSYS_UNIX = 3;
const OPSYS_VM_CMS = 4;
const OPSYS_ATARI_ST = 5;
const OPSYS_OS_2 = 6;
const OPSYS_MACINTOSH = 7;
const OPSYS_Z_SYSTEM = 8;
const OPSYS_Z_CPM = 9;
const OPSYS_CPM = 9;
const OPSYS_WINDOWS_NTFS = 10;
const OPSYS_MVS = 11;
const OPSYS_VSE = 12;
const OPSYS_ACORN_RISC = 13;
const OPSYS_VFAT = 14;
const OPSYS_ALTERNATE_MVS = 15;
const OPSYS_BEOS = 16;
const OPSYS_TANDEM = 17;
const OPSYS_OS_400 = 18;
const OPSYS_OS_X = 19;
const OPSYS_DEFAULT = 3;
const EM_NONE = 0;
const EM_AES_128 = 257;
const EM_AES_192 = 258;
const EM_AES_256 = 259;
const LIBZIP_VERSION = '1.5.1';
// properties
public $comment;
public $filename;
public $numFiles;
public $status;
public $statusSys;
// methods
public function open($filename, $flags = null) {}
public function setPassword($password) {}
public function close() {}
public function count() {}
public function getStatusString() {}
public function addEmptyDir($dirname) {}
public function addFromString($name, $content) {}
public function addFile($filepath, $entryname = null, $start = null, $length = null) {}
public function addGlob($pattern, $flags = null, $options = null) {}
public function addPattern($pattern, $path = null, $options = null) {}
public function renameIndex($index, $new_name) {}
public function renameName($name, $new_name) {}
public function setArchiveComment($comment) {}
public function getArchiveComment($flags = null) {}
public function setCommentIndex($index, $comment) {}
public function setCommentName($name, $comment) {}
public function getCommentIndex($index, $flags = null) {}
public function getCommentName($name, $flags = null) {}
public function deleteIndex($index) {}
public function deleteName($name) {}
public function statName($filename, $flags = null) {}
public function statIndex($index, $flags = null) {}
public function locateName($filename, $flags = null) {}
public function getNameIndex($index, $flags = null) {}
public function unchangeArchive() {}
public function unchangeAll() {}
public function unchangeIndex($index) {}
public function unchangeName($name) {}
public function extractTo($pathto, $files = null) {}
public function getFromName($entryname, $len = null, $flags = null) {}
public function getFromIndex($index, $len = null, $flags = null) {}
public function getStream($entryname) {}
public function setExternalAttributesName($name, $opsys, $attr, $flags = null) {}
public function setExternalAttributesIndex($index, $opsys, $attr, $flags = null) {}
public function getExternalAttributesName($name, &$opsys, &$attr, $flags = null) {}
public function getExternalAttributesIndex($index, &$opsys, &$attr, $flags = null) {}
public function setCompressionName($name, $method, $compflags = null) {}
public function setCompressionIndex($index, $method, $compflags = null) {}
public function setEncryptionName($name, $method, $password = null) {}
public function setEncryptionIndex($index, $method, $password = null) {}
}
function zip_close($zip) {}
function zip_entry_close($zip_ent) {}
function zip_entry_compressedsize($zip_entry) {}
function zip_entry_compressionmethod($zip_entry) {}
function zip_entry_filesize($zip_entry) {}
function zip_entry_name($zip_entry) {}
function zip_entry_open($zip_dp, $zip_entry, $mode = null) {}
function zip_entry_read($zip_entry, $len = null) {}
function zip_open($filename) {}
function zip_read($zip) {}
}

View File

@@ -1832,6 +1832,7 @@ class Adherent extends CommonObject
$vattouse = get_default_tva($mysoc, $mysoc, $idprodsubscription);
}
//print xx".$vattouse." - ".$mysoc." - ".$customer;exit;
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$result = $invoice->addline($label, 0, 1, $vattouse, 0, 0, $idprodsubscription, 0, $datesubscription, '', 0, 0, '', 'TTC', $amount, 1);
if ($result <= 0) {
$this->error = $invoice->error;

View File

@@ -292,6 +292,7 @@ class PrestaShopWebservice
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}

View File

@@ -450,6 +450,7 @@ if ($action == 'edit') {
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING);
} else {
$text = $oauthservices[getDolGlobalString('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING')];

View File

@@ -55,6 +55,7 @@ if ($action == 'getlastversion') {
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}

View File

@@ -179,6 +179,7 @@ if (GETPOST('target') == 'remote') {
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}

View File

@@ -66,6 +66,7 @@ if ($action == 'getlastversion') {
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}

View File

@@ -761,6 +761,7 @@ class Documents extends DolibarrApi
if (is_object($object)) {
if ($fetchbyid) {
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$result = $object->fetch($ref);
} else {
$result = $object->fetch('', $ref);

View File

@@ -2091,6 +2091,7 @@ class Setup extends DolibarrApi
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}

View File

@@ -37,6 +37,8 @@ if (empty($object) || !is_object($object)) {
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $object';
global $forceall, $forcetoshowtitlelines, $filtertype;

View File

@@ -40,6 +40,8 @@ if (empty($object) || !is_object($object)) {
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $object';
global $forceall, $filtertype;

View File

@@ -39,6 +39,9 @@ if (empty($object) || !is_object($object)) {
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $object';
global $filtertype;
if (empty($filtertype)) {
$filtertype = 0;

View File

@@ -44,6 +44,9 @@ if (empty($object) || !is_object($object)) {
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $object';
global $filtertype;
if (empty($filtertype)) {
$filtertype = 0;

View File

@@ -1086,6 +1086,7 @@ if ($action == 'create') {
include_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
$list = ModelePDFFactures::liste_modeles($db);
print img_picto('', 'generic', 'class="pictofixedwidth"');
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('modelpdf', $list, $conf->global->FACTURE_ADDON_PDF);
print "</td></tr>";

View File

@@ -762,6 +762,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="page_y" value="">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Contracts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contract', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "SendContractRef";

View File

@@ -22,6 +22,23 @@
*/
'
@phan-var-force CommonObject $this
@phan-var-force ?string $action
@phan-var-force ?string $cancel
@phan-var-force CommonObject $object
@phan-var-force string $permissiontoadd
@phan-var-force ?string $permissionedit
@phan-var-force string $permissiontodelete
@phan-var-force string $backurlforlist
@phan-var-force ?string $backtopage
@phan-var-force ?string $noback
@phan-var-force ?string $triggermodname
@phan-var-force string $hidedetails
@phan-var-force string $hidedesc
@phan-var-force string $hideref
';
// $action or $cancel must be defined
// $object must be defined
// $permissiontoadd must be defined

View File

@@ -218,6 +218,8 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
* @param int $epaisseur Epaisseur
* @param int $taille Size
* @return void
*
* @phan-suppress PhanPluginSuspiciousParamPosition
*/
protected function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4)
{

View File

@@ -695,6 +695,7 @@ class dolReceiptPrinter extends Printer
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}

View File

@@ -99,9 +99,12 @@ class FormMargin
$pv = $line->total_ht;
// We chose to have line->pa_ht always positive in database, so we guess the correct sign
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
$pa_ht = (($pv < 0 || ($pv == 0 && in_array($object->element, array('facture', 'facture_fourn')) && $object->type == $object::TYPE_CREDIT_NOTE)) ? -$line->pa_ht : $line->pa_ht);
if (getDolGlobalInt('INVOICE_USE_SITUATION') == 1) { // Special case for old situation mode
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
if (($object->element == 'facture' && $object->type == $object::TYPE_SITUATION)
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
|| ($object->element == 'facture' && $object->type == $object::TYPE_CREDIT_NOTE && getDolGlobalInt('INVOICE_USE_SITUATION_CREDIT_NOTE') && $object->situation_counter > 0)) {
// We need a compensation relative to $line->situation_percent
$pa = $line->qty * $pa_ht * ($line->situation_percent / 100);

View File

@@ -616,6 +616,7 @@ class FormTicket
// If no socid, set to -1 to avoid full contacts list
$selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1;
print img_picto('', 'contact', 'class="paddingright"');
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectcontacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200');
print ' ';
$formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly');

View File

@@ -260,6 +260,7 @@ class RssParser
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}

View File

@@ -1,4 +1,5 @@
<?php
'@phan-var-force DolibarrModules $this';
if (empty($keyforclass) || empty($keyforclassfile) || empty($keyforelement)) {
//print $keyforclass.' - '.$keyforclassfile.' - '.$keyforelement;

View File

@@ -1,4 +1,5 @@
<?php
'@phan-var-force DolibarrModules $this';
if (empty($keyforclass) || empty($keyforclassfile) || empty($keyforelement)) {
//print $keyforclass.' - '.$keyforclassfile.' - '.$keyforelement;

View File

@@ -1273,6 +1273,7 @@ class mysqliDoli extends mysqli
if (PHP_VERSION_ID >= 80100) {
parent::__construct();
} else {
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
parent::init();
}
if (strpos($host, 'ssl://') === 0) {

View File

@@ -1,4 +1,5 @@
<?php
'@phan-var-force DolibarrModules $this';
// $keyforselect = name of main table
// keyforelement = name of picto

View File

@@ -1,4 +1,5 @@
<?php
'@phan-var-force DolibarrModules $this';
// $keyforselect = name of main table
// keyforelement = name of picto

View File

@@ -1575,6 +1575,7 @@ function dol_string_nospecial($str, $newstr = '_', $badcharstoreplace = '', $bad
$forbidden_chars_to_remove = $badcharstoremove;
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
return str_replace($forbidden_chars_to_replace, $newstr, str_replace($forbidden_chars_to_remove, "", $str));
}
@@ -1953,6 +1954,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename =
if (!empty($message)) {
// Test log level
// @phan-suppress-next-line PhanPluginDuplicateArrayKey
$logLevels = array(LOG_EMERG => 'EMERG', LOG_ALERT => 'ALERT', LOG_CRIT => 'CRITICAL', LOG_ERR => 'ERR', LOG_WARNING => 'WARN', LOG_NOTICE => 'NOTICE', LOG_INFO => 'INFO', LOG_DEBUG => 'DEBUG');
if (!array_key_exists($level, $logLevels)) {
throw new Exception('Incorrect log level');
@@ -6491,6 +6493,7 @@ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round
}*/
$ret = price($dimension, 0, $outputlangs, 0, 0, $round);
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$ret .= ' '.measuringUnitString(0, $type, $unit, $use_short_label, $outputlangs);
return $ret;
@@ -7785,6 +7788,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}
@@ -10628,6 +10632,7 @@ function dolExplodeIntoArray($string, $delimiter = ';', $kv = '=')
$newdelimiter = $delimiter;
} else {
// This is a simple string
// @phan-suppress-next-line PhanPluginSuspiciousParamPositionInternal
$newdelimiter = preg_quote($delimiter, '/');
}

View File

@@ -1218,6 +1218,7 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
// To ensure that all variables within the MAX() brackets are integers
// This avoid bad detection of max when data are noised with non numeric values at the position of the numero
if (getDolGlobalInt('MAIN_NUMBERING_FILTER_ON_INT_ONLY')) {
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$sql .= " AND ". $db->regexpsql($sqlstring, '^[0-9]+$', 1);
}

View File

@@ -29,6 +29,7 @@ if (!function_exists('json_encode')) {
*
* @param mixed $elements PHP Object to json encode
* @return string Json encoded string
* @phan-suppress PhanRedefineFunctionInternal
*/
function json_encode($elements)
{
@@ -226,6 +227,7 @@ if (!function_exists('json_decode')) {
* @param string $json Json encoded to PHP Object or Array
* @param bool $assoc False return an object, true return an array
* @return mixed Object or Array
* @phan-suppress PhanRedefineFunctionInternal
*/
function json_decode($json, $assoc = false)
{
@@ -276,6 +278,7 @@ function dol_json_decode($json, $assoc = false)
// Return an array
if ($out != '') {
try {
// @phan-suppress-next-line PhanPluginUnsafeEval
eval('$array = '.$out.';');
} catch (Exception $e) {
$array = array();

View File

@@ -275,6 +275,7 @@ function dol_setshmop($memoryid, $data, $expire)
if ($shm_bytes_written1 + $shm_bytes_written2 != 6 + dol_strlen($newdata)) {
print "Couldn't write the entire length of data\n";
}
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
shmop_close($handle);
return ($shm_bytes_written1 + $shm_bytes_written2);
} else {
@@ -312,6 +313,7 @@ function dol_getshmop($memoryid)
} else {
return -1;
}
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
shmop_close($handle);
} else {
return null; // Can't open existing block, so we suppose it was not created, so nothing were cached yet for the memoryid

View File

@@ -186,6 +186,7 @@ class pdf_standard_actions
$pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
$pdf->SetKeywords($outputlangs->convToOutputCharset($this->title." ".$this->subject));
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
$nbpage = $this->_pages($pdf, $outputlangs); // Write content

View File

@@ -320,6 +320,7 @@ class pdf_standard_asset extends ModelePDFAsset
$pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@@ -1325,6 +1326,7 @@ class pdf_standard_asset extends ModelePDFAsset
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@@ -287,6 +287,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Set $this->atleastonediscount if you have at least one discount
@@ -1489,6 +1490,7 @@ class pdf_einstein extends ModelePDFCommandes
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
}

View File

@@ -324,6 +324,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Set $this->atleastonediscount if you have at least one discount
@@ -1663,6 +1664,7 @@ class pdf_eratosthene extends ModelePDFCommandes
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();

View File

@@ -242,6 +242,7 @@ class pdf_strato extends ModelePDFContract
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@@ -780,6 +781,7 @@ class pdf_strato extends ModelePDFContract
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
}

View File

@@ -270,6 +270,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
@@ -1011,6 +1012,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@@ -239,6 +239,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
/*

View File

@@ -153,6 +153,8 @@ class modGeneratePassPerso extends ModeleGenPassword
* Build new password
*
* @return string Return a new generated password
*
* @phan-suppress PhanPossiblyInfiniteRecursionSameParams
*/
public function getNewGeneratedPassword()
{

View File

@@ -158,6 +158,7 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
print 'Failed to open log file '.($dolibarr_main_prod ? basename($logfile) : $logfile);
}
} else {
// @phan-suppress PhanPluginDuplicateArrayKey
$logLevels = array(
LOG_EMERG => 'EMERG',
LOG_ALERT => 'ALERT',

View File

@@ -146,6 +146,7 @@ if ($conf->use_javascript_ajax && 1 == 2) { // select2 is not best with smartp
$accesskeyalreadyassigned[$accesskey] = $accesskey;
}
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$searchform .= printSearchForm($urlaction, $urlaction, $val['label'], 'minwidth200', $keysearch, $accesskey, $key, $val['img'], $showtitlebefore, ($i > 0 ? 0 : 1));
$i++;

View File

@@ -39,6 +39,13 @@ if (empty($conf) || !is_object($conf)) {
if (!isset($parameters)) {
$parameters = array();
}
'
@phan-var-force CommonObject $object
@phan-var-force string $action
@phan-var-force Conf $conf
@phan-var-force Translate $conf
@phan-var-force array<string,mixed> $parameters
';
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook

View File

@@ -39,6 +39,14 @@ if (empty($conf) || !is_object($conf)) {
if (!isset($parameters)) {
$parameters = array();
}
'
@phan-var-force CommonObject $object
@phan-var-force string $action
@phan-var-force Conf $conf
@phan-var-force Translate $conf
@phan-var-force array<string,mixed> $parameters
';
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {

View File

@@ -424,6 +424,7 @@ if (getDolGlobalString('MAIN_EASTER_EGG_COMMITSTRIP')) {
if (LIBXML_VERSION < 20900) {
// Avoid load of external entities (security problem).
// Required only if LIBXML_VERSION < 20900
// @phan-suppress-next-line PhanDeprecatedFunctionInternal
libxml_disable_entity_loader(true);
}

View File

@@ -41,6 +41,9 @@ if (empty($object) || !is_object($object)) {
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $object';
$usemargins = 0;
if (isModEnabled('margin') && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) {
$usemargins = 1;

View File

@@ -136,6 +136,7 @@ $coldisplay++;
$situationinvoicelinewithparent = 0;
if ($line->fk_prev_id != null && in_array($object->element, array('facture', 'facturedet'))) {
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
if ($object->type == $object::TYPE_SITUATION) { // The constant TYPE_SITUATION exists only for object invoice
// Set constant to disallow editing during a situation cycle
$situationinvoicelinewithparent = 1;

View File

@@ -40,6 +40,9 @@ if (empty($object) || !is_object($object)) {
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $object';
print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
// Title line
@@ -68,6 +71,7 @@ if (getDolGlobalString('FACTURE_LOCAL_TAX1_OPTION') || getDolGlobalString('FACTU
print $langs->trans('VAT');
}
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
if (in_array($object->element, array('propal', 'commande', 'facture', 'supplier_proposal', 'order_supplier', 'invoice_supplier')) && $object->status == $object::STATUS_DRAFT) {
global $mysoc;
@@ -108,6 +112,7 @@ if (getDolGlobalString('PRODUCT_USE_UNITS')) {
print '<th class="linecoldiscount right nowraponall">';
print $langs->trans('ReductionShort');
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
if (in_array($object->element, array('propal', 'commande', 'facture')) && $object->status == $object::STATUS_DRAFT) {
global $mysoc;

View File

@@ -38,13 +38,17 @@
*
* $text, $description, $line
*/
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
print "Error, template page can't be called as URL";
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $object
@phan-var-force 0|1 $forceall
';
global $mysoc;
global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
@@ -76,6 +80,7 @@ $domData .= ' data-qty="'.$line->qty.'"';
$domData .= ' data-product_type="'.$line->product_type.'"';
$sign = 1;
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
if (getDolGlobalString('INVOICE_POSITIVE_CREDIT_NOTE_SCREEN') && in_array($object->element, array('facture', 'invoice_supplier')) && $object->type == $object::TYPE_CREDIT_NOTE) {
$sign = -1;
}
@@ -421,6 +426,7 @@ if ($outputalsopricetotalwithtax) {
if ($this->statut == 0 && !empty($object_rights->creer) && $action != 'selectlines') {
$situationinvoicelinewithparent = 0;
if (isset($line->fk_prev_id) && in_array($object->element, array('facture', 'facturedet'))) {
// @phan-suppress-next-line PhanUndeclaredConstantOfClass
if ($object->type == $object::TYPE_SITUATION) { // The constant TYPE_SITUATION exists only for object invoice
// Set constant to disallow editing during a situation cycle
$situationinvoicelinewithparent = 1;

View File

@@ -27,6 +27,7 @@ if (empty($conf) || !is_object($conf)) {
<!-- BEGIN PHP TEMPLATE originproductline.tpl.php -->
<?php
'@phan-var-force CommonObject $this';
print '<tr data-id="'.$this->tpl['id'].'" class="oddeven'.(empty($this->tpl['strike']) ? '' : ' strikefordisabled').'">';
print '<td class="linecolref">'.$this->tpl['label'].'</td>';
print '<td class="linecoldescription">'.$this->tpl['description'].'</td>';

View File

@@ -232,6 +232,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$userAccountControl -= 2;
}
$info['userAccountControl'] = $userAccountControl;
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$resUpdate = $ldap->update($dn, $info, $user, $dn);
if ($resUpdate < 0) {
$this->error = "ErrorLDAP " . $ldap->error;

View File

@@ -163,6 +163,7 @@ class InterfaceStripe extends DolibarrTriggers
$taxids = $customer->allTaxIds($customer->id);
if (is_array($taxids->data)) {
foreach ($taxids->data as $taxidobj) {
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
$customer->deleteTaxId($customer->id, $taxidobj->id);
}
}

View File

@@ -1629,6 +1629,7 @@ class Expedition extends CommonObject
if ($originline > 0 && $originline == $obj->fk_origin_line) {
'@phan-var-force ExpeditionLigne $line'; // $line from previous loop
$line->entrepot_id = 0; // entrepod_id in details_entrepot
$line->qty_shipped += $obj->qty_shipped;
} else {

View File

@@ -143,6 +143,7 @@ $arrayfields = array(
'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>!getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0),
'fd.duree'=>array('label'=>'DurationOfLine', 'type'=> 'duration', 'checked'=>1, 'enabled'=>!getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), //type duration is here because in database, column 'duree' is double
);
'@phan-var-force array{label:string,type?:string,checked:int,position?:int,enabled?:int,langfile?:string,help:string} $arrayfields';
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';

View File

@@ -22,6 +22,8 @@ if (empty($conf) || !is_object($conf)) {
exit;
}
'@phan-var-force CommonObject $this';
global $db, $langs;
if (empty($form) || !is_object($form)) {

View File

@@ -39,6 +39,13 @@ if (empty($conf) || !is_object($conf)) {
if (!isset($parameters)) {
$parameters = array();
}
'
@phan-var-force CommonObject $object
@phan-var-force string $action
@phan-var-force Conf $conf
@phan-var-force Translate $conf
@phan-var-force array<string,mixed> $parameters
';
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@@ -514,8 +514,10 @@ if ($sql_select) {
if ($type_element == 'contract') {
print $documentstaticline->getLibStatut(5);
} elseif ($type_element == 'invoice') {
// @phan-suppress-next-line PhanParamTooMany
print $documentstatic->getLibStatut(5, $objp->paid);
} elseif ($type_element == 'supplier_invoice') {
// @phan-suppress-next-line PhanParamTooMany
print $documentstatic->getLibStatut(5, $objp->paid);
} else {
print $documentstatic->getLibStatut(5);

View File

@@ -460,6 +460,7 @@ class SupplierProposal extends CommonObject
// We use 'none' instead of $ref_supplier, because fourn_ref may not exists anymore. So we will take the first supplier price ok.
// If we want a dedicated supplier price, we must provide $fk_prod_fourn_price.
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$result = $productsupplier->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', $this->socid); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->socid
if ($result > 0) {
$pu = $productsupplier->fourn_pu; // Unit price supplier price set by get_buyprice

View File

@@ -30,6 +30,9 @@ if (empty($object) || !is_object($object)) {
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $this';
global $forcetoshowtitlelines;
// Define colspan for the button 'Add'

View File

@@ -38,6 +38,9 @@ if (empty($object) || !is_object($object)) {
exit;
}
'@phan-var-force CommonObject $this
@phan-var-force CommonObject $object';
// add html5 elements
$domData = ' data-element="'.$line->element.'"';
$domData .= ' data-id="'.$line->id.'"';

View File

@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
# `codespell` can be run as a standalone program from the CLI
# with the appropriate default options.
skip = "*/langs/*,*/build/exe/*,**.log,*.pdf,*dev/resources/*,*.phar,*.z,*.gz,*.sql,*.svg,*htdocs/includes/*,*/textiso.txt,*.js,*README-*,*build/rpm/*spec,*build/pad/*ml,*htdocs/includes/phpoffice/*,*htdocs/includes/tecnickcom/*,*dev/initdemo/removeconfdemo.sh,*dev/tools/codespell/*,*pyproject.toml,*build/exe/*,*fontawe*,*htdocs/theme/*/flags-sprite.inc.php,*dev/setup/codetemplates/codetemplates.xml,*/php.ini,*/html_cerfafr.*,*/lessc.class.php,*.asciidoc,*.xml,*opensurvey/css/style.css,*/documents"
skip = "*/langs/*,*/build/exe/*,**.log,*.pdf,*dev/resources/*,*.phar,*.z,*.gz,*.sql,*.svg,*htdocs/includes/*,*/textiso.txt,*.js,*README-*,*build/rpm/*spec,*build/pad/*ml,*htdocs/includes/phpoffice/*,*htdocs/includes/tecnickcom/*,*dev/initdemo/removeconfdemo.sh,*dev/tools/codespell/*,*pyproject.toml,*build/exe/*,*fontawe*,*htdocs/theme/*/flags-sprite.inc.php,*dev/setup/codetemplates/codetemplates.xml,*/php.ini,*/html_cerfafr.*,*/lessc.class.php,*.asciidoc,*.xml,*opensurvey/css/style.css,*dev/tools/phan/stubs/*,*/documents"
quiet-level=2
ignore-regex = '\\[fnrstv]'