# Fix PhanPluginUnknownFunctionParamType
PHPdoc for $object was incorrect.
Also updated the return type and the parameter typing for $head
in complete_head_from_modules
# Fix: Duplicate test on "shipping", replaced duplicate with delivery_note
The second test on "shipping" was without effect but as the module was set to
"expedition_bon", I modified the test to delivery_note and put it closer to
the test on "shipping"
# Fix: Ob buffer cleanup on exception
The OB buffer capture was incorrectly cleaned up on exception.
This fixes that.
Also modified the SecurityTest to enable running it standalone
* Qual: Add typing to fix PhanTypeMismatchDimAssignment notice
* Fix: Initialise array for code in somme
* Qual: Update type hint for argument in _Set_Format
* Qual: Update type hint for childtables
* Qual: Add typing to attributes
* Qual: Add typing for _msgContent
* Qual: Suppress PhanTypeMismatchDimAssignment
* Qual: Add typing for liste
* Qual: Add typing to fields
* Qual: Add typing hint for $objMod
* Qual: Modify assignment of array with bool keys for phan typing
Demonstration:
```
php -r '$a=[true=>"yes",false=>"no"];var_dump($a);'
# Result demonstrates bool keys are converted to int.
Command line code:1:
array(2) {
[1] =>
string(3) "yes"
[0] =>
string(2) "no"
}
```
* Qual: Add typing hint to indicate value is not null
* Force non-null type on $paramname
* Qual: Add typing hint to getCats()
* Update inc.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Add check on addExtraField type argument
# Qual: Add check on addExtraField type argument
Added a check on the type argument for addExtraField
* Qual: Update phan ignore with more specific name
# Fix: Correctly close active output buffer.
Use ob_get_clean(), not ob_get_contents() and ob_clean().
Tests were failing with:
FunctionsLibTest::testVerifCond with data set "Test that verifConf("0") returns false" ('0', false)
Test code or tested code did not (only) close its own output buffers
OK, but incomplete, skipped, or risky tests\!
Also refactored a test case to use a data provider which helped identify that it was related
to dol_eval.
* Qual: Ignore some false positives for deprecated functions
# Qual: Ignore some false positives for deprecated functions
The Phan Deprecation Plugin for internal functions has mixed up some
mail functions and lists them as deprecated, this ignores that
* Qual: Enable detection and fixing of internal deprecations
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Update codespell lines ignore list after format
# Qual: Update codespell lines ignore list after forma
Done using latest library, so also adds some exceptions that are needed
in the future;
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
6 entries for:
TypeError PhanTypeMismatchArgumentProbablyReal Argument 5 ($objcon) is null of type null but \show_actions_messaging() takes \Contact|string (no real type) defined at htdocs/core/lib/functions.lib.php:13081
* qual: phan for functions.lib.php
54 entries for:
TypeError PhanTypeMismatchArgumentProbablyReal Argument 3 ($exclude) is null of type null but \getCommonSubstitutionArray() takes array (no real type) defined at htdocs/core/lib/functions.lib.php:8285
* phpcs
68 entries for "Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299"
Examples (first 10):
htdocs/accountancy/admin/categories.php 155 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/accountancy/admin/categories.php 189 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/accountancy/bookkeeping/card.php 778 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/admin/eventorganization.php 341 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/admin/hrm.php 596 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/admin/hrm.php 603 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/admin/hrm.php 627 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/admin/knowledgemanagement.php 293 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/admin/knowledgemanagement.php 300 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
htdocs/admin/multicurrency.php 115 TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($mesg) is null of type null but \setEventMessages() takes string (no real type) defined at htdocs/core/lib/functions.lib.php:9299 (the inferred real argument type has nothing in common with the parameter's phpdoc type)