forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpstan.neon.dist
167 lines (163 loc) · 11.3 KB
/
phpstan.neon.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
parameters:
tmpDir: ./.github/tmp
parallel:
# Commented some of the settings, reminding the defaults:
# should adapt better to target machines
# jobSize: 8 # default is 20
processTimeout: 600.0
# maximumNumberOfProcesses: 20 # default is 32
# minimumNumberOfJobsPerProcess: 2 # default is 2
# buffer: 134217728 # 128 MB # Not documented
customRulesetUsed: true
level: 5
fileExtensions:
- php
paths:
- htdocs
- scripts
excludePaths:
analyseAndScan:
- htdocs/custom/*
- htdocs/documents/*
- htdocs/install/doctemplates/*
- htdocs/langs/*
- htdocs/modulebuilder/template/test/*
- htdocs/support/*
analyse:
- htdocs/includes/*
- htdocs/core/class/lessc.class.php
checkAlwaysTrueCheckTypeFunctionCall: false
checkAlwaysTrueInstanceof: false
checkAlwaysTrueStrictComparison: false
checkClassCaseSensitivity: true
checkFunctionArgumentTypes: true
checkFunctionNameCase: true
checkArgumentsPassedByReference: false
checkMaybeUndefinedVariables: false
checkNullables: false
checkThisOnly: true
checkUnionTypes: false
checkExplicitMixedMissingReturn: true
reportMaybes: false
reportMaybesInMethodSignatures: false
reportStaticMethodSignatures: false
polluteScopeWithLoopInitialAssignments: true
polluteScopeWithAlwaysIterableForeach: true
reportMagicMethods: false
reportMagicProperties: false
treatPhpDocTypesAsCertain: false
ignoreErrors:
- '#Unable to resolve the template type T#'
- '#Offset .* (?:isset\(\)) always exists and is not nullable#'
- '#(?:Variable \$(?:_(?:FILES|POST|SERVER)|array_propal_object|baseUri|current_fiscal_period|d(?:b_create_(?:database|user)|olibarr_main_(?:db_prefix|url_root)|raftchecked)|erreur_ajout_date|isImageValid|keyforstripeterminalbank|(?:lo|mar)gin|max|n(?:ewProperty|um)|p(?:ermsgroupbyentitypluszero|ro(?:gressCalculated|parrayofkeyval)|ublic)|t(?:(?:itl|otal_tim)e|va_tx)|var)) in isset\(\) always exists and is not nullable#'
- '#(?:Property CommonOrderLine::\$multicurrency_subprice \(float\) on left side of \?\?|isset\(\)) is not nullable#'
- '#(?:(?:Elsei|I)f condition|Left side of (?:&&|\|\|)|Negated boolean expression|R(?:esult of (?:&&|\|\|)|ight side of (?:&&|\|\|))|Ternary operator condition) is always false#'
- '#(?:Comparison operation "(?:<(?:" between (?:0(?:(?:\|1)? and 0)|int<(?:0, max>(?:(?:\|false)? and 0)|1, max> and 1)|null and 0)|=" between int<2, max> and 1)|>(?:" between (?:(?:-1|0) and 0|0(?: and 1(?:000)?|\|1\|2\|3 and 999)|1 and 1)))) is always false#'
- '#(?:Comparison operation ">=" between 0 and 8) is always false#'
- '#(?:Comparison operation "(?:<(?:" between (?:(?:..|-1) and 0|0 and 4)|=" between (?:0 and 0|int<100, 999> and 999))|>(?:" between (?:1(?:(?:\|2)? and 0)|int<(?:1, max> and 0|2, max> and 1))|=" between (?:\S+ and 0|int<(?:0, max> and 0|1, max> and 1))))) is always true#'
- '#(?:Comparison operation ">=") between int<2, 4> and 1 is always true\.#'
- '#(?:Else branch is unreachable because (?:(?:previous|ternary operator) condition)) is always true#'
- '#(?:(?:Elsei|I)f condition|Left side of (?:&&|\|\|)|Negated boolean expression|R(?:esult of (?:&&|\|\|)|ight side of (?:&&|\|\|))|Ternary operator condition) is always true#'
- '#is_object\(\) with mixed will always evaluate to false#'
- '#Empty array passed to foreach#'
- '#in empty\(\) always exists and is (not|always) falsy#'
- '#in empty\(\) is not falsy#'
- '#(?:empty\(\) is always) fals#'
- '#(\$force_dolibarr_lib|\$dolibarr_main_db).*in empty\(\) is never defined.#'
- '#Sprain\\SwissQrBill\\#'
- '#(?:Constructor of class (?:(?:ModeleBox|box_accountancy_last_manual_entri)es|box_(?:ac(?:countancy_suspense_account|ti(?:ons(?:_future)?|vity))|b(?:irthdays(?:_members)?|o(?:(?:okmark|m)s))|c(?:(?:lient|o(?:m(?:(?:mand|pt)e)|nt(?:r?act)))s|ustomers_outstanding_bill_reached)|dolibarr_state_board|f(?:actures(?:_(?:fourn(?:_imp)?|imp))?|icheinter|ournisseurs|unnel_of_prospection)|g(?:oodcustomers|raph_(?:invoices_(?:per(?:month|year)|supplier_permonth)|n(?:b_ticket(?:_last_x_days|s_type)|ew_vs_close_ticket)|orders_(?:(?:supplier_)?permonth)|pro(?:duct_distribution|pales_permonth)|ticket_by_severity))|last(?:_(?:(?:modified_)?knowledgerecord|(?:modified_)?ticket)|login)|m(?:embers_(?:by_t(?:ags|ype)|last_(?:modified|subscriptions)|subscriptions_by_year)|os)|pro(?:duits(?:_alerte_stock)?|ject(?:_opportunities)?|pales|spect)|s(?:(?:cheduled_job|ervices_contract)s|ervices_expired|(?:hipment|upplier_order)s|upplier_orders_awaiting_reception)|task|validated_projects))) has an unused parameter \$param\.#'
- '#(?:Constructor of class DoliDB(?:Mysqli|Pgsql|Sqlite3)) has an unused parameter \$type\.#'
- '#Method DoliDBSqlite3::getListOfCollation\(\) should return array<int, array\{collation: string\}>\|null but returns array\{array\{charset: .UTF-8., description: .UTF-8.\}\}#'
- '#(?:Constructor of class DolEditor) has an unused parameter \$toolbarlocation\.#'
- '#Dead catch - Exception is never thrown in the try block#'
- '#.*phan-var#'
- '#(?:(?:s(?:(?:et_error_handl|pl_autoload_regist)er)|array_filter)) expects \(callable#'
- '# vatrate expects bool, int#'
- '# getLocalTaxesFromRate expects int\|string#'
- '#(?:mysqli::options\(\)) expects int\|string#'
- '# print_barre_liste expects int\|null#'
- '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#'
- '#(?:(?:(?:BonPrelevement::generat|CommonObject::update_pric)e|Form(?:::getSelectConditionsPaiements|Company::select_state)|In(?:foBox::listBoxes|tracommReport::addItemsFact)|Menubase::recur|Ticket::sendTicketMessageByEmail|mod_barcode_(?:(?:product|thirdparty)_standard::literalBarcodeType))\(\)) expects int, string given\.#'
- '#on array{url: mixed} in empty\(\) does not exist.#'
- '# Diff::generatePartialDiff\(\) expects array#'
- '# EmailCollector::getpart\(\) expects string#'
- '#(?:(?:CommonStickerGenerator::_Croix|pdf_(?:azur::_tableau_(?:info|tot)|ban::_tableau))\(\)|pdf_(?:bank|c(?:anelle::_tableau_(?:(?:tot|versements)\(\))|ornas::_tableau_(?:(?:info|tot)\(\))|rabe::_tableau_(?:(?:info|tot|versements)\(\))|yan::draw(?:(?:Info|Total)Table\(\)))|e(?:agle(?:(?:::_tableau_tot|_proforma::drawTotalTable)\(\))|instein::_tableau_(?:(?:info|tot)\(\))|ratosthene::draw(?:(?:Info|Total)Table\(\))|spadon::_tableau_tot\(\))|muscadet::_tableau_(?:(?:info|tot)\(\))|octopus::(?:_table(?:(?:FirstPage|au)\(\))|draw(?:(?:Info|Total)Table\(\)))|page(?:foot|head)|(?:rouget::_tableau_tot|s(?:epamandate::_tableau(?:_info)?|ponge::draw(?:(?:Info|Total)Table)|quille::_tableau_tot|t(?:andard_(?:e(?:(?:valuation|xpensereport)::_tableau|xpensereport::tablePayments)|(?:myobjec|supplierpaymen)t::_tableau|supplierpayment::_tableau_cheque)|orm::_tableau_info|rato::tabSignature))|t(?:cpdflabel::writeBarcode|yphon::_tableau_info)|vinci::_tableau_info)\(\)|w(?:atermark|rite(?:LinkedObjects|linedesc))|zenith::_tableau_tot\(\))) expects int, float given\.#'
- '#(?:Comm(?:(?:ande::updateline|on(?:Invoice::getLibStatut|StickerGenerator::Set_Char_Size))\(\))|Facture(?:(?:::update|FournisseurRec::add)line\(\))|(?:Holiday::addLogCP|Loan::getLibStatut|SupplierProposal::updateline)\(\)|calcul_price_total) expects int, float given\.#'
- '#(?:dol_(?:mktime|remove_file_process)|print_actions_filter) expects int, array\|string given\.#'
- '# (CSMSFile) constructor expects int, array\|string given.#'
- '#(?:(?:Asset::addDepreciationL|Facture(?:(?:(?:Fournisseur)?::add|Fournisseur::update)l))ine\(\)|calcul_price_total|(?:loanCalcMonthlyPaymen|print_paypal_redirec)t) expects float, string given.#'
- '#(?:F(?:acture(?:(?:Fournisseur)?Rec::addline\(\))|ichinterRec::addLineRec\(\))|dolMd2Html) expects string\|null,#'
- '#::printStdColumnContent\(\) expects string, float(\|(int|array)(\<.*\>)?)* given.#'
- '#::HTML2OpenIDServer\(\) expects string, array given.#'
- '# dol_stringtotime expects string, DateTime given.#'
- '#expects string, bool\|mysqli_result\|resource given.#'
- '#(?: DoliDBPgsql::fetch_row\(\)) expects resource, PgSql\\Result given\.#'
- '#( |::)((multi)?selectarray)\(\) expects array#'
- '# (reWriteAllMenus|check_authentication) expects array#'
- '#::(_validateMyObject|select_company)\(\) expects array<string#'
- '# ldap_search expects array\|LDAP#'
- '# FormWebPortal::selectForForms\(\) expects int, array#'
- '# Lettering::getBankLinesFromFkDocAndDocType\(\) expects array#'
- '# (Odf) constructor expects #'
- '# Stripe[^ ]+::all\(\) expects #'
- '#(?:MultiCurrencies::_cleanObjectDatasRate\(\)) expects MultiCurrency#'
- '#(?: (?:(?:Order|Product|SupplierOrder)s::_cleanObjectDatas\(\)|formatObject)) expects object#'
- '#(?: BordereauChequeBlochet::_pagefoot\(\)) expects object, string given\.#'
- '#(?: (?:(?:Project|Task)s::_cleanObjectDatas\(\))) expects object, string given\.#'
- '#(?:ftp_(?:c(?:dup|hdir|lose)|delete|get|mkdir|put|rmdir)) expects FTP\\Connection#'
- '#(?:ldap_(?:(?:ad|bin)d|delete|err(?:no|or)|first_entry|get_(?:(?:attribut|entri)es|(?:optio|values_le)n)|mod_(?:add|del|replace)|rename|set_option|unbind)) expects LDAP\\Connection#'
- '# (?:pg_(?:affected_rows|f(?:etch_(?:array|object|row)|ree_result)|num_rows)) expects PgSql\\Result#'
- '# (?:Common(?:DocGenerator::get(?:(?:ExtrafieldsInHtml|_substitutionarray_lines)\(\))|Object::printO(?:(?:bject|rigin)Line\(\)))) expects CommonObjectLine#'
- '#Call to function array_key_exists.. with .error. .* will always evaluate to false.#'
- '#function dolGetButtonAction expects array\{confirm\?: array.*confirm: true} given.#'
- '#Method (?:(?:(?:(?:AgendaEve|BankAccou)nt|Bom|C(?:ategorie|ont(?:r?act))|Do(?:cument|libarrApiAcces|nation)|ExpenseReport|In(?:tervention|voice))s|KnowledgeManagement|Login|M(?:(?:ultiCurrencie|o)s)|(?:Order|P(?:artnership|ro(?:duct|posal))|Salarie)s|S(?:etup|(?:hipment|t(?:atu|ockMovement)|upplier(?:Invoice|Order|Proposal))s)|T(?:(?:ask|hirdpartie|icket)s)|W(?:arehouses|ebhook|orkstations)|Zapier)::.*) no value type specified in iterable type array#'
- '#Property (?:(?:(?:(?:AgendaEven|Cont(?:r?ac))t|Do(?:libarrApiAcces|nation)|ExpenseReport|In(?:tervention|voice)|Order|Pro(?:duct|posal)|S(?:alarie|(?:hip|tockMove)ment|upplier(?:Invoice|Order|Proposal))|T(?:ask|hirdpartie|icket)|Warehouse)s|Webhook|Zapier)::.*) no value type specified in iterable type array#'
- '#Property RemiseCheque::\$account_id \(int\) does not accept string\.#'
- '#Property Contact::\$roles \(array<int, array\{id: int, socid: int, element: string, source: string, code: string, label: string\}>\) does not accept non-empty-array<int, string>\.#'
internalErrorsCountLimit: 50
cache:
nodesByFileCountMax: 512
nodesByStringCountMax: 512
reportUnmatchedIgnoredErrors: false
universalObjectCratesClasses:
- stdClass
- SimpleXMLElement
earlyTerminatingMethodCalls: []
dynamicConstantNames:
- ICONV_IMPL
- PHP_VERSION
- PHP_MAJOR_VERSION
- PHP_MINOR_VERSION
- PHP_RELEASE_VERSION
- PHP_VERSION_ID
- PHP_EXTRA_VERSION
- PHP_ZTS
- PHP_DEBUG
- PHP_MAXPATHLEN
- PHP_OS
- PHP_OS_FAMILY
- PHP_SAPI
- PHP_EOL
- PHP_INT_MAX
- PHP_INT_MIN
- PHP_INT_SIZE
- PHP_FLOAT_DIG
- PHP_FLOAT_EPSILON
- PHP_FLOAT_MIN
- PHP_FLOAT_MAX
- DEFAULT_INCLUDE_PATH
- PEAR_INSTALL_DIR
- PEAR_EXTENSION_DIR
- PHP_EXTENSION_DIR
- PHP_PREFIX
- PHP_BINDIR
- PHP_BINARY
- PHP_MANDIR
- PHP_LIBDIR
- PHP_DATADIR
- PHP_SYSCONFDIR
- PHP_LOCALSTATEDIR
- PHP_CONFIG_FILE_PATH
- PHP_CONFIG_FILE_SCAN_DIR
- PHP_SHLIB_SUFFIX
- PHP_FD_SETSIZE