forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphpstan.neon.dist
172 lines (167 loc) · 10.8 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
168
169
170
171
172
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:
- '#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\.#'
- '#(?: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|DolEditor constructor) 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.#'
- '#EvalMath::trigger\(\) expects string, int given#'
- '# Diff::generatePartialDiff\(\) expects array#'
- '# EmailCollector::getpart\(\) expects string#'
- '#(?:convertSecondToTime) expects int, float\|string given#'
- '#(?:Comm(?:(?:ande::updateline|on(?:Invoice::getLibStatut|StickerGenerator::(?:Set_Char_Size|_Croix|convertMetric)))\(\))|Facture(?:(?:::update|FournisseurRec::add)line\(\))|(?:Holiday::addLogCP|Loan::getLibStatut|SupplierProposal::updateline)\(\)|c(?:alcul_price_total|onvert(?:DurationtoHour|SecondToTime))|dol_time_plus_duree|pdf_(?:azur::_tableau_(?:(?:info|tot)\(\))|ban(?:::_tableau\(\)|k)|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\(\))|usleep) expects int, float given\.#'
- '#::saveboxorder\(\) expects int, array#'
- '#(?:dol_(?:mktime|remove_file_process)|fetchObjectByElement|print_actions_filter) expects int, array\|string given\.#'
- '# (CSMSFile) constructor expects int, array\|string given.#'
- '#(?:ProductFournisseur::logPrice\(\)) expects float\|null#'
- '#(?:(?:Asset::addDepreciationL|Facture(?:(?:(?:Fournisseur)?::add|Fournisseur::update)l))ine\(\)|calcul_price_total|dol_convertToWord|(?:loanCalcMonthlyPaymen|print_paypal_redirec)t) expects float, string given.#'
- '#EvalMath::trigger\(\) expects string\|null,#'
- '#(?:F(?:acture(?:(?:Fournisseur)?Rec::addline\(\))|ichinterRec::addLineRec\(\))|dolMd2Html|setEventMessages) expects string\|null,#'
- '# (envoi_mail|sendEmailTo) expects string, \(float\|int\) given.#'
- '#::printStdColumnContent\(\) expects string, float(\|(int|array)(\<.*\>)?)* given.#'
- '#::HTML2OpenIDServer\(\) expects string, array given.#'
- '#create_line\(\) expects string, float given.#'
- '# dol_stringtotime expects string, DateTime given.#'
- '#expects string, bool\|mysqli_result\|resource given.#'
- '#( |::)((multi)?selectarray)\(\) expects array#'
- '# (reWriteAllMenus|check_authentication) expects array#'
- '#::(_validateMyObject|select_company)\(\) expects array<string#'
- '# getCommonSubstitutionArray expects array#'
- '# ldap_search expects array\|LDAP#'
- '# FormWebPortal::selectForForms\(\) expects int, array#'
- '# Lettering::getBankLinesFromFkDocAndDocType\(\) expects array#'
- '# (Odf) constructor expects #'
- '# Stripe[^ ]+::all\(\) expects #'
- '#expects resource#'
- '# (?:(?:BordereauChequeBlochet::_pagefoot|(?:Order|Product|SupplierOrder)s::_cleanObjectDatas)\(\)|ecm_prepare_dasboard_head|formatObject) expects object#'
- '#(?: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#'
- '#(?:MultiCurrencies::_cleanObjectDatasRate\(\)) expects MultiCurrency#'
- '# (?:pdf_(?:(?:eagle_proforma::drawTotalTable|muscadet::_tableau_tot)\(\))) expects Facture#'
- '# (?:salaries_prepare_head) expects Paiement#'
- '# (?:pg_(?:affected_rows|f(?:etch_(?:array|object|row)|ree_result)|num_rows)) expects PgSql\\Result#'
- '# (?:Holiday::getNextNumRef\(\)|get_localtax|pdf_pagefoot|societe_prepare_head) expects Societe#'
- '# (?:Common(?:DocGenerator::get(?:(?:ExtrafieldsInHtml|_substitutionarray_lines)\(\))|Object::printO(?:(?:bject|rigin)Line\(\)))) expects CommonObjectLine#'
- '#colorHexToHsl expects float\|false, true#'
- '#Call to function array_key_exists.. with .error. .* will always evaluate to false.#'
- '#function dolGetButtonAction expects array\{confirm\?: array.*confirm: true} given.#'
- '#(?:make_substitutions expects array<string, string>,) string given\.#'
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